Ticket #803: mod_hfs_apple-portfile-20030818

File mod_hfs_apple-portfile-20030818, 1.5 KB (added by bchesneau@…, 21 years ago)

Portfile

Line 
1PortSystem 1.0
2name           mod_hfs_apple
3version         1
4categories      www
5maintainers     bchesneau@mac.com
6description     mod_hfs_apple Apache module (enforce casing in URLs which need it)
7platforms       darwin
8master_sites    http://www.opensource.apple.com/darwinsource/10.2.6/apache_mod_hfs_apple
9distfiles       mod_hfs_apple.c
10worksrcdir      mod_hfs_apple
11checksums       mod_hfs_apple.c md5 98c628a2a8b9e971fb77d497af14b621
12
13use_configure   no
14extract {
15        file    mkdir ${worksrcpath}
16        system  "cp ${distpath}/mod_hfs_apple.c ${worksrcpath}"       
17}
18       
19build {
20
21        # where is apache ?     
22        if { [file readable ${prefix}/sbin/apxs] } { 
23                set APXS ${prefix}/sbin/apxs                                   
24        } elseif { [file readable ${prefix}/apache/bin/apxs] } {       
25                set APXS ${prefix}/apache/bin/apxs       
26        } else {
27                depends_lib    path:${prefix}/sbin/apxs:apache
28                set APXS ${prefix}/sbin/apxs     
29        }
30
31        cd ${worksrcpath}       
32        system "${APXS} -c -o mod_hfs_apple.so mod_hfs_apple.c"
33}
34
35destroot {
36        if { [file readable ${prefix}/sbin/apxs] } {
37                file mkdir ${destroot}${prefix}/libexec/apache
38                system "install -m 755 ${worksrcpath}/mod_hfs_apple.so ${destroot}${prefix}/libexec/apache/"
39        } else {
40                file mkdir ${destroot}${prefix}/apache/libexec
41                system "install -m 755 ${worksrcpath}/mod_hfs_apple.so ${destroot}${prefix}/apache/libexec/"
42        }
43}
44
45post-destroot {
46        system "apxs -i -a -n \"hfs_apple\"     ${worksrcpath}/mod_hfs_apple.so"
47}