void-packages/srcpkgs/transmission/template

66 lines
2.4 KiB
Bash

# Template file for 'transmission'
pkgname=transmission
version=4.0.5
revision=1
build_style=cmake
configure_args="-DENABLE_CLI=ON -DENABLE_GTK=ON -DENABLE_QT=ON -DENABLE_MAC=OFF"
hostmakedepends="autoconf automake intltool glib-devel
libtool pkg-config qt5-host-tools qt5-qmake"
makedepends="dbus-glib-devel gtkmm4-devel glibmm-devel
libcurl-devel libevent-devel qt5-tools-devel qt5-svg-devel
libdeflate-devel miniupnpc-devel"
short_desc="Fast, easy and free BitTorrent client"
maintainer="Jason Elswick <jason@jasondavid.tv>"
license="MIT, GPL-2.0-or-later"
homepage="https://www.transmissionbt.com"
changelog="https://github.com/transmission/transmission/releases"
distfiles="https://github.com/transmission/transmission/releases/download/${version}/${pkgname}-${version}.tar.xz"
checksum=fd68ff114a479200043c30c7e69dba4c1932f7af36ca4c5b5d2edcb5866e6357
# 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_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.svg 644 usr/share/pixmaps transmission-qt.svg
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.svg 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
}
}