summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorasm0dey2020-10-30 11:39:53 +0300
committerasm0dey2020-10-30 11:39:53 +0300
commit9bf709086e726f23bac610d5cdb49197bbd3db80 (patch)
tree7372962253b890e884c7c32ce1612f373a3725ab
parent926ad18c1ab920a8d4d2c205ff137b043ed5b037 (diff)
downloadaur-9bf709086e726f23bac610d5cdb49197bbd3db80.tar.gz
upgpkg: 3proxy 0.9.0-5
Refactoring og build process
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD28
-rw-r--r--tmpfiles2
3 files changed, 22 insertions, 12 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1432880c799..eec54999ab2 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = 3proxy
pkgdesc = A tiny crossplatform proxy server
pkgver = 0.9.0
- pkgrel = 4
+ pkgrel = 5
url = http://www.3proxy.ru/
arch = any
license = BSD
@@ -16,7 +16,7 @@ pkgbase = 3proxy
md5sums = d47099e82914d854daac4688740d625c
md5sums = 99fbf305116df79fde910402c1132295
md5sums = 6cafc741aa7ca8aab877f24a132c8bd1
- md5sums = d5163425d56f9f065a4425f96059ae15
+ md5sums = 127ddc9c57a7b30ed8c70782f94e69b1
pkgname = 3proxy
diff --git a/PKGBUILD b/PKGBUILD
index 44db53a8057..2191d95f187 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: asm0dey <pavel.finkelshtein+AUR@gmail.com>
pkgname=3proxy
pkgver=0.9.0
-pkgrel=4
+pkgrel=5
pkgdesc="A tiny crossplatform proxy server"
arch=('any')
url="http://www.3proxy.ru/"
@@ -17,24 +17,36 @@ source=("https://github.com/z3APA3A/3proxy/archive/$pkgver.tar.gz"
md5sums=('d47099e82914d854daac4688740d625c'
'99fbf305116df79fde910402c1132295'
"6cafc741aa7ca8aab877f24a132c8bd1"
- "d5163425d56f9f065a4425f96059ae15"
+ "127ddc9c57a7b30ed8c70782f94e69b1"
)
_prefix=/usr
_etcdir=/etc/3proxy
_initdir=/etc/init.d
_runbase=/run
_logbase=/var/log
+prepare() {
+ cd "$srcdir/$pkgname-$pkgver"
+ echo -e " \e[1;34m->\033[0m \e[1;37mPatching Makefile for Linux...\033[0m"
+ # O2 and march should be dound in makepkg.conf, so let's remove them. Install should not really perform anything but calling another targets
+ sed --follow-symlinks -i.bak -e 's| -O2||g;s|CFLAGS = -g|CFLAGS =|;s|CC = gcc|CC ?= gcc|;s|LN = gcc|LN ?= gcc|;137,$d' Makefile.Linux
+}
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make prefix="$_prefix" DESTDIR="$pkgdir" ETCDIR="$_etcdir" INITDIR=$_initdir BINDIR="/usr/bin" -f Makefile.Linux
+}
+
package() {
cd "$srcdir/3proxy-$pkgver"
- sed -i '137,$d' Makefile.Linux
- make='make -f Makefile.Linux INSTALL=/usr/bin/install'
- $make prefix="$_prefix" DESTDIR="$pkgdir" ETCDIR="$_etcdir" INITDIR=$_initdir RUNBASE=$_runbase LOGBASE=$_logbase
- $make prefix="$_prefix" install DESTDIR="$pkgdir" ETCDIR="$pkgdir$_etcdir" INITDIR="$pkgdir$_initdir" RUNBASE="$pkgdir$_runbase" LOGBASE="$pkgdir$_logbase"
- sed -i 's|chroot.*|chroot /usr/local/3proxy threeproxy threeproxy|' "$pkgdir/etc/3proxy/3proxy.cfg"
+ make prefix="$_prefix" install DESTDIR="$pkgdir" ETCDIR="$pkgdir$_etcdir" INITDIR="$pkgdir$_initdir" RUNBASE="$pkgdir$_runbase" LOGBASE="$pkgdir$_logbase" -f Makefile.Linux
+ mkdir "$pkgdir/usr/lib"
+ mv "$pkgdir"/usr/local/3proxy/libexec/*.so "$pkgdir"/usr/lib/
+ rm -rf "$pkgdir/usr/local"
( cd ${pkgdir}${_prefix}/bin && mv proxy 3proxy-proxy ) || return 1
rm -f ${pkgdir}${_etcdir}/counters ${pkgdir}${_etcdir}/passwd ${pkgdir}${_etcdir}/bandlimiters "$pkgdir$_etcdir/3proxy.cfg"
+ rm -rf "$pkgdir$_etcdir/conf"
#touch "$pkgdir$_runbase/3proxy/3proxy.pid"
- install -D -m644 copying ${pkgdir}${_prefix}/share/licenses/$pkgname/copying
+ 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/"
diff --git a/tmpfiles b/tmpfiles
index 842dbb9424a..741741d397d 100644
--- a/tmpfiles
+++ b/tmpfiles
@@ -1,4 +1,2 @@
#Type Path Mode User Group Age Argument
d /run/3proxy 0755 threeproxy threeproxy - -
-d /usr/local/3proxy 0755 threeproxy threeproxy - -
-L+ /etc/3proxy/conf - - - - /usr/local/3proxy/conf