Ticket #1287: Portfile.2

File Portfile.2, 1.7 KB (added by pguyot (Paul Guyot), 21 years ago)

new Portfile for a rc.d script, to setup the root in /opt/local/share/abyss/ and patching the configuration file.

Line 
1PortSystem 1.0
2name                    abyss
3version                 0.3
4categories              www
5maintainers             pguyot@kallisys.net
6description             HTTP/1.1 compliant web server for
7long_description        \
8                                ABYSS aims to be a fully HTTP/1.1 compliant web server. \
9                                Its main design goals are speed, low resource usage and \
10                                portability. ABYSS works on most UNIX based systems and \
11                                on Win32 systems (Win95/98/2000/NT).
12homepage                http://abyss.sourceforge.net/
13platforms               darwin
14master_sites    sourceforge:abyss
15checksums               md5 ca2dc7618e17dae8eea23c02dd3bbf9d
16patchfiles              patch-src-data.c patch-src-server.c patch-conf-abyss.conf
17worksrcdir              ${name}
18post-patch {
19        reinplace "s|__PREFIX|${prefix}|g" ${worksrcpath}/conf/abyss.conf
20}
21configure {}
22build { system "cd ${worksrcpath}/src/ && make" }
23
24depends_run     path:/Library/StartupItems/DarwinPortsStartup:DarwinPortsStartup
25
26destroot {
27        system "install -o root -m 0755 -p ${worksrcpath}/bin/abyss ${destroot}${prefix}/sbin/"
28        system "install -d -o nobody -m 0755 ${destroot}${prefix}/share/abyss/"
29        system "install -d -o nobody -m 0755 ${destroot}${prefix}/share/abyss/log/"
30        system "touch ${destroot}${prefix}/share/abyss/log/access.log"
31        system "install -d -o nobody -m 0755 ${destroot}${prefix}/share/abyss/conf/"
32        system "install -o root -m 0644 -p ${worksrcpath}/conf/* ${destroot}${prefix}/share/abyss/conf/"
33        system "install -d -o root -m 0755 ${destroot}${prefix}/share/abyss/htdocs/"
34        system "install -o root -m 0644 ${portpath}/files/index.html ${destroot}${prefix}/share/abyss/htdocs/"
35        system "install -o root -m 755 -d ${destroot}${prefix}/etc/rc.d"
36        system "install -o root -m 755 -c \
37                ${portpath}/files/abyss.sh ${destroot}${prefix}/etc/rc.d"
38        reinplace "s|__PREFIX|${prefix}|g" \
39                ${destroot}${prefix}/etc/rc.d/abyss.sh
40}