blob: 735db1441e73b551aa7a70a6552cff1d64c07a3d [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/"
Andrew Geissler9aee5002022-03-30 16:27:02 +00004LICENSE = "GPL-2.0-only"
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"
Patrick Williams213cb262021-08-07 19:21:33 -05008RDEPENDS:${PN}-web = "${PN}"
Andrew Geissler2ee498a2020-05-29 15:52:06 -05009
10SRC_URI = " \
Andrew Geissler595f6302022-01-24 19:11:47 +000011 gitsm://github.com/transmission/transmission;branch=master;protocol=https \
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 Geissler5199d832021-09-24 16:47:35 -050021inherit autotools-brokensep gettext update-rc.d pkgconfig 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
Patrick Williams213cb262021-08-07 19:21:33 -050048do_install:append() {
Andrew Geissler2ee498a2020-05-29 15:52:06 -050049 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
Patrick Williams213cb262021-08-07 19:21:33 -050065FILES:${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"
68FILES:${PN} = "${bindir}/transmission-daemon ${sysconfdir}/init.d/transmission-daemon ${datadir}/appdata"
Andrew Geissler2ee498a2020-05-29 15:52:06 -050069
Patrick Williams213cb262021-08-07 19:21:33 -050070SYSTEMD_SERVICE:${PN} = "transmission-daemon.service"
Andrew Geissler2ee498a2020-05-29 15:52:06 -050071
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 ."