blob: 57267a8de83da8cc47e2080a7395ef32a9090778 [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"
Andrew Geisslerbbbd5f42020-10-30 15:42:48 -05005LIC_FILES_CHKSUM = "file://COPYING;md5=73f535ddffcf2a0d3af4f381f84f9b33"
Andrew Geissler2ee498a2020-05-29 15:52:06 -05006
7DEPENDS = "curl libevent gnutls openssl libtool intltool-native glib-2.0-native"
8RDEPENDS_${PN}-web = "${PN}"
9
10SRC_URI = " \
Andrew Geisslerbbbd5f42020-10-30 15:42:48 -050011 gitsm://github.com/transmission/transmission \
Andrew Geissler2ee498a2020-05-29 15:52:06 -050012 file://transmission-daemon \
13"
14
Andrew Geisslerbbbd5f42020-10-30 15:42:48 -050015# Transmission release 3.00
16SRCREV = "bb6b5a062ee594dfd4b7a12a6b6e860c43849bfd"
17PV = "3.00"
Andrew Geissler2ee498a2020-05-29 15:52:06 -050018
19S = "${WORKDIR}/git"
20
Andrew Geisslerac970dd2021-02-12 15:32:45 -060021inherit autotools-brokensep gettext update-rc.d systemd mime-xdg
Andrew Geissler2ee498a2020-05-29 15:52:06 -050022
23PACKAGECONFIG = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'gtk', '', d)} \
24 ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd','',d)}"
25
26PACKAGECONFIG[gtk] = " --with-gtk,--without-gtk,gtk+3,"
Andrew Geisslerbbbd5f42020-10-30 15:42:48 -050027PACKAGECONFIG[systemd] = "--with-systemd,--without-systemd,systemd,"
Andrew Geissler2ee498a2020-05-29 15:52:06 -050028
29# Weak default values for transmission user and group
30# Change them in bbappend if needed
31TRANSMISSION_USER ??= "root"
32TRANSMISSION_GROUP ??= "root"
33
34# Configure aborts with:
35# config.status: error: po/Makefile.in.in was not created by intltoolize.
Andrew Geisslerac970dd2021-02-12 15:32:45 -060036do_configure() {
Andrew Geissler2ee498a2020-05-29 15:52:06 -050037 sed -i /AM_GLIB_GNU_GETTEXT/d ${S}/configure.ac
38 cd ${S}
39 ./update-version-h.sh
40 intltoolize --copy --force --automake
Andrew Geisslerac970dd2021-02-12 15:32:45 -060041 aclocal
42 libtoolize --automake --copy --force
43 autoconf
44 automake -a
45 oe_runconf
Andrew Geissler2ee498a2020-05-29 15:52:06 -050046}
47
48do_install_append() {
49 if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
50 sed -i '/USERNAME=/c\USERNAME=${TRANSMISSION_USER}' ${WORKDIR}/transmission-daemon
51 install -d ${D}${sysconfdir}/init.d
52 install -m 0744 ${WORKDIR}/transmission-daemon ${D}${sysconfdir}/init.d/
53 chown ${TRANSMISSION_USER}:${TRANSMISSION_GROUP} ${D}${sysconfdir}/init.d/transmission-daemon
54 fi
55
56 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
57 sed -i '/User=/c\User=${TRANSMISSION_USER}' ${S}/daemon/transmission-daemon.service
58 install -d ${D}${systemd_unitdir}/system
59 install -m 0644 ${S}/daemon/transmission-daemon.service ${D}${systemd_unitdir}/system
60 fi
61}
62
63PACKAGES += "${PN}-gtk ${PN}-client ${PN}-web"
64
65FILES_${PN}-client = "${bindir}/transmission-remote ${bindir}/transmission-cli ${bindir}/transmission-create ${bindir}/transmission-show ${bindir}/transmission-edit"
66FILES_${PN}-gtk += "${bindir}/transmission-gtk ${datadir}/icons ${datadir}/applications ${datadir}/pixmaps"
67FILES_${PN}-web = "${datadir}/transmission/web"
Andrew Geisslerbbbd5f42020-10-30 15:42:48 -050068FILES_${PN} = "${bindir}/transmission-daemon ${sysconfdir}/init.d/transmission-daemon ${datadir}/appdata"
Andrew Geissler2ee498a2020-05-29 15:52:06 -050069
70SYSTEMD_SERVICE_${PN} = "transmission-daemon.service"
71
72# Script transmission-daemon following the guidelines in:
73# https://trac.transmissionbt.com/wiki/Scripts/initd
74INITSCRIPT_PACKAGES = "transmission-daemon"
75INITSCRIPT_NAME = "transmission-daemon"
76INITSCRIPT_PARAMS = "start 99 5 3 2 . stop 10 0 1 6 ."