blob: ee5578f8b97ead94707c0fe651988f3e9b5aad35 [file] [log] [blame]
Andrew Geissler2ee498a2020-05-29 15:52:06 -05001DESCRIPTION = "Transmission is a fast, easy, and free BitTorrent client"
2SECTION = "network"
3HOMEPAGE = "https://transmissionbt.com/"
4LICENSE = "GPL-2.0"
5LIC_FILES_CHKSUM = "file://COPYING;md5=0dd9fcdc1416ff123c41c785192a1895"
6
7DEPENDS = "curl libevent gnutls openssl libtool intltool-native glib-2.0-native"
8RDEPENDS_${PN}-web = "${PN}"
9
10SRC_URI = " \
11 git://github.com/transmission/transmission \
12 file://0001-configure.ac-Fix-no-libsystemd-daemon.patch \
13 file://transmission-daemon \
14"
15
16# Transmission release 2.94
17SRCREV = "d8e60ee44f4295935bd98bf741f85ed19f5a7dfb"
18PV = "2.94"
19
20S = "${WORKDIR}/git"
21
22inherit autotools gettext update-rc.d systemd mime-xdg features_check
23
24PACKAGECONFIG = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'gtk', '', d)} \
25 ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd','',d)}"
26
27PACKAGECONFIG[gtk] = " --with-gtk,--without-gtk,gtk+3,"
28PACKAGECONFIG[systemd] = "--with-systemd-daemon,--without-systemd-daemon,systemd,"
29
30# Weak default values for transmission user and group
31# Change them in bbappend if needed
32TRANSMISSION_USER ??= "root"
33TRANSMISSION_GROUP ??= "root"
34
35# Configure aborts with:
36# config.status: error: po/Makefile.in.in was not created by intltoolize.
37B = "${S}"
38do_configure_prepend() {
39 sed -i /AM_GLIB_GNU_GETTEXT/d ${S}/configure.ac
40 cd ${S}
41 ./update-version-h.sh
42 intltoolize --copy --force --automake
43}
44
45do_install_append() {
46 if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
47 sed -i '/USERNAME=/c\USERNAME=${TRANSMISSION_USER}' ${WORKDIR}/transmission-daemon
48 install -d ${D}${sysconfdir}/init.d
49 install -m 0744 ${WORKDIR}/transmission-daemon ${D}${sysconfdir}/init.d/
50 chown ${TRANSMISSION_USER}:${TRANSMISSION_GROUP} ${D}${sysconfdir}/init.d/transmission-daemon
51 fi
52
53 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
54 sed -i '/User=/c\User=${TRANSMISSION_USER}' ${S}/daemon/transmission-daemon.service
55 install -d ${D}${systemd_unitdir}/system
56 install -m 0644 ${S}/daemon/transmission-daemon.service ${D}${systemd_unitdir}/system
57 fi
58}
59
60PACKAGES += "${PN}-gtk ${PN}-client ${PN}-web"
61
62FILES_${PN}-client = "${bindir}/transmission-remote ${bindir}/transmission-cli ${bindir}/transmission-create ${bindir}/transmission-show ${bindir}/transmission-edit"
63FILES_${PN}-gtk += "${bindir}/transmission-gtk ${datadir}/icons ${datadir}/applications ${datadir}/pixmaps"
64FILES_${PN}-web = "${datadir}/transmission/web"
65FILES_${PN} = "${bindir}/transmission-daemon ${sysconfdir}/init.d/transmission-daemon"
66
67SYSTEMD_SERVICE_${PN} = "transmission-daemon.service"
68
69# Script transmission-daemon following the guidelines in:
70# https://trac.transmissionbt.com/wiki/Scripts/initd
71INITSCRIPT_PACKAGES = "transmission-daemon"
72INITSCRIPT_NAME = "transmission-daemon"
73INITSCRIPT_PARAMS = "start 99 5 3 2 . stop 10 0 1 6 ."