aboutsummaryrefslogtreecommitdiffstats
path: root/main/charybdis/APKBUILD
blob: c992febb438dc6535284a90a25ed2adc0144fb0a (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
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=charybdis
pkgver=3.5.1
pkgrel=0
pkgdesc="A highly-scalable IRCv3-compliant IRC daemon"
url="http://www.atheme.org/project/charybdis.html"
arch="all"
license="BSD GPL2"
pkgusers="ircd"                                                                
depends=""
depends_dev="bison flex openssl-dev zlib-dev libtool"
makedepends="$depends_dev"
install="$pkgname.pre-install"
subpackages="$pkgname-dev $pkgname-doc"
source="$pkgname-$pkgver.tar.bz2::http://distfiles.charybdis.io/$pkgname-$pkgver.tar.bz2
	$pkgname.initd
	$pkgname.confd"

_builddir="$srcdir"/$pkgname-$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
}
build() {
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc/charybdis \
		--localstatedir=/var \
		--libexecdir=/usr/lib \
		--disable-assert \
		--enable-ssl \
		--enable-ipv6 \
		--with-rundir=/var/run \
		--with-program-prefix=charybdis- \
		|| return 1
	 make || return 1
}

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

        install -m755 -D "$srcdir"/$pkgname.initd \
              "$pkgdir"/etc/init.d/charybdis-ircd || return 1
        install -m644 -D "$srcdir"/$pkgname.confd \
              "$pkgdir"/etc/conf.d/charybdis-ircd || return 1
        chown ircd "$pkgdir"/var/run/charybdis
        chown ircd "$pkgdir"/var/log/charybdis
        chown ircd "$pkgdir"/var/charybdis
	sed -i -e "s/\"modules\"/\"\/usr\/lib\/charybdis\/modules\"/g" $pkgdir/etc/$pkgname/example.conf
	sed -i -e "s/\"modules\/autoload\"/\"\/usr\/lib\/charybdis\/modules\/autoload\"/g" "$pkgdir"/etc/$pkgname/example.conf
	sed -i -e "s/usr\/local\/ircd\/modules/usr\/lib\/charybdis\/modules/g" "$pkgdir"/etc/$pkgname/reference.conf
}

md5sums="0b0d3c59769983c4e02b9a9db1cbb0d4  charybdis-3.5.1.tar.bz2
8dbb181d29609e29f6389e6b1dbb7d0e  charybdis.initd
11d70cc7c9fa0eb5ad52af35801d57c6  charybdis.confd"
sha256sums="3d64138a9804c82be2ae652fefa09c014faba3fb292493b4bdbd9058244f6a25  charybdis-3.5.1.tar.bz2
8b8c1f411ee1c9bdf4dd0b4e063464969abfa27e92bc4e15807cdeaed74c5fcd  charybdis.initd
3d1d8b8e722efe6a9eb3171a65d96651bb93c8d6265bd4980bcbb4b8d500f6ad  charybdis.confd"
sha512sums="8e877b1185efc46a8af8c4c51bde496fca4d5ce38f979d586172d30ae7991a5f504d427965d097d9e19b728fc45bd96044225671245e84ab1aa2bdcc3d5fe03d  charybdis-3.5.1.tar.bz2
584d28ded8c943172764ee89a0dcf2593e8a71a9ce876635b6fb86485171caad7c5e7fe0ec18fc217bfe93b7ceb865e9930e3af74458cb1f0b698c38fd70947f  charybdis.initd
1886b312b0ea40945de45db7a379bff2a3af426155fb77676e03f21f8d1d733e057fb5c3cb65fb72bb56008c4c92f3d2d0010563f871fd0802446de443ddfd5e  charybdis.confd"