initial import
This commit is contained in:
42
onioncat/PKGBUILD
Normal file
42
onioncat/PKGBUILD
Normal file
@@ -0,0 +1,42 @@
|
||||
# Maintainer: Jesus E. <heckyel@riseup.net>
|
||||
|
||||
pkgname=onioncat
|
||||
pkgver=4.11.0
|
||||
pkgrel=1
|
||||
pkgdesc="OnionCat is a VPN-adapter, which uses Tor or I2P as its transport."
|
||||
arch=('i686' 'x86_64')
|
||||
url='https://github.com/rahra/onioncat'
|
||||
license=('GPL-3')
|
||||
depends=('tor' 'net-tools')
|
||||
optdepends=('i2pd: alternative transport-layer')
|
||||
install=$pkgname.install
|
||||
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/rahra/onioncat/archive/refs/tags/v${pkgver}.tar.gz"
|
||||
"ocat.initd"
|
||||
"ocat.confd")
|
||||
sha512sums=('5dc6538f343749530cbd2f29bdd6ba6bc1e921a4fae6f5c783dd2bc1d045ce304639acc5cea6c1946b7c938ce58b732c01ae1a00998f5438a414b4c623dfd0bf'
|
||||
'b1e4149cbebfb2dfde552cd736ac2998f8b40ca1275cc81ea70c7f69843398073ab8e3bcefdd21545b96997544f0f0f148bd448600c01528172ed274b6742189'
|
||||
'360132797747900b2560a987a0d032045d8e2f1482bb1f74fb3a7a0219654cb5695afda2cfc4862d10d9f879417044a1f795284f3e1b865e6ba158519a71e9c2')
|
||||
|
||||
prepare() {
|
||||
cd "${pkgname}-${pkgver}"
|
||||
autoreconf -vfi
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "${pkgname}-${pkgver}"
|
||||
./configure \
|
||||
--prefix=/usr
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${pkgname}-${pkgver}"
|
||||
make DESTDIR="$pkgdir/" install
|
||||
|
||||
# services
|
||||
install -Dm644 $srcdir/ocat.confd "$pkgdir"/etc/conf.d/ocat
|
||||
install -Dm755 $srcdir/ocat.initd "$pkgdir"/etc/init.d/ocat
|
||||
|
||||
# license
|
||||
install -Dm644 COPYING -t "$pkgdir"/usr/share/licenses/$pkgname
|
||||
}
|
||||
11
onioncat/ocat.confd
Normal file
11
onioncat/ocat.confd
Normal file
@@ -0,0 +1,11 @@
|
||||
# pid file destination
|
||||
PIDFILE=/var/run/ocat.pid
|
||||
|
||||
# log file destination
|
||||
LOGFILE=/var/log/ocatd.log
|
||||
|
||||
# onioncat hidden service hostname file
|
||||
OCAT_HOSTNAME_FILE=/var/lib/tor/onioncat/hostname
|
||||
|
||||
# options
|
||||
OCAT_OPTS="-C -4 -L \"${LOGFILE}\" $(cat ${OCAT_HOSTNAME_FILE})"
|
||||
25
onioncat/ocat.initd
Normal file
25
onioncat/ocat.initd
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/sbin/openrc-run
|
||||
|
||||
depend() {
|
||||
need net tor
|
||||
}
|
||||
|
||||
start() {
|
||||
ebegin "Starting Ocat daemon..."
|
||||
start-stop-daemon \
|
||||
--start \
|
||||
--pidfile "${PIDFILE}" \
|
||||
--quiet \
|
||||
--exec /usr/bin/ocat -- -P "${PIDFILE}" ${OCAT_OPTS} >/dev/null 2>&1
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping Ocat daemon..."
|
||||
start-stop-daemon \
|
||||
--stop \
|
||||
--quiet \
|
||||
--pidfile "${PIDFILE}"
|
||||
eend $?
|
||||
}
|
||||
|
||||
19
onioncat/onioncat.install
Normal file
19
onioncat/onioncat.install
Normal file
@@ -0,0 +1,19 @@
|
||||
post_install() {
|
||||
# working on folders
|
||||
if [ ! -d '/var/lib/tor/onioncat' ]; then
|
||||
mkdir -p /var/lib/tor/onioncat
|
||||
fi
|
||||
|
||||
# show message
|
||||
echo "See https://github.com/rahra/onioncat"
|
||||
echo "for configuration guide."
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
post_install
|
||||
}
|
||||
|
||||
post_remove() {
|
||||
# working on folders
|
||||
rm -rf /var/lib/tor/onioncat
|
||||
}
|
||||
Reference in New Issue
Block a user