Andrew Geissler | 2ee498a | 2020-05-29 15:52:06 -0500 | [diff] [blame] | 1 | DESCRIPTION = "Transmission is a fast, easy, and free BitTorrent client" |
| 2 | SECTION = "network" |
| 3 | HOMEPAGE = "https://transmissionbt.com/" |
| 4 | LICENSE = "GPL-2.0" |
Andrew Geissler | bbbd5f4 | 2020-10-30 15:42:48 -0500 | [diff] [blame] | 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=73f535ddffcf2a0d3af4f381f84f9b33" |
Andrew Geissler | 2ee498a | 2020-05-29 15:52:06 -0500 | [diff] [blame] | 6 | |
| 7 | DEPENDS = "curl libevent gnutls openssl libtool intltool-native glib-2.0-native" |
| 8 | RDEPENDS_${PN}-web = "${PN}" |
| 9 | |
| 10 | SRC_URI = " \ |
Andrew Geissler | bbbd5f4 | 2020-10-30 15:42:48 -0500 | [diff] [blame] | 11 | gitsm://github.com/transmission/transmission \ |
Andrew Geissler | 2ee498a | 2020-05-29 15:52:06 -0500 | [diff] [blame] | 12 | file://transmission-daemon \ |
| 13 | " |
| 14 | |
Andrew Geissler | bbbd5f4 | 2020-10-30 15:42:48 -0500 | [diff] [blame] | 15 | # Transmission release 3.00 |
| 16 | SRCREV = "bb6b5a062ee594dfd4b7a12a6b6e860c43849bfd" |
| 17 | PV = "3.00" |
Andrew Geissler | 2ee498a | 2020-05-29 15:52:06 -0500 | [diff] [blame] | 18 | |
| 19 | S = "${WORKDIR}/git" |
| 20 | |
Andrew Geissler | ac970dd | 2021-02-12 15:32:45 -0600 | [diff] [blame] | 21 | inherit autotools-brokensep gettext update-rc.d systemd mime-xdg |
Andrew Geissler | 2ee498a | 2020-05-29 15:52:06 -0500 | [diff] [blame] | 22 | |
| 23 | PACKAGECONFIG = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'gtk', '', d)} \ |
| 24 | ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd','',d)}" |
| 25 | |
| 26 | PACKAGECONFIG[gtk] = " --with-gtk,--without-gtk,gtk+3," |
Andrew Geissler | bbbd5f4 | 2020-10-30 15:42:48 -0500 | [diff] [blame] | 27 | PACKAGECONFIG[systemd] = "--with-systemd,--without-systemd,systemd," |
Andrew Geissler | 2ee498a | 2020-05-29 15:52:06 -0500 | [diff] [blame] | 28 | |
| 29 | # Weak default values for transmission user and group |
| 30 | # Change them in bbappend if needed |
| 31 | TRANSMISSION_USER ??= "root" |
| 32 | TRANSMISSION_GROUP ??= "root" |
| 33 | |
| 34 | # Configure aborts with: |
| 35 | # config.status: error: po/Makefile.in.in was not created by intltoolize. |
Andrew Geissler | ac970dd | 2021-02-12 15:32:45 -0600 | [diff] [blame] | 36 | do_configure() { |
Andrew Geissler | 2ee498a | 2020-05-29 15:52:06 -0500 | [diff] [blame] | 37 | sed -i /AM_GLIB_GNU_GETTEXT/d ${S}/configure.ac |
| 38 | cd ${S} |
| 39 | ./update-version-h.sh |
| 40 | intltoolize --copy --force --automake |
Andrew Geissler | ac970dd | 2021-02-12 15:32:45 -0600 | [diff] [blame] | 41 | aclocal |
| 42 | libtoolize --automake --copy --force |
| 43 | autoconf |
| 44 | automake -a |
| 45 | oe_runconf |
Andrew Geissler | 2ee498a | 2020-05-29 15:52:06 -0500 | [diff] [blame] | 46 | } |
| 47 | |
| 48 | do_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 | |
| 63 | PACKAGES += "${PN}-gtk ${PN}-client ${PN}-web" |
| 64 | |
| 65 | FILES_${PN}-client = "${bindir}/transmission-remote ${bindir}/transmission-cli ${bindir}/transmission-create ${bindir}/transmission-show ${bindir}/transmission-edit" |
| 66 | FILES_${PN}-gtk += "${bindir}/transmission-gtk ${datadir}/icons ${datadir}/applications ${datadir}/pixmaps" |
| 67 | FILES_${PN}-web = "${datadir}/transmission/web" |
Andrew Geissler | bbbd5f4 | 2020-10-30 15:42:48 -0500 | [diff] [blame] | 68 | FILES_${PN} = "${bindir}/transmission-daemon ${sysconfdir}/init.d/transmission-daemon ${datadir}/appdata" |
Andrew Geissler | 2ee498a | 2020-05-29 15:52:06 -0500 | [diff] [blame] | 69 | |
| 70 | SYSTEMD_SERVICE_${PN} = "transmission-daemon.service" |
| 71 | |
| 72 | # Script transmission-daemon following the guidelines in: |
| 73 | # https://trac.transmissionbt.com/wiki/Scripts/initd |
| 74 | INITSCRIPT_PACKAGES = "transmission-daemon" |
| 75 | INITSCRIPT_NAME = "transmission-daemon" |
| 76 | INITSCRIPT_PARAMS = "start 99 5 3 2 . stop 10 0 1 6 ." |