update buildroot to 2017.02.11
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
Fix build error "conflicting types for 'UTP_Write'"
|
||||
|
||||
Fetch from: http://www.adminsehow.com/2012/10/how-to-install-transmission-2-71-on-debian-6-0-squeeze/
|
||||
|
||||
The corresponding upstream bug report (unfixed) can be found here:
|
||||
https://trac.transmissionbt.com/ticket/5232
|
||||
|
||||
Signed-off-by: Bernd Kuhls <berndkuhls@hotmail.com>
|
||||
|
||||
--- transmission-2.82.org/third-party/libutp/utypes.h 2013-08-09 04:47:43.000000000 +0200
|
||||
+++ transmission-2.82/third-party/libutp/utypes.h 2014-01-02 20:17:18.000000000 +0100
|
||||
@@ -35,8 +35,15 @@
|
||||
typedef const char * cstr;
|
||||
typedef char * str;
|
||||
|
||||
-#ifndef __cplusplus
|
||||
-typedef uint8 bool;
|
||||
-#endif
|
||||
+//#ifndef __cplusplus
|
||||
+//typedef uint8 bool;
|
||||
+//#endif
|
||||
+#ifndef __cplusplus
|
||||
+#ifdef HAVE_STDBOOL_H
|
||||
+#include <stdbool.h>
|
||||
+#else
|
||||
+typedef uint8 bool;
|
||||
+#endif
|
||||
+#endif
|
||||
|
||||
#endif //__UTYPES_H__
|
||||
@@ -0,0 +1,36 @@
|
||||
Fix musl build
|
||||
|
||||
Downloaded from
|
||||
https://cgit.gentoo.org/proj/musl.git/tree/net-p2p/transmission/files/transmission-2.84-musl-missing-header.patch
|
||||
|
||||
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
|
||||
|
||||
|
||||
libtransmission/transmission.h: add missing <sys/types.h>
|
||||
|
||||
transmission.h and several files including it, like bitfield.c and fdlimits.h
|
||||
make reference to ssize_t, off_t and other types defined in <sys/types.h> but
|
||||
never include the header. By including <sys/types.h> in transmission.h, the
|
||||
required type definitions are propagated to all files that need them.
|
||||
|
||||
Not including <sys/types.h> on glibc and uClibc systems does not pose a problem
|
||||
because of the way the headers stack in those C Standard Libraries, but on musl
|
||||
excluding <sys/types.h> leads to compile time failure.
|
||||
|
||||
For the POSIX specs, see
|
||||
|
||||
http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_types.h.html
|
||||
|
||||
Signed-of-by: Anthony G. Basile <blueness@gentoo.org>
|
||||
|
||||
diff -Naur transmission-2.84.orig/libtransmission/transmission.h transmission-2.84/libtransmission/transmission.h
|
||||
--- transmission-2.84.orig/libtransmission/transmission.h 2014-07-01 13:09:01.682910744 -0400
|
||||
+++ transmission-2.84/libtransmission/transmission.h 2015-07-19 03:11:07.379219181 -0400
|
||||
@@ -28,6 +28,7 @@
|
||||
|
||||
#include <inttypes.h> /* uintN_t */
|
||||
#include <time.h> /* time_t */
|
||||
+#include <sys/types.h>
|
||||
|
||||
#ifdef WIN32
|
||||
#define __USE_MINGW_ANSI_STDIO 1
|
||||
@@ -0,0 +1,31 @@
|
||||
Fix libminiupnpc version detection
|
||||
|
||||
Problem is known upstream: https://trac.transmissionbt.com/ticket/6140
|
||||
|
||||
For buildroot we know the libminiupnpc version so we hard-code 2.0.
|
||||
|
||||
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
|
||||
|
||||
diff -uNr transmission-2.92.org/configure.ac transmission-2.92/configure.ac
|
||||
--- transmission-2.92.org/configure.ac 2016-03-06 21:23:45.336198393 +0100
|
||||
+++ transmission-2.92/configure.ac 2016-07-02 21:48:13.452385686 +0200
|
||||
@@ -386,18 +386,7 @@
|
||||
dnl MINIUPNPC_API_VERSION and we won't have to figure
|
||||
dnl it out on our own
|
||||
if test "x$upnp_version" = "xunknown" ; then
|
||||
- AC_RUN_IFELSE(
|
||||
- [AC_LANG_PROGRAM(
|
||||
- [#include <stdlib.h>
|
||||
- #include <miniupnpc/miniupnpc.h>],
|
||||
- [#ifdef MINIUPNPC_API_VERSION
|
||||
- return EXIT_SUCCESS;
|
||||
- #else
|
||||
- return EXIT_FAILURE;
|
||||
- #endif]
|
||||
- )],
|
||||
- [upnp_version=">= 1.7"]
|
||||
- )
|
||||
+ upnp_version="2.0"
|
||||
fi
|
||||
|
||||
dnl Or maybe it's miniupnp 1.6
|
||||
@@ -0,0 +1,46 @@
|
||||
Fix compilation when using system libminiupnpc with libutp disabled
|
||||
|
||||
If transmission uses its own copy of libminiupnpc in third-party/ then
|
||||
the configure script adds that path to CFLAGS:
|
||||
https://trac.transmissionbt.com/browser/trunk/configure.ac#L455
|
||||
|
||||
This path is also added if transmission uses its own copy of libutp:
|
||||
https://trac.transmissionbt.com/browser/trunk/configure.ac#L349
|
||||
|
||||
But if a system-provided libminiupnpc is used and utp-support is
|
||||
disabled using --disable-utp the result is a build error, detected by
|
||||
buildroot autobuilders:
|
||||
http://autobuild.buildroot.net/results/b79/b79e51140cb0320554a58ce59dcb33f53cd9211a/build-end.log
|
||||
|
||||
net.c:40:24: fatal error: libutp/utp.h: No such file or directory
|
||||
|
||||
Patch proposed by Yann E. MORIN:
|
||||
http://lists.busybox.net/pipermail/buildroot/2016-July/167896.html
|
||||
|
||||
Patch sent upstream: https://trac.transmissionbt.com/ticket/6163
|
||||
|
||||
Signed-off-by: Bernd Kuhls <berndkuhls@hotmail.com>
|
||||
|
||||
diff -uNr transmission-2.92.org/configure.ac transmission-2.92/configure.ac
|
||||
--- transmission-2.92.org/configure.ac 2016-03-06 21:23:45.336198393 +0100
|
||||
+++ transmission-2.92/configure.ac 2016-07-31 12:13:40.921660078 +0200
|
||||
@@ -358,6 +358,10 @@
|
||||
else
|
||||
AC_MSG_ERROR("Unable to build uTP support -- C++ compiler not found")
|
||||
fi
|
||||
+else
|
||||
+ # For the system libminiupnpc with UTC disabled,
|
||||
+ # point to our bundled UTP headers
|
||||
+ LIBUTP_CFLAGS="-I\$(top_srcdir)/third-party/"
|
||||
fi
|
||||
AC_SUBST(LIBUTP_CFLAGS)
|
||||
AC_SUBST(LIBUTP_LIBS)
|
||||
@@ -457,7 +461,7 @@
|
||||
LIBUPNP_LIBS_QT="\$\${TRANSMISSION_TOP}/third-party/miniupnp/libminiupnp.a"
|
||||
else
|
||||
AC_DEFINE([SYSTEM_MINIUPNP])
|
||||
- LIBUPNP_CFLAGS=""
|
||||
+ LIBUPNP_CFLAGS="${LIBUTP_CFLAGS}"
|
||||
LIBUPNP_LIBS="-lminiupnpc"
|
||||
LIBUPNP_LIBS_QT="-lminiupnpc"
|
||||
fi
|
||||
@@ -0,0 +1,29 @@
|
||||
From 8682fe1bad44acc06154003ca9c9163b917bf4e3 Mon Sep 17 00:00:00 2001
|
||||
From: Waldemar Brodkorb <wbx@uclibc-ng.org>
|
||||
Date: Thu, 29 Sep 2016 19:52:49 +0200
|
||||
Subject: [PATCH] uClibc-ng since 1.0.18 has sys/quota.h synced with GNU libc
|
||||
|
||||
Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
|
||||
|
||||
Pull Request:
|
||||
https://github.com/transmission/transmission/pull/42
|
||||
---
|
||||
libtransmission/platform-quota.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libtransmission/platform-quota.c b/libtransmission/platform-quota.c
|
||||
index 58c518a..57377ef 100644
|
||||
--- a/libtransmission/platform-quota.c
|
||||
+++ b/libtransmission/platform-quota.c
|
||||
@@ -284,7 +284,7 @@ getquota (const char * device)
|
||||
spaceused = (int64_t) dq.dqb_curblocks >> 1;
|
||||
#elif defined(__APPLE__)
|
||||
spaceused = (int64_t) dq.dqb_curbytes;
|
||||
-#elif defined(__UCLIBC__)
|
||||
+#elif defined(__UCLIBC__) && (__UCLIBC_MAJOR__ == 0 || (__UCLIBC_MAJOR__ == 1 && __UCLIBC_SUBLEVEL__ <= 17))
|
||||
spaceused = (int64_t) btodb(dq.dqb_curblocks);
|
||||
#elif defined(__sun) || (defined(_LINUX_QUOTA_VERSION) && _LINUX_QUOTA_VERSION < 2)
|
||||
spaceused = (int64_t) dq.dqb_curblocks >> 1;
|
||||
--
|
||||
2.1.4
|
||||
|
||||
@@ -0,0 +1,133 @@
|
||||
From 0862099d0bf5a3ec8b2e9d538458d612897741a2 Mon Sep 17 00:00:00 2001
|
||||
From: Mike Gelfand <mikedld@mikedld.com>
|
||||
Date: Sat, 23 Apr 2016 16:13:25 +0000
|
||||
Subject: [PATCH] #5921: Use libsystemd instead of libsystemd-daemon (original
|
||||
patches by Sandro Tosi and Mike Gilbert)
|
||||
|
||||
In systemd v209, released over two years ago, the various libsystemd-*
|
||||
libraries (libsystemd-journal.so, libsystemd-login.so, libsystem-daemon.so,
|
||||
libsystemd-id128.so) were merged into a single libsystemd.so library to
|
||||
reduce code duplication and avoid cyclic dependencies.
|
||||
|
||||
Downloaded from upstream commit:
|
||||
https://github.com/transmission/transmission/commit/0862099d0bf5a3ec8b2e9d538458d612897741a2
|
||||
|
||||
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
|
||||
---
|
||||
CMakeLists.txt | 4 ++--
|
||||
configure.ac | 16 ++++++++--------
|
||||
daemon/CMakeLists.txt | 8 ++++----
|
||||
daemon/Makefile.am | 4 ++--
|
||||
daemon/daemon.c | 2 +-
|
||||
5 files changed, 17 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 8b324dc..356fc2f 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -398,9 +398,9 @@ endif()
|
||||
if(WITH_SYSTEMD)
|
||||
tr_get_required_flag(WITH_SYSTEMD SYSTEMD_IS_REQUIRED)
|
||||
|
||||
- pkg_check_modules(SYSTEMD_DAEMON ${SYSTEMD_IS_REQUIRED} libsystemd-daemon)
|
||||
+ pkg_check_modules(SYSTEMD ${SYSTEMD_IS_REQUIRED} libsystemd)
|
||||
|
||||
- tr_fixup_auto_option(WITH_SYSTEMD SYSTEMD_DAEMON_FOUND SYSTEMD_IS_REQUIRED)
|
||||
+ tr_fixup_auto_option(WITH_SYSTEMD SYSTEMD_FOUND SYSTEMD_IS_REQUIRED)
|
||||
endif()
|
||||
|
||||
include_directories(${CMAKE_BINARY_DIR})
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 92e4372..b64f2a3 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -240,15 +240,15 @@ dnl
|
||||
dnl file monitoring for the daemon
|
||||
|
||||
# Check whether to enable systemd startup notification.
|
||||
-# This requires libsystemd-daemon.
|
||||
-AC_ARG_WITH([systemd-daemon], AS_HELP_STRING([--with-systemd-daemon],
|
||||
+# This requires libsystemd.
|
||||
+AC_ARG_WITH([systemd], AS_HELP_STRING([--with-systemd],
|
||||
[Add support for systemd startup notification (default is autodetected)]),
|
||||
- [USE_SYSTEMD_DAEMON=$withval], [USE_SYSTEMD_DAEMON=auto])
|
||||
-AS_IF([test "x$USE_SYSTEMD_DAEMON" != "xno"], [
|
||||
- PKG_CHECK_MODULES([SYSTEMD_DAEMON], [libsystemd-daemon],
|
||||
- [AC_DEFINE(USE_SYSTEMD_DAEMON,1,[Use systemd startup notification])],
|
||||
- [AS_IF([test "x$USE_SYSTEMD_DAEMON" = "xyes"],
|
||||
- [AC_MSG_ERROR([systemd startup notification support requested, but libsystemd-daemon not found.])]
|
||||
+ [USE_SYSTEMD=$withval], [USE_SYSTEMD=auto])
|
||||
+AS_IF([test "x$USE_SYSTEMD" != "xno"], [
|
||||
+ PKG_CHECK_MODULES([SYSTEMD], [libsystemd],
|
||||
+ [AC_DEFINE(USE_SYSTEMD,1,[Use systemd startup notification])],
|
||||
+ [AS_IF([test "x$USE_SYSTEMD" = "xyes"],
|
||||
+ [AC_MSG_ERROR([systemd startup notification support requested, but libsystemd not found.])]
|
||||
)]
|
||||
)
|
||||
])
|
||||
diff --git a/daemon/CMakeLists.txt b/daemon/CMakeLists.txt
|
||||
index e8f8b34..8ec3b95 100644
|
||||
--- a/daemon/CMakeLists.txt
|
||||
+++ b/daemon/CMakeLists.txt
|
||||
@@ -1,7 +1,7 @@
|
||||
project(trdaemon)
|
||||
|
||||
if(WITH_SYSTEMD)
|
||||
- add_definitions(-DUSE_SYSTEMD_DAEMON)
|
||||
+ add_definitions(-DUSE_SYSTEMD)
|
||||
endif()
|
||||
|
||||
include_directories(
|
||||
@@ -37,14 +37,14 @@ add_executable(${TR_NAME}-daemon
|
||||
${${PROJECT_NAME}_WIN32_RC_FILE})
|
||||
|
||||
set_target_properties(${TR_NAME}-daemon PROPERTIES
|
||||
- COMPILE_FLAGS "${SYSTEMD_DAEMON_CFLAGS}"
|
||||
- LINK_FLAGS "${SYSTEMD_DAEMON_LDFLAGS}"
|
||||
+ COMPILE_FLAGS "${SYSTEMD_CFLAGS}"
|
||||
+ LINK_FLAGS "${SYSTEMD_LDFLAGS}"
|
||||
)
|
||||
|
||||
target_link_libraries(${TR_NAME}-daemon
|
||||
${TR_NAME}
|
||||
${EVENT2_LIBRARIES}
|
||||
- ${SYSTEMD_DAEMON_LIBRARIES}
|
||||
+ ${SYSTEMD_LIBRARIES}
|
||||
)
|
||||
|
||||
tr_win32_app_info(${PROJECT_NAME}_remote_WIN32_RC_FILE
|
||||
diff --git a/daemon/Makefile.am b/daemon/Makefile.am
|
||||
index 677f765..34d7076 100644
|
||||
--- a/daemon/Makefile.am
|
||||
+++ b/daemon/Makefile.am
|
||||
@@ -3,7 +3,7 @@ AM_CPPFLAGS = -I@top_srcdir@ -DEMBEDDED
|
||||
AM_CFLAGS = \
|
||||
@LIBEVENT_CFLAGS@ \
|
||||
@LIBCURL_CFLAGS@ \
|
||||
- @SYSTEMD_DAEMON_CFLAGS@ \
|
||||
+ @SYSTEMD_CFLAGS@ \
|
||||
@ZLIB_CFLAGS@ \
|
||||
@PTHREAD_CFLAGS@
|
||||
|
||||
@@ -29,7 +29,7 @@ LDADD = \
|
||||
@LIBCURL_LIBS@ \
|
||||
@CRYPTO_LIBS@ \
|
||||
@INTLLIBS@ \
|
||||
- @SYSTEMD_DAEMON_LIBS@ \
|
||||
+ @SYSTEMD_LIBS@ \
|
||||
@ZLIB_LIBS@ \
|
||||
@PTHREAD_LIBS@ \
|
||||
${LIBM}
|
||||
diff --git a/daemon/daemon.c b/daemon/daemon.c
|
||||
index 40ac5a6..62ac715 100644
|
||||
--- a/daemon/daemon.c
|
||||
+++ b/daemon/daemon.c
|
||||
@@ -33,7 +33,7 @@
|
||||
#include <libtransmission/version.h>
|
||||
#include <libtransmission/watchdir.h>
|
||||
|
||||
-#ifdef USE_SYSTEMD_DAEMON
|
||||
+#ifdef USE_SYSTEMD
|
||||
#include <systemd/sd-daemon.h>
|
||||
#else
|
||||
static void sd_notify (int status UNUSED, const char * str UNUSED) { }
|
||||
52
bsp/buildroot-2017.02.11/package/transmission/Config.in
Normal file
52
bsp/buildroot-2017.02.11/package/transmission/Config.in
Normal file
@@ -0,0 +1,52 @@
|
||||
config BR2_PACKAGE_TRANSMISSION
|
||||
bool "transmission"
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
depends on BR2_USE_MMU # fork()
|
||||
select BR2_PACKAGE_ZLIB
|
||||
select BR2_PACKAGE_OPENSSL
|
||||
select BR2_PACKAGE_LIBCURL
|
||||
select BR2_PACKAGE_LIBEVENT
|
||||
help
|
||||
Transmission is a cross-platform BitTorrent client.
|
||||
|
||||
http://www.transmissionbt.com/
|
||||
|
||||
if BR2_PACKAGE_TRANSMISSION
|
||||
|
||||
config BR2_PACKAGE_TRANSMISSION_UTP
|
||||
bool "Transmission uTP support"
|
||||
depends on BR2_INSTALL_LIBSTDCPP
|
||||
help
|
||||
Install support for uTorrent Transport Protocol
|
||||
|
||||
comment "uTP needs a toolchain w/ C++"
|
||||
depends on !BR2_INSTALL_LIBSTDCPP
|
||||
|
||||
config BR2_PACKAGE_TRANSMISSION_CLI
|
||||
bool "transmission-cli"
|
||||
help
|
||||
Install transmission command line interface.
|
||||
|
||||
config BR2_PACKAGE_TRANSMISSION_DAEMON
|
||||
bool "transmission-daemon"
|
||||
help
|
||||
Install transmission daemon.
|
||||
|
||||
config BR2_PACKAGE_TRANSMISSION_REMOTE
|
||||
bool "transmission-remote"
|
||||
help
|
||||
Install transmission remote management tool.
|
||||
|
||||
config BR2_PACKAGE_TRANSMISSION_GTK
|
||||
bool "transmission-gtk"
|
||||
depends on BR2_PACKAGE_LIBGTK3 && BR2_ENABLE_LOCALE
|
||||
help
|
||||
Install transmission GTK-based GUI interface.
|
||||
|
||||
comment "transmission-gtk needs a toolchain w/ locale"
|
||||
depends on BR2_PACKAGE_LIBGTK3 && !BR2_ENABLE_LOCALE
|
||||
endif
|
||||
|
||||
comment "transmission needs a toolchain w/ threads"
|
||||
depends on BR2_USE_MMU
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS
|
||||
159
bsp/buildroot-2017.02.11/package/transmission/S92transmission
Normal file
159
bsp/buildroot-2017.02.11/package/transmission/S92transmission
Normal file
@@ -0,0 +1,159 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Original Author: Lennart A. Jtte, based on Rob Howell's script
|
||||
# Modified by Maarten Van Coile & others (on IRC)
|
||||
|
||||
# Changes for buildroot:
|
||||
# USERNAME points to 'default' in standard installation
|
||||
# TODO: set logfile with --logfile option
|
||||
|
||||
# Do NOT "set -e"
|
||||
|
||||
#
|
||||
# ----- CONFIGURATION -----
|
||||
#
|
||||
# For the default location Transmission uses, visit:
|
||||
# http://trac.transmissionbt.com/wiki/ConfigFiles
|
||||
# For a guide on how set the preferences, visit:
|
||||
# http://trac.transmissionbt.com/wiki/EditConfigFiles
|
||||
# For the available environement variables, visit:
|
||||
# http://trac.transmissionbt.com/wiki/EnvironmentVariables
|
||||
#
|
||||
# The name of the user that should run Transmission.
|
||||
# It's RECOMENDED to run Transmission in it's own user,
|
||||
# by default, this is set to 'transmission'.
|
||||
# For the sake of security you shouldn't set a password
|
||||
# on this user
|
||||
USERNAME=transmission
|
||||
|
||||
|
||||
# ----- *ADVANCED* CONFIGURATION -----
|
||||
# Only change these options if you know what you are doing!
|
||||
#
|
||||
# The folder where Transmission stores the config & web files.
|
||||
# ONLY change this you have it at a non-default location
|
||||
#TRANSMISSION_HOME="/var/config/transmission-daemon"
|
||||
#TRANSMISSION_WEB_HOME="/usr/share/transmission/web"
|
||||
#
|
||||
# The arguments passed on to transmission-daemon.
|
||||
# ONLY change this you need to, otherwise use the
|
||||
# settings file as per above.
|
||||
#TRANSMISSION_ARGS=""
|
||||
|
||||
|
||||
# ----- END OF CONFIGURATION -----
|
||||
#
|
||||
# PATH should only include /usr/* if it runs after the mountnfs.sh script.
|
||||
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||
DESC="bittorrent client"
|
||||
NAME=transmission-daemon
|
||||
DAEMON=$(which $NAME)
|
||||
PIDFILE=/var/run/$NAME.pid
|
||||
SCRIPTNAME=/etc/init.d/$NAME
|
||||
|
||||
# Exit if the package is not installed
|
||||
[ -x "$DAEMON" ] || exit 0
|
||||
|
||||
# Read configuration variable file if it is present
|
||||
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
|
||||
|
||||
# Load the VERBOSE setting and other rcS variables
|
||||
[ -f /etc/default/rcS ] && . /etc/default/rcS
|
||||
|
||||
#
|
||||
# Function that starts the daemon/service
|
||||
#
|
||||
|
||||
start()
|
||||
{
|
||||
# Export the configuration/web directory, if set
|
||||
if [ -n "$TRANSMISSION_HOME" ]; then
|
||||
export TRANSMISSION_HOME
|
||||
fi
|
||||
if [ -n "$TRANSMISSION_WEB_HOME" ]; then
|
||||
export TRANSMISSION_WEB_HOME
|
||||
fi
|
||||
|
||||
# Return
|
||||
# 0 if daemon has been started
|
||||
# 1 if daemon was already running
|
||||
# 2 if daemon could not be started
|
||||
start-stop-daemon --chuid $USERNAME --start --pidfile $PIDFILE --make-pidfile \
|
||||
--exec $DAEMON --background --test -- -f $TRANSMISSION_ARGS > /dev/null \
|
||||
|| return 1
|
||||
start-stop-daemon --chuid $USERNAME --start --pidfile $PIDFILE --make-pidfile \
|
||||
--exec $DAEMON --background -- -f $TRANSMISSION_ARGS \
|
||||
|| return 2
|
||||
}
|
||||
|
||||
#
|
||||
# Function that stops the daemon/service
|
||||
#
|
||||
stop()
|
||||
{
|
||||
# Return
|
||||
# 0 if daemon has been stopped
|
||||
# 1 if daemon was already stopped
|
||||
# 2 if daemon could not be stopped
|
||||
# other if a failure occurred
|
||||
start-stop-daemon --stop --quiet --retry=TERM/10/KILL/5 --pidfile $PIDFILE --name $NAME
|
||||
RETVAL="$?"
|
||||
[ "$RETVAL" = 2 ] && return 2
|
||||
|
||||
# Wait for children to finish too if this is a daemon that forks
|
||||
# and if the daemon is only ever run from this initscript.
|
||||
# If the above conditions are not satisfied then add some other code
|
||||
# that waits for the process to drop all resources that could be
|
||||
# needed by services started subsequently. A last resort is to
|
||||
# sleep for some time.
|
||||
|
||||
start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
|
||||
[ "$?" = 2 ] && return 2
|
||||
|
||||
# Many daemons don't delete their pidfiles when they exit.
|
||||
rm -f $PIDFILE
|
||||
|
||||
return "$RETVAL"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo "Starting $DESC" "$NAME..."
|
||||
start
|
||||
case "$?" in
|
||||
0|1) echo " Starting $DESC $NAME succeeded" ;;
|
||||
*) echo " Starting $DESC $NAME failed" ;;
|
||||
esac
|
||||
;;
|
||||
stop)
|
||||
echo "Stopping $DESC $NAME..."
|
||||
stop
|
||||
case "$?" in
|
||||
0|1) echo " Stopping $DESC $NAME succeeded" ;;
|
||||
*) echo " Stopping $DESC $NAME failed" ;;
|
||||
esac
|
||||
;;
|
||||
restart|force-reload)
|
||||
#
|
||||
# If the "reload" option is implemented then remove the
|
||||
# 'force-reload' alias
|
||||
#
|
||||
echo "Restarting $DESC $NAME..."
|
||||
stop
|
||||
case "$?" in
|
||||
0|1)
|
||||
start
|
||||
case "$?" in
|
||||
0|1) echo " Restarting $DESC $NAME succeeded" ;;
|
||||
*) echo " Restarting $DESC $NAME failed: couldn't start $NAME" ;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
echo " Restarting $DESC $NAME failed: couldn't stop $NAME" ;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
|
||||
exit 3
|
||||
;;
|
||||
esac
|
||||
@@ -0,0 +1,3 @@
|
||||
# Locally calculated
|
||||
sha256 8815920e0a4499bcdadbbe89a4115092dab42ce5199f71ff9a926cfd12b9b90b transmission-2.93.tar.xz
|
||||
sha256 20801783bf59e27d03ed6aab625b32a34e221ae95bf801db87827c8023398495 COPYING
|
||||
@@ -0,0 +1,91 @@
|
||||
################################################################################
|
||||
#
|
||||
# transmission
|
||||
#
|
||||
################################################################################
|
||||
|
||||
TRANSMISSION_VERSION = 2.93
|
||||
TRANSMISSION_SITE = https://github.com/transmission/transmission-releases/raw/master
|
||||
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_LIBMINIUPNPC),y)
|
||||
TRANSMISSION_DEPENDENCIES += libminiupnpc
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBNATPMP),y)
|
||||
TRANSMISSION_DEPENDENCIES += libnatpmp
|
||||
TRANSMISSION_CONF_OPTS += --enable-external-natpmp
|
||||
else
|
||||
TRANSMISSION_CONF_OPTS += --disable-external-natpmp
|
||||
endif
|
||||
|
||||
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 0644 $(@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 += --with-gtk
|
||||
TRANSMISSION_DEPENDENCIES += libgtk3
|
||||
else
|
||||
TRANSMISSION_CONF_OPTS += --without-gtk
|
||||
endif
|
||||
|
||||
$(eval $(autotools-package))
|
||||
Reference in New Issue
Block a user