aboutsummaryrefslogtreecommitdiffstats
path: root/unmaintained/csync2/APKBUILD
blob: 3dc51815ebb869ed0a8510cb1528627cba55168a (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
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=csync2
pkgver=2.0
pkgrel=3
pkgdesc="Cluster synchronization tool"
url="http://oss.linbit.com/csync2/"
arch="all"
license="GPL2+"
depends="openssl"
depends_dev=""
makedepends="autoconf automake librsync-dev gnutls-dev sqlite-dev mysql-dev postgresql-dev"
install="$pkgname.post-install $pkgname.post-upgrade"
subpackages="$pkgname-compare $pkgname-doc"
source="http://oss.linbit.com/$pkgname/$pkgname-$pkgver.tar.gz
	csync2-openssl.cnf
	longlong-format.patch
	nossl-config.patch
	have-strlcpy.patch
	$pkgname.initd"

_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
	autoreconf --install --force
}

build() {
	cd "$_builddir"
	./configure --prefix=/usr \
		--sysconfdir=/etc/$pkgname \
		--localstatedir=/var \
		--docdir=/usr/share/doc/$pkgname \
		--mandir=/usr/share/man \
		--enable-postgres \
		--enable-mysql \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
	cp doc/* "$pkgdir"/usr/share/doc/$pkgname/ || return 1

	install -m755 -D "$srcdir"/$pkgname.initd \
		"$pkgdir"/etc/init.d/$pkgname || return 1
}

compare() {
	subpkgdesc="csync2 compare script"
	arch="noarch"
	depends="bash perl-digest-md5"

	mkdir -p "$subpkgdir"/usr/sbin
	mv "$pkgdir"/usr/sbin/$pkgname-compare \
		"$subpkgdir"/usr/sbin/ || return 1
}

md5sums="4069fc9e86e8508c392fe2862059eb91  csync2-2.0.tar.gz
f2f42a8ba543d5a22d2740e794c7f872  csync2-openssl.cnf
8fc73254db29316f9125761d18f1ed46  longlong-format.patch
b5adcbe1a3b0bc409336e539087319ea  nossl-config.patch
3ed476916ba9afa7c4aa587ae86a6e34  have-strlcpy.patch
8197fe5a195d1e7a6843f0be7f9230f5  csync2.initd"
sha256sums="11cb37380fb185bce0c22b804fec9b01c385d9d83cc528cfd48d748453834fa2  csync2-2.0.tar.gz
53e2ae5141f9b1517072798f2d78b63b7a4653e59ebeb626940a7b8d173bc4df  csync2-openssl.cnf
afb1317987cc4b81908bc437269162c7af23b34e6842306483da5b53efce2db3  longlong-format.patch
bc7abcb34224b6ea77cd4f90ee69d916b4bc7ef0f321bd649b1060ff54cdc084  nossl-config.patch
f9aad05465919657894ee24fd102451790911445d0d8291ce565242a96f6024e  have-strlcpy.patch
c45f4177182cb567b9581e9882cf3004bbdde174b44b02b212df0e16a60bd6f8  csync2.initd"
sha512sums="f91fd222f67affe9634471d341b43ff67854a6ed25b620301a454e98a79a9fb80b2a66eb8713546758fd08300d52751e5ca7472c696daa20ee11779b87a830f8  csync2-2.0.tar.gz
614da46cdaea46da5de8d3f4e4dc634f34ec5fa402af8557e17324c43dd6b06cc4797bfb42bd5d0d4e34edcf9eb30241bd9054732d75e9646edd32e650fde7d4  csync2-openssl.cnf
38a17cbf23cbccd4996ad1af049851e33179586e619e3f3edbfacbaa36662e44d916839acd59b1cfc67b3af9042c3258068ec9e5b57f7e26c00a41a0e6f0e148  longlong-format.patch
9fe50c761ba463ebeecda147c7172526bb9a2378e11101bcab60433b2aec389439eefe8139539babe0d680e2f30cc69df34788454a1d3dce64decd66cc153b32  nossl-config.patch
66a4762c2a6f99dd0f48aaf36d977150b93f3710de8ae34f090636285115a5801878089ca509d26737bbc30fadb6f9f6acebad8cea1c60e40aaff95ce43ee3a6  have-strlcpy.patch
617235cb9383e72f48e7dd1aa82ecca394b87ceb1e5853b6eb04fb620e6146828fdf64a117d899be4174d3ddde81c9b092937fedada6d0c213825124d70546ee  csync2.initd"