aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-10-13 01:10:01 +0200
committerJakub Jirutka <jakub@jirutka.cz>2017-10-13 02:14:22 +0200
commit3cba60e94439ac5893d39ce8a54eb92b6b8ad468 (patch)
tree1408430c36acf3a286ccc3818fc69044164649f6
parenteae0979158cf6c82bc2176bfa1ce5b8d6f7785da (diff)
downloadaports-3cba60e94439ac5893d39ce8a54eb92b6b8ad468.tar.bz2
main/znc: modernize and fix abuild
-rw-r--r--main/znc/APKBUILD77
1 files changed, 31 insertions, 46 deletions
diff --git a/main/znc/APKBUILD b/main/znc/APKBUILD
index 881522f..d622cf2 100644
--- a/main/znc/APKBUILD
+++ b/main/znc/APKBUILD
@@ -6,32 +6,22 @@ pkgrel=1
pkgdesc="An advanced IRC bouncer"
url="http://znc.in"
arch="all"
-license="ASL 2.0"
-depends=""
-depends_dev=""
+license="ASL-2.0"
makedepends="perl-dev libressl-dev cyrus-sasl-dev python2-dev c-ares-dev swig
gettext-dev tcl-dev autoconf automake python3-dev"
-install="$pkgname.pre-install"
pkgusers="$pkgname"
+pkggroups="$pkgusers"
+install="$pkgname.pre-install"
subpackages="$pkgname-dev $pkgname-doc $pkgname-extra $pkgname-modtcl
- $pkgname-modperl $pkgname-modpython"
+ $pkgname-modperl $pkgname-modpython"
source="http://znc.in/releases/znc-$pkgver.tar.gz
$pkgname.initd
$pkgname.confd"
-
-_builddir="$srcdir"/znc-$pkgver
-prepare() {
- local i
- cd "$_builddir"
- for i in $source; do
- case $i in
- *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
- esac
- done
-}
+builddir="$srcdir/znc-$pkgver"
build() {
- cd "$_builddir"
+ cd "$builddir"
+
export CFLAGS="$CFLAGS -D_GNU_SOURCE"
./configure \
--build=$CBUILD \
@@ -43,34 +33,18 @@ build() {
--localstatedir=/var \
--enable-perl \
--enable-tcl \
- --enable-python \
- || return 1
- make || return 1
+ --enable-python
+ make
}
package() {
- cd "$_builddir"
- make DESTDIR="$pkgdir" install || return 1
- install -D -m755 "$srcdir"/$pkgname.initd \
- "$pkgdir"/etc/init.d/$pkgname || return 1
- install -D -m644 "$srcdir"/$pkgname.confd \
- "$pkgdir"/etc/conf.d/$pkgname || return 1
- install -d -o $pkgname $pkgdir/var/lib/znc || return 1
-}
+ cd "$builddir"
-_mv_to_sub() {
- local i
- for i in "$@"; do
- mkdir -p "$subpkgdir"/${i%/*}
- mv "$pkgdir"/$i "$subpkgdir"/$i || return 1
- done
-}
+ make DESTDIR="$pkgdir" install
-_mv_mod() {
- local i
- for i in "$@"; do
- _mv_to_sub usr/lib/znc/$i || return 1
- done
+ install -D -m755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
+ install -D -m644 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
+ install -d -m750 -o $pkgusers -g $pkggroups "$pkgdir"/var/lib/znc
}
dev() {
@@ -80,6 +54,7 @@ dev() {
extra() {
pkgdesc="Extra modules for ZNC"
+
_mv_mod \
autovoice.so \
block_motd.so \
@@ -97,6 +72,7 @@ extra() {
modtcl() {
pkgdesc="TCL module for ZNC"
depends="znc"
+
_mv_mod modtcl.so
_mv_to_sub usr/share/znc/modtcl
}
@@ -104,21 +80,30 @@ modtcl() {
modperl() {
pkgdesc="Perl module for ZNC"
depends="znc"
+
_mv_mod modperl modperl.so
}
modpython() {
pkgdesc="Python modules for ZNC"
depends="znc"
+
_mv_mod modpython modpython.so
}
-md5sums="ab22e4e94cdd04c5644c4d9213149af0 znc-1.6.5.tar.gz
-0170c261efe6da389bf637b00dfcb984 znc.initd
-1817e134ec3fa6ec05d36d4995a5aaa5 znc.confd"
-sha256sums="2f0225d49c53a01f8d94feea4619a6fe92857792bb3401a4eb1edd65f0342aca znc-1.6.5.tar.gz
-fa67ed45506863f5c0d7a73a4ab2c7b199a8eb02a2b201dbb64bd8bace00bbf2 znc.initd
-be3155e79e6ed13be88fbf9d99f6889b3ee8425837120c448c827b8302672063 znc.confd"
+_mv_mod() {
+ local i; for i in "$@"; do
+ _mv_to_sub usr/lib/znc/$i
+ done
+}
+
+_mv_to_sub() {
+ local i; for i in "$@"; do
+ mkdir -p "$subpkgdir"/${i%/*}
+ mv "$pkgdir"/$i "$subpkgdir"/$i
+ done
+}
+
sha512sums="d78603ac86d1fb92cdf591b1eb6d32fa19b0e39414bd69e1300c537051612ae590c43d3b8e4dd598cdff605bf3aa1d3d5d806edd428d15d50f733e1670f3e626 znc-1.6.5.tar.gz
3287affd90f0048a7e790179d97ac9964498cc87f833afb97c6298abfbdbdf1131edd1211b3b64290a862ae4a768f63c346c274a18664a2e22e2815632a726c2 znc.initd
352f18d64cbfbd5970c859f2ae2290c0ddafcbd8f1bb5d74f33976bc8388f65a75f8a9a73a093fbac12f2d243d4bcf74380bbb3aaab8d68f7bf4eab7ce3bea46 znc.confd"