1 | # $Id: Portfile,v 1.28 2005/08/26 19:08:08 toby Exp $ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | |
---|
5 | name fortune |
---|
6 | version 4.6.2-RELEASE |
---|
7 | revision 5 |
---|
8 | categories games |
---|
9 | maintainers toby@opendarwin.org |
---|
10 | description Infamous electronic fortune-cookie generator |
---|
11 | long_description ${description} |
---|
12 | platforms darwin |
---|
13 | use_bzip2 yes |
---|
14 | |
---|
15 | master_sites \ |
---|
16 | opendarwin \ |
---|
17 | |
---|
18 | distfiles \ |
---|
19 | ${distname}${extract.suffix} \ |
---|
20 | |
---|
21 | checksums \ |
---|
22 | ${distname}${extract.suffix} md5 99166e1c47d4b60c865a31d59d359b16 \ |
---|
23 | |
---|
24 | extract.only ${name}-${version}.tar.bz2 |
---|
25 | depends_lib lib:libcompat.1:libcompat |
---|
26 | worksrcdir ${name} |
---|
27 | dist_subdir ${name} |
---|
28 | |
---|
29 | patchfiles \ |
---|
30 | patch-fortune-Makefile patch-strfile-Makefile \ |
---|
31 | patch-unstr-Makefile patch-datfiles-Makefile \ |
---|
32 | patch-fortune.c patch-strfile.c |
---|
33 | |
---|
34 | configure { |
---|
35 | cd ${worksrcpath}/fortune |
---|
36 | reinplace "s|/usr|${prefix}|" pathnames.h |
---|
37 | reinplace "s|/usr/share|${prefix}/share|" fortune.6 |
---|
38 | reinplace "s|/usr/games/fortune|${prefix}/bin/fortune|" fortune.6 |
---|
39 | reinplace "s|XXPREFIX|${prefix}|" Makefile |
---|
40 | } |
---|
41 | |
---|
42 | build.type bsd |
---|
43 | |
---|
44 | set datfiles "fortunes fortunes.dat fortunes-o fortunes-o.dat fortunes2 \ |
---|
45 | fortunes2.dat fortunes2-o fortunes2-o.dat limerick \ |
---|
46 | limerick.dat murphy murphy.dat murphy-o murphy-o.dat \ |
---|
47 | startrek startrek.dat zippy zippy.dat" |
---|
48 | |
---|
49 | post-extract { |
---|
50 | cd ${worksrcpath} |
---|
51 | } |
---|
52 | |
---|
53 | destroot { |
---|
54 | xinstall -m 755 -d ${destroot}${prefix}/share/games/fortune |
---|
55 | xinstall -m 755 ${worksrcpath}/fortune/fortune \ |
---|
56 | ${worksrcpath}/strfile/strfile ${worksrcpath}/unstr/unstr \ |
---|
57 | ${destroot}${prefix}/bin |
---|
58 | xinstall -m 644 ${worksrcpath}/fortune/fortune.6.gz \ |
---|
59 | ${destroot}${prefix}/share/man/man6 |
---|
60 | xinstall -m 644 ${worksrcpath}/strfile/strfile.8.gz \ |
---|
61 | ${destroot}${prefix}/share/man/man8 |
---|
62 | xinstall -m 644 ${worksrcpath}/strfile/strfile.8.gz \ |
---|
63 | ${destroot}${prefix}/share/man/man8/unstr.8.gz |
---|
64 | |
---|
65 | foreach datfile $datfiles { |
---|
66 | file copy ${worksrcpath}/datfiles/${datfile} \ |
---|
67 | ${destroot}/${prefix}/share/games/fortune |
---|
68 | } |
---|
69 | } |
---|