Subject: [alpine-devel] extra/transmission new abuild

From: "Carlo Landmeter" <[email-masked]>
Date: Thu, 4 Dec 2008 14:29:36 +0100

See attached git patch.

Br,

Carlo
From 2b753de6fcd5bb618aaa9c83adb035a4290606bc Mon Sep 17 00:00:00 2001
From: Carlo Landmeter <[email-masked]>
Date: Thu, 4 Dec 2008 13:26:51 +0000
Subject: [PATCH] extra/transmission new aport

---
 extra/transmission/APKBUILD                        |   40 +++++++++++++++++
 .../transmission-1.34-configure-no-nls.patch       |   47 ++++++++++++++++++++
 extra/transmission/transmission-daemon.confd       |   18 ++++++++
 extra/transmission/transmission-daemon.initd       |   21 +++++++++
 extra/transmission/transmission.install            |    9 ++++
 5 files changed, 135 insertions(+), 0 deletions(-)
 create mode 100644 extra/transmission/APKBUILD
 create mode 100644 extra/transmission/transmission-1.34-configure-no-nls.patch
 create mode 100644 extra/transmission/transmission-daemon.confd
 create mode 100644 extra/transmission/transmission-daemon.initd
 create mode 100644 extra/transmission/transmission.install

diff --git a/extra/transmission/APKBUILD b/extra/transmission/APKBUILD
new file mode 100644
index 0000000..5f66a58
--- /dev/null
+++ b/extra/transmission/APKBUILD
@@ -0,0 +1,40 @@
+# Maintainer:Carlo Landmeter
+pkgname=transmission
+pkgver=1.34
+pkgel=0
+pkgdesc="Fast, easy, and fee BitToent client (CLI tools daemon and webinterface)"
+url="http://www.tansmissionbt.com"
+install=transmission.install
+license="MIT"
+depends="curl"
+makedepends="openssl-dev pkgconfig curl-dev"
+source="http://download.m0k.org/transmission/files/transmission-$pkgver.tar.bz2
+	transmission-1.34-configure-no-nls.patch
+	transmission-daemon.initd
+	transmission-daemon.confd
+	transmission.install
+	"
+subpackages="$pkgname-doc"
+
+build() {
+        cd $srcdir/$pkgname-$pkgver
+
+	for i in ../*.patch; do
+		msg "Applying ${i##*/}"
+		patch -p1 -i $i || return 1
+	done
+
+        ./configure --prefix=/usr \
+		--mandir=/us/share/man \
+		--disable-gtk \
+		--disable-nls 
+        make || return 1
+        make prefix="$pkgdir"/usr mandir="$pkgdir"/usr/share/man install
+        install -D -m755 "$srcdir"/transmission-daemon.initd "$pkgdir"/etc/init.d/transmission-daemon
+        install -D -m644 "$srcdir"/transmission-daemon.confd "$pkgdir"/etc/conf.d/transmission-daemon
+}
+md5sums="c4ef93639bcb895c1b3d279b2f4e27b3  transmission-1.34.tar.bz2
+44b65993bb089851976386853e4128df  transmission-1.34-configure-no-nls.patch
+b3b921242bdc3b33a8ac05fc30653b6c  transmission-daemon.initd
+89478a70fcd93463e1dd8d751da994da  transmission-daemon.confd
+4e338c4f7c902e132707b9e87b9bf1b5  transmission.install"
diff --git a/extra/transmission/transmission-1.34-configure-no-nls.patch b/extra/transmission/transmission-1.34-configure-no-nls.patch
new file mode 100644
index 0000000..551d624
--- /dev/null
+++ b/extra/transmission/transmission-1.34-configure-no-nls.patch
@@ -0,0 +1,47 @@
+--- transmission-1.34.orig/configure	Fri Nov 28 15:54:27 2008
++++ transmission-1.34/configure	Fri Nov 28 15:57:05 2008
+@@ -23735,22 +23735,7 @@
+     ;;
+ esac
+ 
+-if test -n "0.23"; then
+-    { echo "$as_me:$LINENO: checking for intltool >= 0.23" >&5
+-echo $ECHO_N "checking for intltool >= 0.23... $ECHO_C" >&6; }
+ 
+-    INTLTOOL_REQUIRED_VERSION_AS_INT=`echo 0.23 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
+-    INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { print $ 2; }' ${ac_aux_dir}/intltool-update.in`
+-    INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($ 2, VERSION, "."); print VERSION[1] * 1000 + VERSION[2] * 100 + VERSION[3];}' ${ac_aux_dir}/intltool-update.in`
+-
+-    { echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found" >&5
+-echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found" >&6; }
+-    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
+-	{ { echo "$as_me:$LINENO: error: Your intltool is too old.  You need intltool 0.23 or later." >&5
+-echo "$as_me: error: Your intltool is too old.  You need intltool 0.23 or later." >&2;}
+-   { (exit 1); exit 1; }; }
+-fi
+-
+   INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+ INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+      INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+@@ -23909,21 +23894,6 @@
+ else
+   { echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6; }
+-fi
+-
+-
+-if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
+-    { { echo "$as_me:$LINENO: error: GNU gettext tools not found; required for intltool" >&5
+-echo "$as_me: error: GNU gettext tools not found; required for intltool" >&2;}
+-   { (exit 1); exit 1; }; }
+-fi
+-xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
+-mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
+-mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
+-if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
+-    { { echo "$as_me:$LINENO: error: GNU gettext tools not found; required for intltool" >&5
+-echo "$as_me: error: GNU gettext tools not found; required for intltool" >&2;}
+-   { (exit 1); exit 1; }; }
+ fi
+ 
+ # Use the tools built into the package, not the ones that are installed.
diff --git a/extra/transmission/transmission-daemon.confd b/extra/transmission/transmission-daemon.confd
new file mode 100644
index 0000000..c1f338f
--- /dev/null
+++ b/extra/transmission/transmission-daemon.confd
@@ -0,0 +1,18 @@
+#
+# transmission-daemon options
+#
+# -a --acl          <list>      Access Control List.  (Default: +127.0.0.1)
+# -b --blocklist                Enable peer blocklists
+# -B --no-blocklist             Disable peer blocklists
+# -f --foreground               Run in the foreground instead of daemonizing
+# -g --config-dir   <path>      Where to look for configuration files
+# -p --port         <port>      RPC port (Default: 9091)
+# -t --auth                     Require authentication
+# -T --no-auth                  Don't require authentication
+# -u --username     <username>  Set username for authentication
+# -v --password     <password>  Set password for authentication
+# -w --download-dir <path>      Where to save downloaded data
+#
+# NOTE: webif does not work without the -f switch
+#
+TD_OPTS="-f -g /var/lib/transmission/.config -w /var/lib/transmission"
diff --git a/extra/transmission/transmission-daemon.initd b/extra/transmission/transmission-daemon.initd
new file mode 100644
index 0000000..af9461c
--- /dev/null
+++ b/extra/transmission/transmission-daemon.initd
@@ -0,0 +1,21 @@
+#!/sbin/runscript
+
+depend() {
+        need net
+}
+
+start() {
+        ebegin "Starting transmission-daemon"
+                start-stop-daemon --start --quiet --background --make-pidfile \
+                --chuid transmission:transmission \
+                --pidfile /var/run/transmission-daemon.pid \
+                --exec /usr/bin/transmission-daemon -- ${TD_OPTS}
+        eend $?
+}
+
+stop() {
+        ebegin "Stopping transmission-daemon"
+                start-stop-daemon --stop --quiet \
+                --pidfile /var/run/transmission-daemon.pid \
+        eend $?
+}
diff --git a/extra/transmission/transmission.install b/extra/transmission/transmission.install
new file mode 100644
index 0000000..870b5e2
--- /dev/null
+++ b/extra/transmission/transmission.install
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+case $1 in
+	pre_install)
+		adduser -h /var/lib/transmission -s /bin/false -D transmission 2>/dev/null
+		;;
+esac
+
+exit 0
-- 
1.5.6.4

---

From: Natanael Copa <[email-masked]>
Date: Thu, 04 Dec 2008 15:00:11 +0100

> See attached git patch.

commited.
http://dev.alpinelinux.org/cgit/cgit.cgi/aports/commit/?id=ef8dd81b056522f12605674076d336f56cc22606

fixed a typo
http://dev.alpinelinux.org/cgit/cgit.cgi/aports/commit/?id=60e9e06f9525d0c870b03252370798bb53ecc799

and compile tested it.

Looks very good!

Thanks!

-nc

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---