summaryrefslogtreecommitdiff
path: root/repo/util/tor/tor.xibuild
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-05-07 13:50:28 +0100
committerdavidovski <david@davidovski.xyz>2022-05-07 13:50:28 +0100
commit213021de0aaf5439db7d58ca1447db4ae6af92be (patch)
treea2adcfe44a186f9a61b92c5ca80d38b6f4017fa0 /repo/util/tor/tor.xibuild
parentfd7adb2f3a9d9d239c90742366aec369966a3a03 (diff)
added tor and xss-lock
Diffstat (limited to 'repo/util/tor/tor.xibuild')
-rw-r--r--repo/util/tor/tor.xibuild44
1 files changed, 44 insertions, 0 deletions
diff --git a/repo/util/tor/tor.xibuild b/repo/util/tor/tor.xibuild
new file mode 100644
index 0000000..92b719d
--- /dev/null
+++ b/repo/util/tor/tor.xibuild
@@ -0,0 +1,44 @@
+#!/bin/sh
+
+NAME="tor"
+DESC="Anonymous network connectivity"
+
+MAKEDEPS="make "
+DEPS="libcap libseccomp libevent openssl cacerts zlib xz zstd "
+
+PKG_VER=0.4.7.7
+SOURCE="https://www.torproject.org/dist/tor-$PKG_VER.tar.gz"
+ADDITIONAL="torrc.sample.patch tor.initd tor.confd"
+
+prepare () {
+ apply_patches
+}
+
+build () {
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/share/man \
+ --disable-html-manual
+ make
+
+}
+
+package () {
+ make DESTDIR="$PKG_DEST" install
+
+ install -dm0755 -o "tor" \
+ "$PKG_DEST"/var/lib/"tor" \
+ "$PKG_DEST"/var/log/"tor"
+
+ install -Dm0755 "tor".initd \
+ "$PKG_DEST"/etc/init.d/"tor"
+ install -Dm0644 "tor".confd \
+ "$PKG_DEST"/etc/conf.d/"tor"
+}
+
+postinstall () {
+ adduser -S -D -H -h /var/lib/tor -s /sbin/nologin -g tor tor 2>/dev/null
+ exit 0
+}