Ticket #33011: transmission-Portfile-subport

File transmission-Portfile-subport, 2.7 KB (added by jon.olsson@…, 12 years ago)
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
2# $Id: Portfile 86253 2011-10-24 00:32:46Z ryandesign@macports.org $
3
4PortSystem      1.0
5PortGroup       xcode 1.0
6
7name            transmission
8version         2.42
9maintainers     mnick openmaintainer
10license         MIT GPL-2
11
12description     Lightweight BitTorrent client
13long_description \
14    Transmission is a free, lightweight BitTorrent client. \
15    It features a simple, intuitive interface on top of an \
16    efficient, cross-platform back-end. Transmission is open \
17    source (MIT license) and runs on Mac OS X (Cocoa interface), \
18    Linux/NetBSD/FreeBSD/OpenBSD (GTK+ interface) and BeOS \
19    (native interface). \
20    This is the Cocoa version.
21homepage        http://www.transmissionbt.com/
22
23master_sites    http://download.m0k.org/transmission/files/ \
24                http://download.transmissionbt.com/files/
25
26checksums       md5     2ade0818d465779bd956b8b72ea56b02 \
27                sha1    744068c76f68c141d2aada689bc49a5b56cd618b \
28                rmd160  83f380f0b4f63e52c129c906dc8e8e4649e04c5c
29
30use_bzip2       yes
31
32patchfiles      patch-xcodebuild.diff patch-sparkle.diff
33platforms       macosx
34
35depends_lib     port:gettext \
36                port:libevent
37
38if {${name} == ${subport}} {
39    platforms               macosx
40    categories              net
41
42    xcode.target            transmission-daemon transmission-remote
43    xcode.configuration     Release
44
45    destroot {
46        xinstall -m 755 -W ${worksrcpath}/build/${xcode.configuration} \
47            transmission-daemon transmission-remote \
48            ${destroot}${prefix}/bin
49
50        xinstall -m 644 -W ${worksrcpath}/daemon \
51            transmission-daemon.1 transmission-remote.1 \
52            ${destroot}${prefix}/share/man/man1
53    }
54} else {
55    categories              net aqua
56 
57    pre-patch {
58        reinplace -E "s%third-party/(curl|libevent|openssl)/(include|lib)%@@PREFIX@@/\\2%g" \
59            ${worksrcpath}/Transmission.xcodeproj/project.pbxproj
60    }
61
62    post-patch {
63        reinplace -E "s|@@PREFIX@@|${prefix}|g" \
64            ${worksrcpath}/Transmission.xcodeproj/project.pbxproj
65    }
66
67    destroot {
68        file copy ${worksrcpath}/build/${xcode.configuration}/Transmission.app \
69            ${destroot}${applications_dir}/Transmission.app
70    }
71}
72
73subport ${name}-server {
74    xcode.target            Transmission
75    xcode.configuration     Release
76}
77
78if {${os.major} < 11} {
79    pre-fetch {
80        ui_error "${name} ${version} requires Mac OS X 10.7 or greater."
81        return -code error "incompatible Mac OS X version"
82    }
83}
84
85livecheck.url       ${homepage}/download.php
86livecheck.regex     The current release version is <b>(.*)</b>