Ticket #29417: Portfile.3

File Portfile.3, 3.3 KB (added by tael67@…, 8 years ago)

Added bundle and beta variants

Line 
1# $Id: Portfile 78512 2011-05-10 12:57:07Z ryandesign@macports.org $
2
3PortSystem      1.0
4
5name            transmission-x11
6version         2.22
7revision        0
8svn.revision    12099
9categories      net x11
10maintainers     gmail.com:tael67 openmaintainer
11description     Lightweight BitTorrent client
12long_description Transmission is a free, lightweight BitTorrent client. \
13                It features a simple, intuitive interface on top of an \
14                efficient, cross-platform back-end. Transmission is open \
15                source (MIT license) and runs on Mac OS X (Cocoa interface), \
16                Linux/NetBSD/FreeBSD/OpenBSD (GTK+ interface) and BeOS \
17                (native interface). This is the GTK+ version.
18license         GPL2 MIT
19homepage        http://www.transmissionbt.com/
20distname        transmission-${version}
21dist_subdir     transmission
22master_sites    http://download.m0k.org/transmission/files/
23checksums       sha1     ddd515bdcc201193b45f58b705f6e8fde9fcb5d1 \
24                                rmd160   e87b560f81fc8bc422dc7071a4b27bdcf2b2d6ac
25use_bzip2       yes
26platforms       darwin freebsd
27
28depends_lib     port:openssl \
29                port:curl
30depends_build   port:gsed \
31                port:intltool
32
33configure.args  --enable-daemon \
34                --enable-cli \
35                --disable-wx \
36                --disable-mac \
37                --disable-gtk \
38                --disable-libnotify
39
40variant gtk description {Build Gtk front-end} {
41  depends_lib-append    port:gtk2 \
42                        port:dbus-glib
43  configure.args-delete --disable-gtk
44  configure.args-append --enable-gtk
45}
46
47variant beta description {Install the last beta (2.30b4)} {
48   version          2.30b4
49   svn.revision     12406
50   checksums        sha1        5e0bf01705c06f2090cfde19f2facb8e70645a01 \
51                    rmd160      fe2280be5990d1fe43759cadc83ab147d45063d6
52   distname         transmission-${version}
53}
54
55variant bundle requires gtk description {Add an OSX application bundle in the Applications folder} {
56    patchfiles          patch-macosx-Info.plist.diff
57    post-destroot {
58       reinplace "s|@PREFIX@|${prefix}|g" ${portpath}/${filesdir}/launch
59       reinplace "s|VERSION_STRING_INFOPLIST|${version}|g" ${worksrcpath}/macosx/Info.plist
60       reinplace "s|SVN_REVISION_NUM|${svn.revision}|g" ${worksrcpath}/macosx/Info.plist
61       file mkdir ${destroot}${prefix}/Applications/Transmission-GTK.app/Contents/MacOS/
62       file mkdir ${destroot}${prefix}/Applications/Transmission-GTK.app/Contents/Resources/
63       xinstall ${worksrcpath}/macosx/Info.plist ${destroot}${prefix}/Applications/Transmission-GTK.app/Contents/Info.plist
64       xinstall ${worksrcpath}/macosx/Images/Transmission.icns ${destroot}${prefix}/Applications/Transmission-GTK.app/Contents/Resources/Transmission.icns
65       xinstall ${worksrcpath}/macosx/Images/TransmissionDocument.icns ${destroot}${prefix}/Applications/Transmission-GTK.app/Contents/Resources/TransmissionDocument.icns
66           xinstall ${worksrcpath}/macosx/Info.plist ${destroot}${prefix}/Applications/Transmission-GTK.app/Contents/Info.plist
67           xinstall ${portpath}/${filesdir}/launch ${destroot}${prefix}/Applications/Transmission-GTK.app/Contents/MacOS/Transmission
68    }
69
70}
71
72
73livecheck.type  regex
74livecheck.url   ${master_sites}
75livecheck.regex "transmission-(\\d+(?:\\.\\d+)*)${extract.suffix}"