aboutsummaryrefslogtreecommitdiffstats
path: root/testing/bareos/APKBUILD
blob: 6f165ad93c2fca765abf7a515839431a615a2b4f (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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=bareos
pkgver=15.2.4
pkgrel=2
pkgdesc="Bareos - Backup Archiving REcovery Open Sourced"
url="http://www.bareos.org"
arch="all"
license="AGPL3"
depends=""
depends_dev=""
makedepends="$depends_dev libtool libintl libpcap-dev lzo-dev \
	sqlite-dev postgresql-dev openssl-dev mariadb-dev acl-dev \
	qt-dev python-dev readline-dev ncurses-dev"
install="$pkgname.pre-install $pkgname.post-install"
subpackages="$pkgname-dev $pkgname-doc $pkgname-trayicon"
pkgusers="bareos"
pkggroups="bareos"
source="$pkgname-$pkgver.tar.gz::https://github.com/$pkgname/$pkgname/archive/Release/$pkgver.tar.gz
    bareos-dir-init
    bareos-dir-conf
    bareos-sd-init
    bareos-sd-conf
    bareos-fd-init
    bareos-fd-conf
	bareos-path-mounted.patch"

builddir="$srcdir"/${pkgname}-Release-${pkgver}

build() {
	cd "$builddir"
	./configure \
		--prefix=/usr \
		--sysconfdir=/etc \
		--localstatedir=/var \
		--mandir=/usr/share/man \
		--docdir=/usr/share/doc \
        --infodir=/usr/share/info \
		--with-confdir=/etc/bareos \
		--with-archivedir=/var/lib/bareos/archive \
		--with-scriptdir=/etc/bareos/scripts \
		--with-working-dir=/var/lib/bareos \
		--with-pid-dir=/var/run \
		--with-logdir=/var/log/bareos \
		--with-subsys-dir=/var/lock \
		--enable-smartalloc \
		--enable-largefile \
		--enable-readline \
		--enable-traymonitor \
		--enable-batch-insert \
		--enable-acl \
		--enable-xattr \
		--enable-scsi-crypto \
		--enable-lmdb \
		--enable-ipv6 \
		--enable-dynamic-cats-backends \
		--enable-dynamic-debian-package-list \
		--enable-includes \
		--disable-conio \
		--disable-nls \
		--disable-rpath \
		--with-postgresql \
		--with-mysql \
		--with-sqlite3 \
		--with-openssl \
		--with-python \
		--without-systemd \
		--with-dir-user=$pkgusers \
		--with-dir-group=$pkggroups \
		--with-sd-user=$pkgusers \
		--with-sd-group=$pkggroups \
		--with-fd-user=root \
		--with-fd-group=root
	make || return 1
}

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

	for DAEMON in dir sd fd
	do
		install -Dm755 "$srcdir"/bareos-${DAEMON}-init \
		 "$pkgdir"/etc/init.d/bareos-${DAEMON}
		install -Dm644 "$srcdir"/bareos-${DAEMON}-conf \
		 "$pkgdir"/etc/conf.d/bareos-${DAEMON}
	done
	# Install logrotate script
	install -Dm644 scripts/logrotate $pkgdir/etc/logrotate.d/bareos
	# Use shell script for catalog backup instead of perl
	sed -i -e 's/make_catalog_backup.pl/make_catalog_backup/' \
	 "$pkgdir"/etc/bareos/bareos-dir.conf
	for dir in /var/lib/bareos /etc/bareos/scripts/make_catalog_backup* \
	 /etc/bareos/scripts/mtx-changer*
	do
		chown $pkgusers:$pkgroups "$pkgdir"$dir || return 1
	done
}

dev() {
	pkgdesc="Bareos header files"
	mkdir -p "$subpkgdir"/usr
	mv "$pkgdir"/usr/include "$subpkgdir"/usr
}

