Mail archive
alpine-devel

[alpine-devel] [PATCH] testing/tor: new aport

From: Sam Dodrill <shadow.h511_at_gmail.com>
Date: Mon, 2 Sep 2013 01:57:34 -0700

Anonymous network connectivity
https://www.torproject.org/
---
 testing/tor/APKBUILD        | 66 +++++++++++++++++++++++++++++++++++++++++++++
 testing/tor/tor.confd       |  7 +++++
 testing/tor/tor.initd       | 30 +++++++++++++++++++++
 testing/tor/tor.pre-install |  4 +++
 4 files changed, 107 insertions(+)
 create mode 100644 testing/tor/APKBUILD
 create mode 100644 testing/tor/tor.confd
 create mode 100644 testing/tor/tor.initd
 create mode 100644 testing/tor/tor.pre-install
diff --git a/testing/tor/APKBUILD b/testing/tor/APKBUILD
new file mode 100644
index 0000000..8c07f61
--- /dev/null
+++ b/testing/tor/APKBUILD
_at_@ -0,0 +1,66 @@
+# Contributor: Sam Dodrill <shadow.h511_at_gmail.com>
+# Maintainer: Sam Dodrill <shadow.h511_at_gmail.com>
+pkgname=tor
+pkgver=0.2.3.25
+pkgrel=0
+pkgdesc="Anonymous network connectivity"
+url="https://www.torproject.org"
+arch="all"
+license="BSD"
+pkgusers="tor"
+depends=""
+depends_dev="bash libevent-dev openssl-dev ca-certificates"
+makedepends="$depends_dev"
+install="$pkgname.pre-install"
+subpackages="$pkgname-doc"
+source="
+        https://www.torproject.org/dist/$pkgname-$pkgver.tar.gz
+	tor.initd
+	tor.confd
+	"
+
+_builddir="$srcdir/$pkgname-$pkgver"
+prepare() {
+	local i
+	cd "$_builddir"
+	for i in $source; do
+		case $i in
+		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+		esac
+	done
+}
+
+build() {
+	cd "$_builddir"
+	./configure \
+		--build=$CBUILD \
+		--host=$CHOST \
+		--prefix=/usr \
+		--sysconfdir=/etc \
+		--mandir=/usr/share/man \
+		--infodir=/usr/share/info \
+		--localstatedir=/var \
+		|| return 1
+	make || return 1
+}
+
+package() {
+	cd "$_builddir"
+	make DESTDIR="$pkgdir" install || return 1
+	rm -f "$pkgdir"/usr/lib/*.la
+
+	install -m755 -D "$srcdir"/$pkgname.initd \
+		"$pkgdir"/etc/init.d/$pkgname || return 1
+	install -m644 -D "$srcdir"/$pkgname.confd \
+		"$pkgdir"/etc/conf.d/$pkgname || return 1
+}
+
+md5sums="a1c364189a9a66ed9daa8e6436489daf  tor-0.2.3.25.tar.gz
+4d1d8cbeada1ed334be26a75b57178d9  tor.initd
+cbcac88f5b728b1441891947a4babbcb  tor.confd"
+sha256sums="bb2d6f1136f33e11d37e6e34184143bf191e59501613daf33ae3d6f78f3176a0  tor-0.2.3.25.tar.gz
+53bdd8630813661d9dcfbd76a3ed102797d58971c0323be20de255dac201376a  tor.initd
+7d9e1125577252206d09e43c387fcfd8996115b46ac5d7f6ca3e46ef47316e98  tor.confd"
+sha512sums="c15f9356abc41bd1c663d37e674386debc29b0a5887e1120a0318ffb97ada1a04d57756175f01f13549f179f73916e2af18566575a656154ff71ec050fc99651  tor-0.2.3.25.tar.gz
+82a745b148da6c0a38db268dd4e88b77b7b8a018e00636235f869b2590e9b8d00b30525bff1f1ca77380cd89ee9af756479c2b11f786781227f2f0785804cdcc  tor.initd
+f11f0d192cd7823307c2ce4ddc7b3fff5190f72d3f65a5524b487021a95a222aca1fd36ab1eb58ed533e7acd555bfb70f0c8a13db20338ea31527f3151fd2bd7  tor.confd"
diff --git a/testing/tor/tor.confd b/testing/tor/tor.confd
new file mode 100644
index 0000000..486252b
--- /dev/null
+++ b/testing/tor/tor.confd
_at_@ -0,0 +1,7 @@
+# Sample conf.d file for alpine linux
+
+#
+# Specify daemon options here.
+#
+
+sample_opts=""
diff --git a/testing/tor/tor.initd b/testing/tor/tor.initd
new file mode 100644
index 0000000..3b7dd40
--- /dev/null
+++ b/testing/tor/tor.initd
_at_@ -0,0 +1,30 @@
+#!/sbin/runscript
+
+# Sample init.d file for alpine linux.
+
+name=tor
+daemon=/usr/bin/$name
+
+depend() {
+	need net
+	after firewall
+        provide $name
+}
+
+start() {
+	ebegin "Starting ${name}"
+		start-stop-daemon --start --quiet \
+			--pidfile /var/run/${name}.pid \
+			-u ${name} \
+			--exec ${daemon}
+	eend $?
+}
+
+stop() {
+	ebegin "Stopping ${name}"
+		start-stop-daemon --stop --quiet \
+			--pidfile /var/run/$name.pid \
+			--exec ${daemon}
+	eend $?
+}
+
diff --git a/testing/tor/tor.pre-install b/testing/tor/tor.pre-install
new file mode 100644
index 0000000..b367a63
--- /dev/null
+++ b/testing/tor/tor.pre-install
_at_@ -0,0 +1,4 @@
+#!/bin/sh
+adduser -h /var/run/shadowircd -s /bin/false -S -D ircd 2>/dev/null
+exit 0
+
-- 
1.8.3.4
---
Unsubscribe:  alpine-devel+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-devel+help_at_lists.alpinelinux.org
---
Received on Mon Sep 02 2013 - 01:57:34 UTC