source: trunk/dports/java/pulse/Portfile

Last change on this file was 82383, checked in by jmr@…, 6 years ago

pulse: fix quoting of ui_msg strings

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.0 KB
Line 
1# $Id: Portfile 82383 2011-08-13 00:08:44Z ryandesign@macports.org $
2
3PortSystem 1.0
4
5name                    pulse
6version                 1.2.18
7categories              java
8platforms               darwin
9maintainers             redhillconsulting.com.au:simon
10description             Pulse automated build server
11long_description    Pulse is an automated build or continuous integration server. \
12            Pulse regularly checks out your project's source code from your \
13            SCM, builds the project and reports on the results. A project \
14            build typically involves compiling the source code and running \
15            tests to ensure the quality of the code. By automating this \
16            process, pulse allows you to constantly monitor the health of \
17            your project.
18homepage        http://www.zutubi.com/products/pulse/
19master_sites    http://www.zutubi.com/download/
20checksums       md5 6da10683325bf7239827e2ff842600d1
21depends_lib     bin:java:kaffe
22
23set osuser      pulse
24set osgroup     pulse
25set home        ${prefix}/share/java/pulse
26set bin         ${home}/bin
27set executable  ${bin}/pulse
28set dbdir       ${prefix}/var/db/pulse
29use_configure   no
30
31startupitem.create  yes
32startupitem.init    "PULSE_HOME=${home}\nPATH=${prefix}/bin:${prefix}/sbin:${prefix}/lib/postgresql82/bin:\$PATH"
33startupitem.start   "su ${osuser} -c \"${executable} start\""
34startupitem.stop    "su ${osuser} -c \"${executable} shutdown\""
35
36build {}
37
38destroot {
39    # Create the Pulse user
40    addgroup ${osgroup}
41    set gid [existsgroup ${osgroup}]
42    adduser ${osuser} shell=/bin/sh gid=${gid} home=${dbdir} realname=Pulse\ Server
43
44    # Ensure we have the needed directories
45    xinstall -m 755 -d ${destroot}${home}
46
47    # Copy the files
48    system "cp -R ${worksrcpath}/ ${destroot}${home}"
49
50    # Keep empty directories
51    destroot.keepdirs-append ${destroot}${home}/logs ${destroot}${home}/versions
52
53    # Fix ownership of some directories pulse really needs to write to
54    system "chown -R ${osuser}:${osgroup} ${destroot}${home}/logs"
55    system "chown -R ${osuser}:${osgroup} ${destroot}${home}/versions"
56
57    # Add a symlink from bin directory to the pulse script
58    system "ln -fs ${executable} ${destroot}${prefix}/bin/pulse"
59}
60
61post-install {
62    ui_msg "#"
63    ui_msg "# The script ${executable} has been installed to facilitate starting and"
64    ui_msg "# stopping ${name} as a true daemon process. It must be run as ${osuser}."
65    ui_msg "# For example:"
66    ui_msg "#"
67    ui_msg "#   sudo su pulse -c \"${executable} start\""
68    ui_msg "#"
69    ui_msg "# This script assumes it is run from ${home}. To run from outside this"
70    ui_msg "# directory, you must set the value of PULSE_HOME to the absolute path"
71    ui_msg "# of this directory. For example:"
72    ui_msg "#"
73  ui_msg "#   PULSE_HOME=${home} sudo su pulse -c \"${executable} start\""
74    ui_msg "#"
75    ui_msg "# You will also need To create the directory ${dbdir} if it does not"
76    ui_msg "# already exist:"
77    ui_msg "#"
78    ui_msg "#   sudo mkdir -p ${dbdir}"
79    ui_msg "#   sudo chown ${osuser}:${osgroup} ${dbdir}"
80    ui_msg "#"
81}
Note: See TracBrowser for help on using the repository browser.