71 lines
2.5 KiB
Bash
71 lines
2.5 KiB
Bash
# Template file for 'transmission'
|
|
pkgname=transmission
|
|
version=3.00
|
|
revision=4
|
|
build_style=cmake
|
|
configure_args="-DENABLE_CLI=ON"
|
|
hostmakedepends="autoconf automake intltool glib-devel
|
|
libtool pkg-config qt5-host-tools qt5-qmake"
|
|
makedepends="dbus-glib-devel gtk+3-devel
|
|
libcurl-devel libevent-devel qt5-tools-devel"
|
|
short_desc="Fast, easy and free BitTorrent client"
|
|
maintainer="Orphaned <orphan@voidlinux.org>"
|
|
license="MIT, GPL-2.0-or-later"
|
|
homepage="https://www.transmissionbt.com"
|
|
distfiles="https://github.com/transmission/transmission-releases/raw/master/${pkgname}-${version}.tar.xz"
|
|
checksum=9144652fe742f7f7dd6657716e378da60b751aaeda8bef8344b3eefc4db255f2
|
|
|
|
# Create transmission system user/group
|
|
system_accounts="transmission"
|
|
transmission_homedir="/var/lib/transmission"
|
|
make_dirs="/var/lib/transmission 0755 transmission transmission"
|
|
|
|
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
|
|
makedepends+=" musl-legacy-compat"
|
|
fi
|
|
|
|
post_configure() {
|
|
# Add missing includes which happen as side-effects with glibc
|
|
sed -i libtransmission/transmission.h \
|
|
-e "/#include <inttypes.h>.*/i #include <sys/types.h> /* ssize_t */" \
|
|
-e "/#include <inttypes.h>.*/i #include <stdio.h> /* off_t */"
|
|
}
|
|
|
|
post_install() {
|
|
rm -f ${DESTDIR}/usr/share/${pkgname}/web/LICENSE
|
|
vsv transmission-daemon
|
|
vlicense COPYING
|
|
}
|
|
|
|
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/transmission/translations
|
|
sed -i '/Icon=/s/transmission/&-qt/' ${DESTDIR}/usr/share/applications/transmission-qt.desktop
|
|
vinstall ${wrksrc}/qt/icons/transmission.png 644 usr/share/pixmaps transmission-qt.png
|
|
vinstall ${wrksrc}/gtk/icons/hicolor_apps_scalable_transmission.svg \
|
|
644 usr/share/icons/hicolor/scalable/apps transmission-qt.svg
|
|
vmove usr/share/applications/transmission-qt.desktop
|
|
}
|
|
}
|
|
|
|
transmission-gtk_package() {
|
|
depends="${sourcepkg}>=${version}_${revision} hicolor-icon-theme desktop-file-utils"
|
|
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/transmission-gtk.desktop
|
|
vinstall ${wrksrc}/qt/icons/transmission.png 644 usr/share/pixmaps
|
|
# This install path seems to be used with musl libc
|
|
if [ -d ${DESTDIR}/usr/lib/locale ]; then
|
|
mv ${DESTDIR}/usr/lib/locale ${DESTDIR}/usr/share
|
|
fi
|
|
vmove usr/share/locale
|
|
}
|
|
}
|