kumquat-buildroot/package/transmission/transmission.mk
Maxim Mikityanskiy c0f4bb97e4 transmission: improve systemd support
Support running transmission-daemon in system-wide mode using systemd:

1. Pass --with-systemd-daemon to configure script if systemd is enabled.

2. Create the transmission user if having daemon

3. Install transmission-daemon.service for systemd.

[Aurélien : Fix symlink relative path, use upstream service file,
no need for config path, and use transmission user in sysv script,
remove sysctl stuff]

Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com>
Signed-off-by: Aurélien Chabot <aurelien@chabot.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
2015-07-27 23:54:41 +02:00

81 lines
2.2 KiB
Makefile

################################################################################
#
# transmission
#
################################################################################
TRANSMISSION_VERSION = 2.84
TRANSMISSION_SITE = http://download.transmissionbt.com/files
TRANSMISSION_SOURCE = transmission-$(TRANSMISSION_VERSION).tar.xz
TRANSMISSION_DEPENDENCIES = \
host-pkgconf \
host-intltool \
libcurl \
libevent \
openssl \
zlib
TRANSMISSION_AUTORECONF = YES
TRANSMISSION_CONF_OPTS = \
--disable-libnotify \
--enable-lightweight
TRANSMISSION_LICENSE = GPLv2 or GPLv3 with OpenSSL exception
TRANSMISSION_LICENSE_FILES = COPYING
ifeq ($(BR2_PACKAGE_TRANSMISSION_UTP),y)
TRANSMISSION_CONF_OPTS += --enable-utp
else
TRANSMISSION_CONF_OPTS += --disable-utp
endif
ifeq ($(BR2_PACKAGE_TRANSMISSION_CLI),y)
TRANSMISSION_CONF_OPTS += --enable-cli
else
TRANSMISSION_CONF_OPTS += --disable-cli
endif
ifeq ($(BR2_PACKAGE_TRANSMISSION_DAEMON),y)
TRANSMISSION_CONF_OPTS += --enable-daemon
ifeq ($(BR2_PACKAGE_SYSTEMD),y)
TRANSMISSION_DEPENDENCIES += systemd
TRANSMISSION_CONF_OPTS += --with-systemd-daemon
else
TRANSMISSION_CONF_OPTS += --without-systemd-daemon
endif
define TRANSMISSION_USERS
transmission -1 transmission -1 * /var/lib/transmission - transmission Transmission Daemon
endef
define TRANSMISSION_INSTALL_INIT_SYSV
$(INSTALL) -m 0755 -D package/transmission/S92transmission \
$(TARGET_DIR)/etc/init.d/S92transmission
endef
define TRANSMISSION_INSTALL_INIT_SYSTEMD
$(INSTALL) -D -m 0755 $(@D)/daemon/transmission-daemon.service \
$(TARGET_DIR)/usr/lib/systemd/system/transmission-daemon.service
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
ln -fs ../../../../usr/lib/systemd/system/transmission-daemon.service \
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/transmission-daemon.service
endef
else
TRANSMISSION_CONF_OPTS += --disable-daemon
endif
ifeq ($(BR2_PACKAGE_TRANSMISSION_REMOTE),y)
TRANSMISSION_CONF_OPTS += --enable-remote
else
TRANSMISSION_CONF_OPTS += --disable-remote
endif
ifeq ($(BR2_PACKAGE_TRANSMISSION_GTK),y)
TRANSMISSION_CONF_OPTS += --enable-gtk
TRANSMISSION_DEPENDENCIES += libgtk2
else
TRANSMISSION_CONF_OPTS += --disable-gtk
endif
$(eval $(autotools-package))