|
Lines 11-20
Link Here
|
| 11 |
LICENSE="GPL-2" |
11 |
LICENSE="GPL-2" |
| 12 |
SLOT="0" |
12 |
SLOT="0" |
| 13 |
KEYWORDS="~amd64 ~x86" |
13 |
KEYWORDS="~amd64 ~x86" |
| 14 |
IUSE="readline ncurses tcpd gnome mysql sqlite X static postgres client-only" |
14 |
# BUG: |
|
|
15 |
# USE=ssl is not fully tested |
| 16 |
# USE=static may conflicts --with-openssl, |
| 17 |
# missing USE: wx-console |
| 18 |
# see http://www.bacula.org/rel-manual/Installing_Bacula.html |
| 19 |
IUSE="readline ncurses tcpd gnome mysql sqlite X static postgres client-only ssl" |
| 15 |
|
20 |
|
|
|
21 |
# do not install tape related package |
| 22 |
# bug 108971 |
| 16 |
DEPEND=">=sys-libs/zlib-1.1.4 |
23 |
DEPEND=">=sys-libs/zlib-1.1.4 |
| 17 |
sys-block/mtx |
24 |
!client-only? ( sys-block/mtx ) |
| 18 |
readline? ( >=sys-libs/readline-4.1 ) |
25 |
readline? ( >=sys-libs/readline-4.1 ) |
| 19 |
tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) |
26 |
tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) |
| 20 |
gnome? ( gnome-base/libgnome ) |
27 |
gnome? ( gnome-base/libgnome ) |
|
Lines 28-35
Link Here
|
| 28 |
dev-libs/gmp" |
35 |
dev-libs/gmp" |
| 29 |
|
36 |
|
| 30 |
RDEPEND="${DEPEND} |
37 |
RDEPEND="${DEPEND} |
| 31 |
sys-block/mtx |
38 |
!client-only? ( sys-block/mtx ) |
| 32 |
app-arch/mt-st" |
39 |
!client-only? ( app-arch/mt-st )" |
| 33 |
|
40 |
|
| 34 |
pkg_setup() { |
41 |
pkg_setup() { |
| 35 |
if ! use mysql && ! use postgres && ! use sqlite && ! use client-only; then |
42 |
if ! use mysql && ! use postgres && ! use sqlite && ! use client-only; then |
|
Lines 56-70
Link Here
|
| 56 |
|
63 |
|
| 57 |
# This changes the default conf files to /etc/bacula files |
64 |
# This changes the default conf files to /etc/bacula files |
| 58 |
sed -i -e 's:"./gnome-console.conf":"/etc/bacula/gnome-console.conf":' \ |
65 |
sed -i -e 's:"./gnome-console.conf":"/etc/bacula/gnome-console.conf":' \ |
| 59 |
src/gnome-console/console.c src/gnome2-console/console.c |
66 |
src/gnome2-console/console.c \ |
|
|
67 |
|| die "sed failed" |
| 60 |
sed -i -e 's:"./tray-monitor.conf":"/etc/bacula/tray-monitor.conf":' \ |
68 |
sed -i -e 's:"./tray-monitor.conf":"/etc/bacula/tray-monitor.conf":' \ |
| 61 |
src/tray-monitor/tray-monitor.c |
69 |
src/tray-monitor/tray-monitor.c \ |
|
|
70 |
|| die "sed failed" |
| 62 |
sed -i -e 's:"bacula-sd.conf":"/etc/bacula/bacula-sd.conf":' src/stored/bls.c \ |
71 |
sed -i -e 's:"bacula-sd.conf":"/etc/bacula/bacula-sd.conf":' src/stored/bls.c \ |
| 63 |
src/stored/bextract.c src/stored/bcopy.c src/stored/bscan.c src/stored/btape.c \ |
72 |
src/stored/bextract.c src/stored/bcopy.c src/stored/bscan.c src/stored/btape.c \ |
| 64 |
src/stored/stored.c |
73 |
src/stored/stored.c \ |
| 65 |
sed -i -e 's:"./bacula-fd.conf":"/etc/bacula/bacula-fd.conf":' src/filed/filed.c |
74 |
|| die "sed failed" |
| 66 |
sed -i -e 's:"./bacula-dir.conf":"/etc/bacula/bacula-dir.conf":' src/dird/dird.c |
75 |
sed -i -e 's:"./bacula-fd.conf":"/etc/bacula/bacula-fd.conf":' \ |
| 67 |
sed -i -e 's:"./bconsole.conf":"/etc/bacula/bconsole.conf":' src/console/console.c |
76 |
src/filed/filed.c \ |
|
|
77 |
|| die "sed failed" |
| 78 |
sed -i -e 's:"./bacula-dir.conf":"/etc/bacula/bacula-dir.conf":' \ |
| 79 |
src/dird/dird.c \ |
| 80 |
|| die "sed failed" |
| 81 |
sed -i -e 's:"./bconsole.conf":"/etc/bacula/bconsole.conf":' \ |
| 82 |
src/console/console.c \ |
| 83 |
|| die "sed failed" |
| 68 |
} |
84 |
} |
| 69 |
|
85 |
|
| 70 |
src_compile() { |
86 |
src_compile() { |
|
Lines 96-101
Link Here
|
| 96 |
$(use_with postgres postgresql) \ |
112 |
$(use_with postgres postgresql) \ |
| 97 |
$(use_with sqlite) \ |
113 |
$(use_with sqlite) \ |
| 98 |
$(use_enable ncurses conio) \ |
114 |
$(use_enable ncurses conio) \ |
|
|
115 |
$(use_with ssl openssl) \ |
| 99 |
|| die "configure failed" |
116 |
|| die "configure failed" |
| 100 |
|
117 |
|
| 101 |
emake || die "make failed" |
118 |
emake || die "make failed" |
|
Lines 128-135
Link Here
|
| 128 |
insinto /usr/share/pixmaps |
145 |
insinto /usr/share/pixmaps |
| 129 |
doins scripts/bacula.png |
146 |
doins scripts/bacula.png |
| 130 |
|
147 |
|
| 131 |
insinto /var/lib/bacula/update |
148 |
# do not install SQL scripts if USE=client-only |
| 132 |
doins updatedb/update* |
149 |
# bug 108971 |
|
|
150 |
if ! use client-only ; then |
| 151 |
insinto /var/lib/bacula/update |
| 152 |
doins updatedb/update* |
| 153 |
fi |
| 133 |
|
154 |
|
| 134 |
dodoc ChangeLog README ReleaseNotes |
155 |
dodoc ChangeLog README ReleaseNotes |
| 135 |
|
156 |
|
|
Lines 144-150
Link Here
|
| 144 |
else |
165 |
else |
| 145 |
USEDB='' |
166 |
USEDB='' |
| 146 |
fi |
167 |
fi |
| 147 |
sed -i -e "s:%%USE_DB%%:${USEDB}:" ${D}/etc/init.d/bacula |
168 |
sed -i -e "s:%%USE_DB%%:${USEDB}:" ${D}/etc/init.d/bacula \ |
|
|
169 |
|| die "sed failed" |
| 148 |
|
170 |
|
| 149 |
insinto /etc/conf.d |
171 |
insinto /etc/conf.d |
| 150 |
newins ${FILESDIR}/bacula-conf bacula |
172 |
newins ${FILESDIR}/bacula-conf bacula |
|
Lines 153-160
Link Here
|
| 153 |
else |
175 |
else |
| 154 |
SERVICES='sd fd dir' |
176 |
SERVICES='sd fd dir' |
| 155 |
fi |
177 |
fi |
| 156 |
sed -i -e "s:%%SERVICES%%:${SERVICES}:" ${D}/etc/conf.d/bacula |
178 |
sed -i -e "s:%%SERVICES%%:${SERVICES}:" ${D}/etc/conf.d/bacula \ |
|
|
179 |
|| die "sed failed" |
| 157 |
|
180 |
|
|
|
181 |
# why are these needed? |
| 182 |
# use fowners and fperms instead |
| 158 |
chgrp bacula ${D}/usr/sbin/* |
183 |
chgrp bacula ${D}/usr/sbin/* |
| 159 |
chgrp -R bacula ${D}/etc/bacula |
184 |
chgrp -R bacula ${D}/etc/bacula |
| 160 |
} |
185 |
} |