trayicon() {
	pkgdesc="Bareos trayicon"
	depends="bareos"
	mkdir -p "$subpkgdir"/usr/share
	mkdir -p "$subpkgdir"/usr/bin
	for dirs in applications pixmaps; do
		mv "$pkgdir"/usr/share/$dirs "$subpkgdir"/usr/share
	done
	mv "$pkgdir"/usr/bin/bareos-tray-monitor "$subpkgdir"/usr/bin
}

md5sums="328eebb89d64c11d4594837341b809ac  bareos-15.2.4.tar.gz
3967099975a3eafe5811482b231b159f  bareos-dir-init
20f28a16f34e3f20ed18ed81b010e765  bareos-dir-conf
5ae1fba6860a320394d65744e5640bdb  bareos-sd-init
afe2f9a4d79d7d96eb9372d003d10f86  bareos-sd-conf
6ae93e570f95fa845fa534c2d2efaac0  bareos-fd-init
4500ce2d62bf9df33c07f70dc40f7b85  bareos-fd-conf
12a609832cdec5e03bc93c09c93aaeac  bareos-path-mounted.patch"
sha256sums="dde2b0b1ed8d878f9731cee9c7f723e3bac479b5fb367e61efca636465b40ebb  bareos-15.2.4.tar.gz
3dcba6d60dd2c67b1378a791d730588ff7d29eb59024fc731d4f4be01660e293  bareos-dir-init
5891bdb3a8ec581f8a2fd404a5a8995d8950d80da71a3b732474fb45e80d22c2  bareos-dir-conf
7c08606bbd391fa73773ef52bcee2dd989530c8c44b9dfae0b82cfe73976a400  bareos-sd-init
88808b3b971825acffc9dc3b6d418e52d9bd89df8527052c555cba4336ead784  bareos-sd-conf
12a62dd9c7a7931060c2c21e52cb9069a3774ebe7c8370455068e2dded0c2f80  bareos-fd-init
64124036c19e849cc580b981887be35b5746acb584397190a0afe2797b2d1ace  bareos-fd-conf
d20fa8fade3cd3551e1e4cff1a736d1901be1c650bf1386a5a336bfec19fea4c  bareos-path-mounted.patch"
sha512sums="35d06f48fc96b397598918af1346874f323a9f87abf85d8b3ccf39d7383667e8e7b454ff5e4311bfdec99ca2da13f06b348b03262ed6c671dfcb91fab2baa85e  bareos-15.2.4.tar.gz
852df12c6555ad65661345e15872ca75b99a9d3e5b9e6ed80d82021006c9716a04919dabe88ff672aa550ac0b00b31eaa2e739469557fc326e6bb4216e2308b9  bareos-dir-init
e06e5f8821d4a9a3f40cc8f11feeb5004780b82e2ad5e645f69a0f8faff78d8a8c6e66b36e105619b2a78d6b2f294dedd0e00e9bbf568af201cf299387135fef  bareos-dir-conf
ee8a9206d3e604f5ac81bc70bece97ec77dae87b463a6ff4d08fba9418bf37e99a30895f115b2e9fbba1ec5f92b5d9368fd155717fedae12792f255b02413208  bareos-sd-init
80f6cf74cc14e722747d92e6e7b073bdf32456d395c6b4b63daa1ddcaf75f3d76d1b9a0e8e2da512e8f82e4d59a4a93cc38117af91d974fe7db644516bdb9909  bareos-sd-conf
e4c09734ccf9e1ac197ac4684c8294dddae817cf764b168ce7357b2529d11314f948ed2807d501b3c7cd7725ba488981fe573d7b389fca7feedfa9c8a1cce6fa  bareos-fd-init
ff312e8952b31de27f22b257d12b570e151794d985f854ff19bab34363ea974d7583edced6b125518da3ecfe2b2a229b732473958b10484d988fcc8a67a372cc  bareos-fd-conf
eac4614c1b29ff0f12061837e425ae495890076021b6d1b0f1beb93501cfb905170342dac5dab69b09f825d5b9416eea25fa02e2174b5a704315c7feb08ff3d3  bareos-path-mounted.patch"