/[gentoo-x86]/net-p2p/transmission/transmission-2.50-r1.ebuild
Gentoo

Contents of /net-p2p/transmission/transmission-2.50-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.11 - (show annotations) (download)
Sun May 20 20:51:57 2012 UTC (2 years, 4 months ago) by ssuominen
Branch: MAIN
CVS Tags: HEAD
Changes since 1.10: +1 -1 lines
FILE REMOVED
old

(Portage version: 2.2.0_alpha107/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-p2p/transmission/transmission-2.50-r1.ebuild,v 1.10 2012/05/04 06:33:34 jdhore Exp $
4
5 EAPI=4
6 LANGS="en es kk lt pt_BR ru"
7
8 unset _live_inherits
9
10 if [[ ${PV} == *9999* ]]; then
11 ESVN_REPO_URI="svn://svn.transmissionbt.com/Transmission/trunk"
12 _live_inherits=subversion
13 else
14 SRC_URI="http://download.transmissionbt.com/${PN}/files/${P}.tar.xz"
15 KEYWORDS="amd64 ~arm ~ppc ~ppc64 x86 ~x86-fbsd"
16 fi
17
18 inherit autotools eutils fdo-mime gnome2-utils qt4-r2 ${_live_inherits}
19
20 DESCRIPTION="A Fast, Easy and Free BitTorrent client"
21 HOMEPAGE="http://www.transmissionbt.com/"
22
23 LICENSE="GPL-2 MIT"
24 SLOT="0"
25 IUSE="ayatana gtk lightweight qt4 xfs"
26
27 RDEPEND="
28 >=dev-libs/libevent-2.0.10
29 dev-libs/openssl:0
30 net-libs/libnatpmp
31 >=net-libs/miniupnpc-1.6
32 >=net-misc/curl-7.16.3[ssl]
33 sys-libs/zlib
34 gtk? (
35 >=dev-libs/dbus-glib-0.98
36 >=dev-libs/glib-2.28
37 >=x11-libs/gtk+-3.2:3
38 ayatana? ( dev-libs/libappindicator:3 )
39 )
40 qt4? (
41 x11-libs/qt-core:4
42 x11-libs/qt-gui:4[dbus]
43 )"
44
45 DEPEND="${RDEPEND}
46 dev-util/intltool
47 virtual/pkgconfig
48 sys-devel/gettext
49 virtual/os-headers
50 xfs? ( sys-fs/xfsprogs )"
51
52 REQUIRED_USE="ayatana? ( gtk )"
53
54 DOCS="AUTHORS NEWS qt/README.txt"
55
56 pkg_setup() {
57 enewgroup ${PN}
58 enewuser ${PN} -1 -1 -1 ${PN}
59 }
60
61 src_unpack() {
62 if [[ ${PV} == *9999* ]]; then
63 subversion_src_unpack
64 else
65 default
66 fi
67 }
68
69 src_prepare() {
70 if [[ ${PV} == *9999* ]]; then
71 subversion_src_prepare
72 ./update-version-h.sh
73 fi
74
75 epatch "${FILESDIR}"/${PN}-2.50-build-with-natpmp1.patch #376647
76 epatch "${FILESDIR}"/${PN}-2.50-punt_broken_CXX_check.patch #407137
77
78 sed -i -e '/CFLAGS/s:-ggdb3::' configure.ac
79 use ayatana || sed -i -e '/^LIBAPPINDICATOR_MINIMUM/s:=.*:=9999:' configure.ac
80
81 # http://trac.transmissionbt.com/ticket/4324
82 sed -i -e 's|noinst\(_PROGRAMS = $(TESTS)\)|check\1|' lib${PN}/Makefile.am || die
83
84 eautoreconf
85 intltoolize --copy --force --automake || die
86
87 if use qt4; then
88 cat <<-EOF > "${T}"/${PN}-magnet.protocol
89 [Protocol]
90 exec=${PN}-qt '%u'
91 protocol=magnet
92 Icon=${PN}
93 input=none
94 output=none
95 helper=true
96 listing=
97 reading=false
98 writing=false
99 makedir=false
100 deleting=false
101 EOF
102 fi
103 }
104
105 src_configure() {
106 export ac_cv_header_xfs_xfs_h=$(usex xfs)
107
108 econf \
109 --enable-external-natpmp \
110 $(use_enable lightweight) \
111 $(use_with gtk)
112
113 if use qt4; then
114 pushd qt >/dev/null
115 eqmake4 qtr.pro
116 popd >/dev/null
117 fi
118 }
119
120 src_compile() {
121 default
122
123 if use qt4; then
124 pushd qt >/dev/null
125 emake
126
127 local l
128 for l in ${LANGS}; do
129 if use linguas_${l}; then
130 lrelease translations/${PN}_${l}.ts
131 fi
132 done
133 popd >/dev/null
134 fi
135 }
136
137 src_install() {
138 default
139
140 rm -f "${ED}"/usr/share/${PN}/web/LICENSE
141
142 newinitd "${FILESDIR}"/${PN}-daemon.initd.8 ${PN}-daemon
143 newconfd "${FILESDIR}"/${PN}-daemon.confd.3 ${PN}-daemon
144
145 keepdir /var/{${PN}/{config,downloads},log/${PN}}
146 fowners -R ${PN}:${PN} /var/{${PN}/{,config,downloads},log/${PN}}
147
148 if use qt4; then
149 pushd qt >/dev/null
150 emake INSTALL_ROOT="${D}"/usr install
151
152 domenu ${PN}-qt.desktop
153
154 local res
155 for res in 16 22 24 32 48; do
156 insinto /usr/share/icons/hicolor/${res}x${res}/apps
157 newins icons/hicolor_apps_${res}x${res}_${PN}.png ${PN}-qt.png
158 done
159
160 insinto /usr/share/kde4/services
161 doins "${T}"/${PN}-magnet.protocol
162
163 insinto /usr/share/qt4/translations
164 local l
165 for l in ${LANGS}; do
166 if use linguas_${l}; then
167 doins translations/${PN}_${l}.qm
168 fi
169 done
170 popd >/dev/null
171 fi
172 }
173
174 pkg_preinst() {
175 gnome2_icon_savelist
176 }
177
178 pkg_postinst() {
179 fdo-mime_desktop_database_update
180 gnome2_icon_cache_update
181
182 elog "If you use ${PN}-daemon, please, set 'rpc-username' and"
183 elog "'rpc-password' (in plain text, ${PN}-daemon will hash it on"
184 elog "start) in settings.json file located at /var/${PN}/config or"
185 elog "any other appropriate config directory."
186 elog
187 elog "Since µTP is enabled by default, ${PN} needs large kernel buffers for"
188 elog "the UDP socket. You can append following lines into /etc/sysctl.conf:"
189 elog " net.core.rmem_max = 4194304"
190 elog " net.core.wmem_max = 1048576"
191 elog "and run sysctl -p"
192 }
193
194 pkg_postrm() {
195 fdo-mime_desktop_database_update
196 gnome2_icon_cache_update
197 }

  ViewVC Help
Powered by ViewVC 1.1.20