Ticket #6012: Portfile

File Portfile, 5.3 KB (added by gertce@…, 19 years ago)

Portfile with fixed urls

Line 
1# $Id: Portfile,v 1.28 2005/08/26 19:08:08 toby Exp $
2
3PortSystem 1.0
4
5name                    fortune
6version                 4.6.2-RELEASE
7revision                6
8categories              games
9maintainers             toby@opendarwin.org
10description             Infamous electronic fortune-cookie generator
11long_description        ${description}
12platforms               darwin
13use_bzip2               yes
14
15
16# splitbrain reorganised
17
18master_sites    \
19                opendarwin \
20                http://www.splitbrain.org/_media/projects/fortunes/:starwars \
21                http://www.splitbrain.org/_media/projects/fortunes/: hitchhiker \
22                http://www.splitbrain.org/_media/projects/fortunes/:fgump \
23                http://www.splitbrain.org/_media/projects/fortunes/:xfiles \
24                http://www.netmeister.org/apps/:netmeister \
25                http://www.cs.indiana.edu/~crcarter/homer/:homer \
26                http://www.splitbrain.org/_media/projects/fortunes/:chalkboard \
27                http://www.splitbrain.org/_media/projects/fortunes/:discworld \
28                http://homepage.mac.com/css/code:farscape \
29                http://www.pinkemostar.com/files/:
30
31distfiles       \
32                ${distname}${extract.suffix} \
33                fortune-starwars.tgz:starwars \
34                fortune-hitchhiker.tgz:hitchhiker \
35                fortune-fgump.tgz:fgump \
36                fortune-xfiles.tgz:xfiles \
37                fortune-mod-futurama-0.2.tar.gz:netmeister \
38                fortune-mod-calvin-0.1.1.tar.gz:netmeister \
39                homer-quotes.tar.gz:homer \
40                ralph-quotes.tar.gz \
41                cbg-quotes.tar.gz \
42                fortune-simpsons-chalkboard.tgz:chalkboard \
43                farscape-quotes.tar.gz:farscape \
44    fortune-discworld.tgz:discworld
45
46checksums       \
47                ${distname}${extract.suffix} md5 99166e1c47d4b60c865a31d59d359b16 \
48                fortune-starwars.tgz md5 2f4443470a5d7bcb7c5efde501f8e6f5 \
49                fortune-mod-futurama-0.2.tar.gz md5 6fd2cfa2fd8285ff5aabb5e1236107bf \
50                fortune-fgump.tgz md5 d9d8e6ba103898e2fe6736378d352398 \
51                fortune-mod-calvin-0.1.1.tar.gz md5 e0dc2036b731aafdee4989e9d1d8ec2a \
52                homer-quotes.tar.gz md5 ca7ed106f5e828f826eea1d759e00fa0 \
53                ralph-quotes.tar.gz md5 9fcdffff609dc5524ee9999846a40bf0 \
54                cbg-quotes.tar.gz md5 6de1139cf55bb71758ba9e3a01f05354 \
55                fortune-simpsons-chalkboard.tgz md5 1602ec6df3336a7e01f857b8419c8df1 \
56                fortune-xfiles.tgz md5 dfbe17a0b0b78e5914d0838852becb7b \
57                fortune-hitchhiker.tgz md5 257df9a3f63db9f2e7c27369006812a3 \
58                fortune-discworld.tgz md5 4e00763163ae6ca76f7f23e435edbe08 \
59                farscape-quotes.tar.gz md5 36ed384fa254918ef7199a7686260190
60
61extract.only    ${name}-${version}.tar.bz2
62depends_lib             lib:libcompat.1:libcompat
63worksrcdir              ${name}
64# Need another distdir as fortune-hitchhiker.tgz was updated (duh!)
65dist_subdir             ${name}-20050807
66
67patchfiles      \
68                patch-fortune-Makefile patch-strfile-Makefile \
69                patch-unstr-Makefile patch-datfiles-Makefile \
70                patch-fortune.c patch-strfile.c
71
72configure {
73        cd ${worksrcpath}/fortune
74        reinplace "s|/usr|${prefix}|" pathnames.h
75        reinplace "s|/usr/share|${prefix}/share|" fortune.6
76        reinplace "s|/usr/games/fortune|${prefix}/bin/fortune|" fortune.6
77        reinplace "s|XXPREFIX|${prefix}|" Makefile
78}
79
80build.type              bsd
81
82set datfiles "fortunes fortunes.dat fortunes-o fortunes-o.dat fortunes2 \
83                fortunes2.dat fortunes2-o fortunes2-o.dat limerick \
84                limerick.dat murphy murphy.dat murphy-o murphy-o.dat \
85                startrek startrek.dat zippy zippy.dat"
86set datfiles "${datfiles} starwars starwars.dat"
87set datfiles "${datfiles} hitchhiker hitchhiker.dat"
88set datfiles "${datfiles} fgump fgump.dat"
89set datfiles "${datfiles} xfiles xfiles.dat"
90set datfiles "${datfiles} futurama futurama.dat"
91set datfiles "${datfiles} calvin calvin.dat"
92set datfiles "${datfiles} cbg cbg.dat homer homer.dat \
93                  ralph ralph.dat chalkboard chalkboard.dat"
94set datfiles "${datfiles} discworld discworld.dat"
95set datfiles "${datfiles} farscape farscape.dat"
96
97post-extract {
98        cd ${worksrcpath}
99        system "tar xfz ${distpath}/fortune-starwars.tgz"
100        system "cp fortune-starwars/* datfiles"
101        system "tar xfz ${distpath}/fortune-hitchhiker.tgz"
102        system "cp fortune-hitchhiker/* datfiles"
103        system "tar xfz ${distpath}/fortune-fgump.tgz"
104        system "cp fortune-fgump/* datfiles"
105        system "tar xfz ${distpath}/fortune-xfiles.tgz"
106        system "cp fortune-xfiles/* datfiles"
107        system "tar xfz ${distpath}/fortune-mod-futurama-0.2.tar.gz"
108        system "cp fortune-mod-futurama-0.2/* datfiles"
109        system "tar xfz ${distpath}/fortune-mod-calvin-0.1.1.tar.gz"
110        file copy fortune-mod-calvin-0.1.1/calvin datfiles
111        file copy fortune-mod-calvin-0.1.1/calvin.dat datfiles
112        system "tar xfz ${distpath}/homer-quotes.tar.gz"
113        system "cp fortune-homer/* datfiles"
114        system "tar xfz ${distpath}/ralph-quotes.tar.gz"
115        system "cp ralph ralph.dat datfiles"
116        system "tar xfz ${distpath}/cbg-quotes.tar.gz"
117        system "cp cbg cbg.dat datfiles"
118        system "tar xfz ${distpath}/fortune-simpsons-chalkboard.tgz"
119        system "cp fortune-simpsons-chalkboard/* datfiles"
120        system "tar xfz ${distpath}/fortune-discworld.tgz"
121        system "cp fortune-discworld/* datfiles"
122        system "tar xfz ${distpath}/farscape-quotes.tar.gz"
123        system "cp farscape-quotes/* datfiles"
124}
125
126destroot {
127        xinstall -m 755 -d ${destroot}${prefix}/share/games/fortune
128        xinstall -m 755 ${worksrcpath}/fortune/fortune \
129                ${worksrcpath}/strfile/strfile ${worksrcpath}/unstr/unstr \
130                ${destroot}${prefix}/bin
131        xinstall -m 644 ${worksrcpath}/fortune/fortune.6.gz \
132                ${destroot}${prefix}/share/man/man6
133        xinstall -m 644 ${worksrcpath}/strfile/strfile.8.gz \
134                ${destroot}${prefix}/share/man/man8
135        xinstall -m 644 ${worksrcpath}/strfile/strfile.8.gz \
136                ${destroot}${prefix}/share/man/man8/unstr.8.gz
137       
138        foreach datfile $datfiles {
139                file copy ${worksrcpath}/datfiles/${datfile} \
140                        ${destroot}/${prefix}/share/games/fortune
141        }
142}