aports/testing/3proxy/APKBUILD
Johannes Heimansberg 2c8eb6cce7 testing/3proxy: fix init script and use supervise-daemon instead of start-stop-daemon
There are a couple of issues with the start-stop-daemon call in the init script, that
prevent it from working with 3proxy 0.8.13:
- 3proxy does not understand the --pidfile and --user options that are passed to it
  by start-stop-daemon (are they meant for start-stop-daemon instead?)
- Since 3proxy does not write its own pidfile by default, start-stop-daemon would
  need the -m option, so it would create the .pid file; instead of doing that
  supervise-daemon is now used instead, which avoids PID files altogether
- Both start-stop-daemon and supervise-daemon get confused when passing a user name
  starting with a number via the --user option and interpret it as a numeric UID; to
  avoid this, the UID/GID of the "3proxy" user/group are now fetched with
  ``id -u``/``id -g`` and then the correct numeric UID and GID are passed
2020-09-24 22:53:22 +00:00

35 lines
1.2 KiB
Plaintext

# Contributor: sillysausage <sillysausage@privatedemail.net>
# Maintainer:
pkgname=3proxy
pkgver=0.8.13
pkgrel=1
pkgdesc="Really tiny cross-platform proxy servers set"
url="https://3proxy.ru"
arch="all"
license="Apache-2.0 GPL-2.0-or-later LGPL-2.1-or-later"
pkgusers="3proxy"
pkggroups="3proxy"
options="!check" # No test suite
makedepends="linux-headers"
install="3proxy.pre-install"
subpackages="$pkgname-doc $pkgname-openrc"
source="$pkgname-$pkgver.tar.gz::https://github.com/z3APA3A/3proxy/archive/$pkgver.tar.gz
$pkgname.initd
"
build() {
make -f Makefile.Linux prefix="/usr"
}
package() {
make -f Makefile.Linux DESTDIR="$pkgdir" prefix="/usr" install
install -Dm755 "$srcdir"/3proxy.initd "$pkgdir"/etc/init.d/3proxy
mv "$pkgdir"/usr/etc/3proxy "$pkgdir"/etc/3proxy
chown -R 3proxy:3proxy "$pkgdir"/etc/3proxy
install -Dm644 copying "$pkgdir"/usr/share/licenses/$pkgname/COPYING
}
sha512sums="94b4a2568917c1d720276e38050a13e144d3e92ff41edd02eeebac0a6c21e6a839a58ea7dcb3abc03370e0f18452c953cfd7ad15ebac87e66b78d94fa52fbd79 3proxy-0.8.13.tar.gz
043fa5784623e29961ae92f5370598d420e55da6d04f6421b585ac050694982765d6b57ee0276a10738bc8ad0e49ddc4edf6ef288bb9c68e7da11b572066688e 3proxy.initd"