aboutsummaryrefslogtreecommitdiffstats
path: root/main/znc/APKBUILD
blob: 28809cfd71c3f15d55dd7e193e9b127e7adb1be9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=znc
pkgver=1.0
pkgrel=3
pkgdesc="An advanced IRC bouncer"
url="http://znc.in"
arch="all"
license="GPLv2"
depends=
depends_dev=
makedepends="perl-dev openssl-dev cyrus-sasl-dev python-dev c-ares-dev swig
	libiconv-dev tcl-dev autoconf automake"
install=""
subpackages="$pkgname-dev $pkgname-doc $pkgname-extra $pkgname-modtcl
	$pkgname-modperl"
source="http://znc.in/releases/znc-$pkgver.tar.gz
	libiconv.patch"

_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
	aclocal -I m4 && autoconf || return 1
}

build() {
	cd "$_builddir"
	export CHARSET=
	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--enable-extra \
		--enable-perl \
		--enable-sasl \
		--enable-tcl \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
}

_mv_to_sub() {
	local i
	for i in "$@"; do
		mkdir -p "$subpkgdir"/${i%/*}
		mv "$pkgdir"/$i "$subpkgdir"/$i || return 1
	done
}

_mv_mod() {
	local i
	for i in "$@"; do
		_mv_to_sub usr/lib/znc/$i || return 1
	done
}

dev() {
	default_dev
	_mv_to_sub usr/bin/znc-buildmod
}

extra() {
	pkgdesc="Extra modules for ZNC"
	_mv_mod \
		autovoice.so \
		block_motd.so \
		charset.so \
		clearbufferonmsg.so \
		ctcpflood.so \
		flooddetach.so \
		imapauth.so \
		listsockets.so \
		log.so \
		notify_connect.so \
		send_raw.so \
		shell.so
}

modtcl() {
	pkgdesc="TCL module for ZNC"
	depends="znc"
	_mv_mod modtcl.so
	_mv_to_sub usr/share/znc/modtcl
}

modperl() {
	pkgdesc="Perl module for ZNC"
	depends="znc"
	_mv_mod modperl modperl.so
}

md5sums="23807ca830c27392cccb6774f542df6e  znc-1.0.tar.gz
54cf06c396fd7769ecf6cbc762472492  libiconv.patch"
sha256sums="a85539da42697b26e4d46205def36bb799f83d6aeef401d53c49ee674142062a  znc-1.0.tar.gz
922990db9f1274801ab3d733e9d3bb38415581bc448b14572f38b013c5ef7640  libiconv.patch"
sha512sums="4219cdd32296e5851f6cd99a8ac6e14d2579df10e8e111bb09d6c3789e400e2fcdc173968afd54808d286f0fb4945aa57d2d0f3b62a20e761de64500c8938e35  znc-1.0.tar.gz
7eadbc45890af41148c0e7d1c9bd963e473eaf47836ea656a3c204b0aa7a754c532142b71ff59fbbcef6683e412e31324c730d17fb5aac19a0e0dad63cd007c4  libiconv.patch"