summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorasm0dey2018-08-27 23:11:23 +0300
committerasm0dey2018-08-27 23:11:23 +0300
commit60f6e43a1b9e860389c23380be0babd342c9ed89 (patch)
tree35ca5a63d976bdd02316c9880d6e4518770dcb67 /PKGBUILD
parentc5ad4d7c60a9f8101121082fb5ab5f682e94eabe (diff)
downloadaur-60f6e43a1b9e860389c23380be0babd342c9ed89.tar.gz
Adds systemd unit and support for any arch
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD32
1 files changed, 20 insertions, 12 deletions
diff --git a/PKGBUILD b/PKGBUILD
index a74014ad4b6..c761dc846bf 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,28 +1,36 @@
# Maintainer: asm0dey <pavel.finkelshtein+AUR@gmail.com>
pkgname=3proxy
pkgver=0.8.12
-pkgrel=1
+pkgrel=3
pkgdesc="A tiny crossplatform proxy server"
-arch=('i686' 'x86_64')
+arch=('any')
url="http://www.3proxy.ru/"
license=('BSD')
depends=('glibc')
makedepends=('gcc' 'make')
+backup=('etc/3proxy/3proxy.cfg')
source=("https://github.com/z3APA3A/3proxy/archive/$pkgver.tar.gz"
+ "3proxy.service"
)
md5sums=('f8ccbe689ff8da8ff67942fc440187ae'
+ '107033a7d0d3584c72de16f7953b139e'
)
_prefix=/usr
_etcdir=/etc/3proxy
package() {
- cd "$srcdir/3proxy-$pkgver"
- cp Makefile.Linux Makefile.Linux~ && sed 's/^\(CFLAGS =\)/\1 -Werror-implicit-function-declaration /' Makefile.Linux~ > Makefile.Linux || return 1
- make='make -f Makefile.Linux INSTALL=/usr/bin/install'
- $make prefix="$_prefix" ETCDIR="$_etcdir"
- $make prefix="$_prefix" install DESTDIR="$pkgdir" ETCDIR="${pkgdir}${_etcdir}"
- ( cd ${pkgdir}${_prefix}/bin && mv proxy 3proxy-proxy ) || return 1
- rm -f ${pkgdir}${_etcdir}/counters ${pkgdir}${_etcdir}/passwd ${pkgdir}${_etcdir}/bandlimiters
- install -D -m644 copying ${pkgdir}${_prefix}/share/licenses/$pkgname/copying
- install -D -m644 cfg/3proxy.cfg.sample ${pkgdir}${_etcdir}/3proxy.cfg.sample
- install -D -m644 cfg/counters.sample ${pkgdir}${_etcdir}/counters.sample
+ cd "$srcdir/3proxy-$pkgver"
+ cp Makefile.Linux Makefile.Linux~ && sed 's/^\(CFLAGS =\)/\1 -Werror-implicit-function-declaration /' Makefile.Linux~ > Makefile.Linux || return 1
+ make='make -f Makefile.Linux INSTALL=/usr/bin/install'
+ $make prefix="$_prefix" ETCDIR="$_etcdir"
+ $make prefix="$_prefix" install DESTDIR="$pkgdir" ETCDIR="${pkgdir}${_etcdir}"
+ ( cd ${pkgdir}${_prefix}/bin && mv proxy 3proxy-proxy ) || return 1
+ rm -f ${pkgdir}${_etcdir}/counters ${pkgdir}${_etcdir}/passwd ${pkgdir}${_etcdir}/bandlimiters
+ install -D -m644 copying ${pkgdir}${_prefix}/share/licenses/$pkgname/copying
+ install -D -m644 cfg/3proxy.cfg.sample ${pkgdir}${_etcdir}/3proxy.cfg.sample
+ install -D -m644 cfg/counters.sample ${pkgdir}${_etcdir}/counters.sample
+ mkdir -p "$pkgdir/usr/lib/systemd/system/"
+ install -D -m644 "$srcdir/3proxy.service" "$pkgdir/usr/lib/systemd/system/"
}
+
+# vim: ts=4 sw=4 et:
+