void-packages/srcpkgs/transmission/template

95 lines
2.8 KiB
Text
Raw Normal View History

# Template file for 'transmission'
pkgname=transmission
2014-07-09 22:58:28 +00:00
version=2.84
2014-10-13 12:53:31 +00:00
revision=5
build_style=gnu-configure
2011-11-15 19:03:05 +00:00
configure_args="--enable-nls --enable-cli --enable-daemon --enable-utp"
hostmakedepends="pkg-config intltool"
2014-07-14 09:56:36 +00:00
makedepends="zlib-devel libressl-devel dbus-glib-devel libcurl-devel libevent-devel gtk+3-devel"
short_desc="A fast, easy, and free BitTorrent client"
maintainer="Juan RP <xtraeme@gmail.com>"
2011-08-18 19:04:21 +00:00
homepage="http://www.transmissionbt.com/"
license="MIT, GPL-2"
distfiles="http://download.transmissionbt.com/files/$pkgname-$version.tar.xz"
2014-07-09 22:58:28 +00:00
checksum=a9fc1936b4ee414acc732ada04e84339d6755cd0d097bcbd11ba2cfc540db9eb
# Create transmission system user/group
2014-08-12 07:17:41 +00:00
system_accounts="transmission"
transmission_homedir="/var/lib/transmission"
make_dirs="/var/lib/transmission 0755 transmission transmission"
2014-10-13 12:53:31 +00:00
subpackages="transmission-gtk"
replaces="runit-void<20141013_2"
# Package build options
build_options="systemd"
if [ "$build_option_systemd" ]; then
configure_args+=" --with-systemd-daemon"
makedepends+=" systemd-devel"
systemd_services="transmission-daemon.service on"
fi
if [ -z "$CROSS_BUILD" ]; then
makedepends+=" qt-devel"
2014-10-13 12:53:31 +00:00
subpackages+=" transmission-qt"
fi
do_build() {
2014-06-04 15:07:25 +00:00
make CXXFLAGS="${CXXFLAGS} -std=c++11" LDFLAGS="${LDFLAGS}" ${makejobs}
if [ -z "$CROSS_BUILD" ]; then
# Build the Qt frontend
cd qt
qmake qtr.pro
lrelease translations/*.ts
make CXXFLAGS="${CXXFLAGS} -std=c++11" LDFLAGS="${LDFLAGS}" ${makejobs}
fi
}
do_install() {
# Install CLI tools, daemon and web client
for dir in cli daemon utils web; do
make -C ${dir} DESTDIR=${DESTDIR} install
done
# Install GTK+ frontend
make -C gtk DESTDIR=${DESTDIR} install
make -C po DESTDIR=${DESTDIR} install
if [ -z "$CROSS_BUILD" ]; then
# Install Qt frontend
make -C qt INSTALL_ROOT=${DESTDIR}/usr install
vmkdir usr/share/qt4/translations
vcopy qt/translations/*.qm usr/share/qt4/translations
fi
}
post_install() {
rm -f ${DESTDIR}/usr/share/${pkgname}/web/LICENSE
if [ "$build_option_systemd" ]; then
vinstall daemon/transmission-daemon.service 644 usr/lib/systemd/system
fi
2014-10-13 12:53:31 +00:00
vsv transmission-daemon
}
transmission-qt_package() {
depends="${sourcepkg}>=${version}_${revision} desktop-file-utils"
short_desc+=" - Qt frontend"
pkg_install() {
vmove usr/bin/transmission-qt
vmove usr/share/man/man1/transmission-qt.1
vmove usr/share/qt4/translations
vinstall ${wrksrc}/qt/icons/transmission.png 644 usr/share/pixmaps transmission-qt.png
vinstall ${wrksrc}/qt/transmission-qt.desktop 644 usr/share/applications
}
}
transmission-gtk_package() {
depends="${sourcepkg}>=${version}_${revision} hicolor-icon-theme desktop-file-utils"
2013-06-27 07:33:11 +00:00
short_desc+=" - GTK+ frontend"
pkg_install() {
vmove usr/bin/transmission-gtk
vmove usr/share/man/man1/transmission-gtk.1
vmove usr/share/icons/hicolor
vmove usr/share/applications
vmove usr/share/pixmaps
vmove usr/share/locale
}
}