blob: ee5578f8b97ead94707c0fe651988f3e9b5aad35 [file] [log] [blame]
DESCRIPTION = "Transmission is a fast, easy, and free BitTorrent client"
SECTION = "network"
HOMEPAGE = "https://transmissionbt.com/"
LICENSE = "GPL-2.0"
LIC_FILES_CHKSUM = "file://COPYING;md5=0dd9fcdc1416ff123c41c785192a1895"
DEPENDS = "curl libevent gnutls openssl libtool intltool-native glib-2.0-native"
RDEPENDS_${PN}-web = "${PN}"
SRC_URI = " \
git://github.com/transmission/transmission \
file://0001-configure.ac-Fix-no-libsystemd-daemon.patch \
file://transmission-daemon \
"
# Transmission release 2.94
SRCREV = "d8e60ee44f4295935bd98bf741f85ed19f5a7dfb"
PV = "2.94"
S = "${WORKDIR}/git"
inherit autotools gettext update-rc.d systemd mime-xdg features_check
PACKAGECONFIG = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'gtk', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd','',d)}"
PACKAGECONFIG[gtk] = " --with-gtk,--without-gtk,gtk+3,"
PACKAGECONFIG[systemd] = "--with-systemd-daemon,--without-systemd-daemon,systemd,"
# Weak default values for transmission user and group
# Change them in bbappend if needed
TRANSMISSION_USER ??= "root"
TRANSMISSION_GROUP ??= "root"
# Configure aborts with:
# config.status: error: po/Makefile.in.in was not created by intltoolize.
B = "${S}"
do_configure_prepend() {
sed -i /AM_GLIB_GNU_GETTEXT/d ${S}/configure.ac
cd ${S}
./update-version-h.sh
intltoolize --copy --force --automake
}
do_install_append() {
if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
sed -i '/USERNAME=/c\USERNAME=${TRANSMISSION_USER}' ${WORKDIR}/transmission-daemon
install -d ${D}${sysconfdir}/init.d
install -m 0744 ${WORKDIR}/transmission-daemon ${D}${sysconfdir}/init.d/
chown ${TRANSMISSION_USER}:${TRANSMISSION_GROUP} ${D}${sysconfdir}/init.d/transmission-daemon
fi
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
sed -i '/User=/c\User=${TRANSMISSION_USER}' ${S}/daemon/transmission-daemon.service
install -d ${D}${systemd_unitdir}/system
install -m 0644 ${S}/daemon/transmission-daemon.service ${D}${systemd_unitdir}/system
fi
}
PACKAGES += "${PN}-gtk ${PN}-client ${PN}-web"
FILES_${PN}-client = "${bindir}/transmission-remote ${bindir}/transmission-cli ${bindir}/transmission-create ${bindir}/transmission-show ${bindir}/transmission-edit"
FILES_${PN}-gtk += "${bindir}/transmission-gtk ${datadir}/icons ${datadir}/applications ${datadir}/pixmaps"
FILES_${PN}-web = "${datadir}/transmission/web"
FILES_${PN} = "${bindir}/transmission-daemon ${sysconfdir}/init.d/transmission-daemon"
SYSTEMD_SERVICE_${PN} = "transmission-daemon.service"
# Script transmission-daemon following the guidelines in:
# https://trac.transmissionbt.com/wiki/Scripts/initd
INITSCRIPT_PACKAGES = "transmission-daemon"
INITSCRIPT_NAME = "transmission-daemon"
INITSCRIPT_PARAMS = "start 99 5 3 2 . stop 10 0 1 6 ."