summaryrefslogtreecommitdiffstats
path: root/main/bacula-client/APKBUILD
blob: 478038137ff6c0e234cbdd56ff3d3c43ad39579e (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
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname="bacula-client"
_realname="bacula"
pkgver=5.2.12
pkgrel=4
pkgdesc="Client (File Daemon) of Bacula, a network based backup program"
url="http://www.bacula.org"
arch="all"
license="AGPL3"
depends=""
makedepends="autoconf automake libstdc++ openssl-dev ncurses-dev zlib-dev"
install="$pkgname.pre-install"
subpackages="$pkgname-doc"
pkgusers="bacula"
pkggroups="bacula"
source="http://downloads.sourceforge.net/project/$_realname/$_realname/$pkgver/$_realname-$pkgver.tar.gz
	bacula-fd-init
	bacula-fd-conf
	bacula-5.0.2-config.patch
	bacula-5.0.2-openssl.patch
	bacula-5.0.3-Makefile.patch
	bacula-5.0.3-sqlite-priv.patch
	bacula-5.2.3-as-needed.patch
	bacula-5.2.3-ldflags.patch
	bacula-5.2.3-lib-search-path.patch
	configure.in.patch
	cxx.patch
	os.m4.patch"

_builddir="$srcdir/$_realname-$pkgver"

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

	cd "$_builddir"/autoconf
	autoconf && cp configure ../
}

build() {
	cd "$_builddir"
	./configure --prefix=/usr \
	 --sysconfdir=/etc/bacula \
	 --localstatedir=/var \
	 --mandir=/usr/share/man \
	 --docdir=/usr/share/doc \
	 --infodir=/usr/share/info \
	 --with-pid-dir=/var/run \
	 --with-subsys-dir=/var/lock/subsys \
	 --with-logdir=/var/log/bacula \
	 --enable-largefile \
	 --enable-client-only \
	 --enable-smartalloc \
	 --disable-nls \
	 --with-openssl=/usr/include/openssl \
	 --with-scriptdir=/etc/bacula/scripts \
	 --with-working-dir=/var/lib/bacula \
	 --with-fd-user=root \
	 --with-fd-group=root
	make || return 1
}

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

	install -Dm755 "$srcdir"/bacula-fd-init \
	 "$pkgdir"/etc/init.d/bacula-fd
	install -Dm644 "$srcdir"/bacula-fd-conf \
	 "$pkgdir"/etc/conf.d/bacula-fd
	chown bacula.bacula "$pkgdir"/var/lib/bacula
	find "$pkgdir" -iname *.la -delete
	find "$pkgdir"/usr/lib -iname libbaccats* -type l -delete
}

md5sums="b04c22b128b73359e4bbc9de06652c38  bacula-5.2.12.tar.gz
38b0fe78acdc5e65aec3a59578e98a20  bacula-fd-init
4500ce2d62bf9df33c07f70dc40f7b85  bacula-fd-conf
71f7f9c041eff045b2e97d141316c059  bacula-5.0.2-config.patch
4e310e84c7aba5b8d043758e0fa0088f  bacula-5.0.2-openssl.patch
0ec20df57bb632ed729cfaf5d0a3ee33  bacula-5.0.3-Makefile.patch
9def0e68e3eb2f5f8b4c34108a248efd  bacula-5.0.3-sqlite-priv.patch
5fb1ef3f9fae381b64aa3226351f91a5  bacula-5.2.3-as-needed.patch
5ff321fee690e6a3b48ae41f9860558c  bacula-5.2.3-ldflags.patch
fe1fe1df51c3e57343e2e7794447a763  bacula-5.2.3-lib-search-path.patch
ebc9c2bbc9be95c920723a3f142d8e19  configure.in.patch
1bfdbfea7a36d5503753414dffb953eb  cxx.patch
cf7a2a4e972697f54364654c4e282b8b  os.m4.patch"