summaryrefslogtreecommitdiffstats
path: root/testing/corosync/APKBUILD
blob: 4076bc13a8155dfa806552fc3a2b6d327545b852 (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
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=corosync
pkgver=2.3.4
pkgrel=1
pkgdesc="The Corosync Cluster Engine and Application Programming Interfaces"
url="http://www.corosync.org/"
arch="all"
license="BSD2"
depends=""
depends_dev="nss-dev net-snmp-dev libqb-dev"
makedepends="$depends_dev"
install=""
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs"
source="http://build.clusterlabs.org/corosync/releases/corosync-$pkgver.tar.gz
	$pkgname.initd"
_builddir="$srcdir"/corosync-$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 --prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--enable-snmp \
		--enable-nss \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
	rm -f "$pkgdir"/usr/lib/*.la
	install -m755 -D "$srcdir"/$pkgname.initd \
		"$pkgdir"/etc/init.d/$pkgname || return 1
}

libs() {
	pkgdesc="The Corosync Cluster Engine Libraries"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/lib*.so.* "$subpkgdir"/usr/lib/ || return 1
}

md5sums="4b0f36a1dc014527e5b192265dbd7e70  corosync-2.3.4.tar.gz
4d18555dfdd036b7a48eb5bdfd0ff053  corosync.initd"
sha256sums="3dae93fb1cf5c560295253b0560cbc25421ed053ee373852864f3a60c03247d4  corosync-2.3.4.tar.gz
8e5a18febe55a08b8b5be80ca2e3b81cdf961784d7a2f246b9064825d3a847bc  corosync.initd"
sha512sums="68cfd22171b8d1158905ce01ba1d85be0ad069a6bea8895729b79ab720d65d1a8f1f2ec47281004810b1e6fdaf5a925afdc497aa4bd75663e7638eeed276f85e  corosync-2.3.4.tar.gz
be5ec458f8eb234eb01ba1023e59b35f967f0833fd8097eb8f9b5e9d172fe3beffc6ea3d15dd57f1b76ab7b90cdfccdb4868962488d4af573e70c55baf021a65  corosync.initd"