blob: faa3e8f3764ebc52dc3e5974e37e101180a8d57a (
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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
|
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname="bacula"
pkgver=5.2.13
pkgrel=0
pkgdesc="Enterprise ready, network based backup program"
url="http://www.bacula.org"
arch="all"
license="AGPL3"
depends=""
depends_dev="autoconf mysql-dev ncurses-dev openssl-dev postgresql-dev sqlite-dev
zlib-dev lzo-dev"
makedepends="$depends_dev"
install="$pkgname.pre-install $pkgname.post-upgrade"
subpackages="$pkgname-doc $pkgname-mysql $pkgname-pgsql $pkgname-sqlite"
pkgusers="bacula"
pkggroups="bacula"
somask="libbaccats-${pkgver}.so"
source="http://downloads.sourceforge.net/project/$pkgname/$pkgname/$pkgver/$pkgname-$pkgver.tar.gz
bacula-dir-init
bacula-dir-conf
bacula-sd-init
bacula-sd-conf
bacula-fd-init
bacula-fd-conf
bacula-5.0.2-config.patch
bacula-5.0.2-openssl.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
bacula-config.patch
configure.in.patch
bacula-5.0.3-Makefile.patch
os.m4.patch
cxx.patch"
_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
cd "$_builddir"/autoconf
autoconf && cp configure ../
}
build() {
cd "$srcdir/$pkgname-$pkgver"
./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-smartalloc \
--disable-nls \
--with-openssl=/usr/include/openssl \
--with-postgresql \
--with-mysql \
--with-sqlite3 \
--with-scriptdir=/etc/bacula/scripts \
--with-working-dir=/var/lib/bacula \
--with-dir-user=bacula \
--with-dir-group=bacula \
--with-archivedir=/var/lib/bacula/archive \
--with-sd-user=bacula \
--with-sd-group=bacula \
--with-fd-user=root \
--with-fd-group=root
make NO_ECHO= || return 1
}
package() {
cd "$srcdir/$pkgname-$pkgver"
make DESTDIR="$pkgdir" install
for DAEMON in dir sd fd
do
install -Dm755 "$srcdir"/bacula-${DAEMON}-init \
"$pkgdir"/etc/init.d/bacula-${DAEMON}
install -Dm644 "$srcdir"/bacula-${DAEMON}-conf \
"$pkgdir"/etc/conf.d/bacula-${DAEMON}
done
install -Dm644 examples/sample-query.sql \
"$pkgdir"/etc/bacula/scripts/query.sql
# Fix correct log dir
sed -i -e 's%/var/bacula/log%/var/log/bacula%' \
"$pkgdir"/etc/bacula/bacula-dir.conf
# Install logrotate script
install -Dm644 scripts/logrotate $pkgdir/etc/logrotate.d/bacula
sed -i -e 's%/var/bacula/log%/var/log/bacula%' \
"$pkgdir"/etc/logrotate.d/bacula
# Use shell script for catalog backup instead of perl
sed -i -e 's/make_catalog_backup.pl/make_catalog_backup/' \
"$pkgdir"/etc/bacula/bacula-dir.conf
for dir in /var/lib/bacula /etc/bacula/scripts/make_catalog_backup* \
/etc/bacula/scripts/mtx-changer*
do
chown bacula.bacula "$pkgdir"$dir || return 1
done
find "$pkgdir" -iname *.la -delete
find "$pkgdir"/usr/lib -iname libbaccats* -type l -delete
}
_mv_backend() {
mkdir -p "$subpkgdir"/usr/lib
mkdir -p "$subpkgdir"/etc/bacula/scripts
mv "$pkgdir"/usr/lib/libbaccats-${1}-${pkgver}.so \
"$subpkgdir"/usr/lib || return 1
ln -s libbaccats-${pkgver}.so "$subpkgdir"/usr/lib/libbaccats.so
ln -s libbaccats-${1}-${pkgver}.so \
"$subpkgdir"/usr/lib/libbaccats-${pkgver}.so
#mv "$pkgdir"/usr/lib/libbaccats-${1}.so \
# "$subpkgdir"/usr/lib/libbaccats.so || return 1
mv "$pkgdir"/etc/bacula/scripts/*_${1}_* \
"$subpkgdir"/etc/bacula/scripts || return 1
}
mysql() {
pkgdesc="Bacula MySQL backend"
depends="bacula"
_mv_backend mysql
}
pgsql() {
pkgdesc="Bacula PGSQL backend"
depends="bacula"
pkgusers="postgres"
_mv_backend postgresql
for file in create_postgresql_database make_postgresql_tables \
grant_postgresql_privileges
do
chown postgres "$subpkgdir"/etc/bacula/scripts/$file
done
}
sqlite() {
pkgdesc="Bacula SQLite backend"
depends="bacula"
_mv_backend sqlite3
}
md5sums="43417bae0c221afb1f30a581c9e0f2fe bacula-5.2.13.tar.gz
b1b328013634c98119663730e3e2da7e bacula-dir-init
20f28a16f34e3f20ed18ed81b010e765 bacula-dir-conf
5ae1fba6860a320394d65744e5640bdb bacula-sd-init
afe2f9a4d79d7d96eb9372d003d10f86 bacula-sd-conf
6ae93e570f95fa845fa534c2d2efaac0 bacula-fd-init
4500ce2d62bf9df33c07f70dc40f7b85 bacula-fd-conf
71f7f9c041eff045b2e97d141316c059 bacula-5.0.2-config.patch
4e310e84c7aba5b8d043758e0fa0088f bacula-5.0.2-openssl.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
5d3c1bf25d50996e0c0c344dc2444014 bacula-config.patch
ebc9c2bbc9be95c920723a3f142d8e19 configure.in.patch
0ec20df57bb632ed729cfaf5d0a3ee33 bacula-5.0.3-Makefile.patch
cf7a2a4e972697f54364654c4e282b8b os.m4.patch
1bfdbfea7a36d5503753414dffb953eb cxx.patch"
sha256sums="a4bed458bf001889bd06bf31671b5d9908055a1d1e8113fd750ae4d326607ad8 bacula-5.2.13.tar.gz
5a8f830983dc12710aa422c7cb7c1cb5a97bbadd1d0bc94f6223127659038dc4 bacula-dir-init
5891bdb3a8ec581f8a2fd404a5a8995d8950d80da71a3b732474fb45e80d22c2 bacula-dir-conf
7c08606bbd391fa73773ef52bcee2dd989530c8c44b9dfae0b82cfe73976a400 bacula-sd-init
88808b3b971825acffc9dc3b6d418e52d9bd89df8527052c555cba4336ead784 bacula-sd-conf
12a62dd9c7a7931060c2c21e52cb9069a3774ebe7c8370455068e2dded0c2f80 bacula-fd-init
64124036c19e849cc580b981887be35b5746acb584397190a0afe2797b2d1ace bacula-fd-conf
b38d8419e4a607d3cba201223858e2c8cd4b50040c1ee7c11113d6deb008bd05 bacula-5.0.2-config.patch
632e80a756320419c7cb2f6ff733731408b2f07fbde8cc4e5be78586ba11935e bacula-5.0.2-openssl.patch
466682394aaf5f3a2a86d057da51753085cea12e9e82f67177bf0a95c060401e bacula-5.0.3-sqlite-priv.patch
addf9c8054f505e72e840dc99166ebf5819b2f8c720b8dc1a6bda3fe44ad5c26 bacula-5.2.3-as-needed.patch
d38d2ab752078a20d9e39abc9fefa27678aeb85c0cc4d12fb58447bbe3932b67 bacula-5.2.3-ldflags.patch
d11270bcd68eaafe52184891987b2fa6b5c446e901e0e1d0fdd05a0999b96cfc bacula-5.2.3-lib-search-path.patch
b0e18fdcdf35e2ccdcc480441dd58cf5b1e19456562041089a60008b0d70c847 bacula-config.patch
1675604190c796bf79910299ba2cf0a3aec3e07737d7caabf1a041c8706e74d1 configure.in.patch
a0c22db4653add98e172d248c46232349fc910b5418b99ad896ad7e41917187f bacula-5.0.3-Makefile.patch
9d676fb2f947d80aff54040df9703d9fdc0904bfbdb40cfab93185e16f78b3aa os.m4.patch
bb91379d5ef81887c9bd270387c1b204b9f800ce53cb91e767bb39187402d8af cxx.patch"
sha512sums="dfdff353f5b6ed4d85013dc292526706bbd67066f7057a114012172926c819c8df1eb8779166d5a90db3a49a5584f0a8daf7566cc93cf4fa3f1bdda245b55cf0 bacula-5.2.13.tar.gz
c120fdf566c33465aeb8609e43fc503dd16e5262c992f9c055eea457e3d512924d2ffa7e8d2be23ed9d90944fbc40cc8097117b0b0ae855ad879d5fe6eede1d9 bacula-dir-init
e06e5f8821d4a9a3f40cc8f11feeb5004780b82e2ad5e645f69a0f8faff78d8a8c6e66b36e105619b2a78d6b2f294dedd0e00e9bbf568af201cf299387135fef bacula-dir-conf
ee8a9206d3e604f5ac81bc70bece97ec77dae87b463a6ff4d08fba9418bf37e99a30895f115b2e9fbba1ec5f92b5d9368fd155717fedae12792f255b02413208 bacula-sd-init
80f6cf74cc14e722747d92e6e7b073bdf32456d395c6b4b63daa1ddcaf75f3d76d1b9a0e8e2da512e8f82e4d59a4a93cc38117af91d974fe7db644516bdb9909 bacula-sd-conf
e4c09734ccf9e1ac197ac4684c8294dddae817cf764b168ce7357b2529d11314f948ed2807d501b3c7cd7725ba488981fe573d7b389fca7feedfa9c8a1cce6fa bacula-fd-init
ff312e8952b31de27f22b257d12b570e151794d985f854ff19bab34363ea974d7583edced6b125518da3ecfe2b2a229b732473958b10484d988fcc8a67a372cc bacula-fd-conf
a40d07883b33a95869f324dd4206cf6b48ebe64824148c55caccb0aafca4543b36bac7da35325f3bd89db966fc22eb50230079c153d2a5b37dd203f9774aaa3d bacula-5.0.2-config.patch
41dd1f3a61d6fa2c612929310221952aef3dbd36ec2a7015abffbcd71a8273cb1d5d206be0a47171a66c813e011bd64ecf8f92acefbc3ce7362098a1361ab1e9 bacula-5.0.2-openssl.patch
6fef7572f7f267585ccc71ef7257380622ccadefcdb1e0e6ac2c972e748d4562fab0443a2ad08c20e5d4456326122c5df6728e119dac9b4fefc3b3e50a2fd61d bacula-5.0.3-sqlite-priv.patch
5e303c5c53d6cef8e875d32811d23a9b6f354c394a6dce11646ad3f4c827b03cf1bd3c0267ff8873e1a176eb0b33314b712d8c9dc3c4c4ba24306d80b3bae4c7 bacula-5.2.3-as-needed.patch
27f389af4fb0567a708722ff059fb2bf6779b23e9b716e48b2be3832cf134bd93ac6f80f44f3e63d2737ed25bd2ff08c140dd7a3f2529ecb4dedb58ea7b33aed bacula-5.2.3-ldflags.patch
4140dbbe9a28b58b4982c088bde1a26dffd9652cc7ea6c7a1ff971733b311ec8267b12ce539bc3a8511bfe65625adb73d8f911d09988c1fb1de901c00a682518 bacula-5.2.3-lib-search-path.patch
2240a55099b6dbaddfc1778cf9e9da3c88c2b7b9e583997151dfa10cf5fd8ea3ae562e524b5681b3b3bbb6aa2a5262d20c3ddefd67942abb2118274d7a7b0181 bacula-config.patch
257370247cd1ef9f6205a9162738d0821d674f469af48f5d560c8d8aa85ee2801aa0eb9b824fb75992f57e7695f0428c3ad0af0deb44e0c8a1d11f771cbe1502 configure.in.patch
b4d21e0ec6d0c3d0027b2125242c4216dc5cd84a144b2d4ee642bae44c920ca433cf21526654d792281bd8c87f1b36442160b89aad4ea97b37aa03462a22869e bacula-5.0.3-Makefile.patch
fe4313625885d1168ad8cc9fa5360c18c8cbff2d26bc8d5deba3e5fa40021a019860a473fef17dc7dfa6bb1a98a477301dbaaf9152b1bcee3382432ca7e8f973 os.m4.patch
727d358f8311dec839440ee9962bdf30bd33f062a15645c7a4f6c73bd5a3654c9c671f870cdcddf8f6d6b9e36516658305ba22a2484ae3437d7347fb3d2383b4 cxx.patch"
|