#!/bin/sh NAME="tor" DESC="Anonymous network connectivity" MAKEDEPS=" libcap libseccomp libevent openssl cacerts zlib xz zstd" PKG_VER=0.4.6.10 SOURCE="https://www.torproject.org/dist/tor-$PKG_VER.tar.gz" ADDITIONAL=" 0002-disable-wildcard-escaping-test_patch tor.confd tor.initd torrc.sample.patch " prepare () { apply_patches } build() { ./configure \ --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ --mandir=/usr/share/man \ --disable-html-manual \ --enable-zstd make } package() { make DESTDIR="$PKG_DEST" install install -dm0755 -o "$pkgusers" \ "$PKG_DEST"/var/lib/"tor" \ "$PKG_DEST"/var/log/"tor" install -Dm0755 "$BUILD_ROOT"/"tor".initd \ "$PKG_DEST"/etc/init.d/"tor" install -Dm0644 "$BUILD_ROOT"/"tor".confd \ "$PKG_DEST"/etc/conf.d/"tor" } postinstall () { useradd -r -m -U -d /var/lib/tor -s /sbin/nologin -g tor tor return 0 }