Lines 3-9
Link Here
|
3 |
|
3 |
|
4 |
PORTNAME= bacula |
4 |
PORTNAME= bacula |
5 |
DISTVERSION= 5.2.12 |
5 |
DISTVERSION= 5.2.12 |
6 |
PORTREVISION?= 0 |
6 |
PORTREVISION?= 1 |
7 |
CATEGORIES?= sysutils |
7 |
CATEGORIES?= sysutils |
8 |
MASTER_SITES= SF/bacula/bacula/${PORTVERSION} |
8 |
MASTER_SITES= SF/bacula/bacula/${PORTVERSION} |
9 |
PKGNAMEPREFIX?= # |
9 |
PKGNAMEPREFIX?= # |
Lines 47-52
Link Here
|
47 |
MANCOMPRESSED= yes |
47 |
MANCOMPRESSED= yes |
48 |
CONFIGURE_ARGS+=--with-tcp-wrappers=/usr/lib \ |
48 |
CONFIGURE_ARGS+=--with-tcp-wrappers=/usr/lib \ |
49 |
--enable-smartalloc \ |
49 |
--enable-smartalloc \ |
|
|
50 |
--sysconfdir=${ETCDIR} \ |
50 |
--with-working-dir=${BACULA_DIR} \ |
51 |
--with-working-dir=${BACULA_DIR} \ |
51 |
--with-scriptdir=${PREFIX}/share/${PORTNAME} \ |
52 |
--with-scriptdir=${PREFIX}/share/${PORTNAME} \ |
52 |
--with-readline=yes \ |
53 |
--with-readline=yes \ |
Lines 173-180
Link Here
|
173 |
# Change $(ECHO) to echo in some Makefile.in files |
174 |
# Change $(ECHO) to echo in some Makefile.in files |
174 |
@${REINPLACE_CMD} -e 's|$$(ECHO)|echo|g' ${WRKSRC}/src/filed/Makefile.in \ |
175 |
@${REINPLACE_CMD} -e 's|$$(ECHO)|echo|g' ${WRKSRC}/src/filed/Makefile.in \ |
175 |
${WRKSRC}/src/console/Makefile.in |
176 |
${WRKSRC}/src/console/Makefile.in |
176 |
# Default bconsole.conf is ${PREFIX}/etc |
177 |
# Default bconsole.conf is ${ETCDIR} |
177 |
@${REINPLACE_CMD} -e 's|./bconsole.conf|${PREFIX}/etc/bconsole.conf|g' ${WRKSRC}/src/console/console.c |
178 |
@${REINPLACE_CMD} -e 's|./bconsole.conf|${ETCDIR}/bconsole.conf|g' ${WRKSRC}/src/console/console.c |
178 |
@${REINPLACE_CMD} -e 's|^MAN8 =|MAN8 ?=|g' -e 's|^MAN1 =|MAN1 ?=|g' ${WRKSRC}/manpages/Makefile.in |
179 |
@${REINPLACE_CMD} -e 's|^MAN8 =|MAN8 ?=|g' -e 's|^MAN1 =|MAN1 ?=|g' ${WRKSRC}/manpages/Makefile.in |
179 |
.if defined(WITH_CLIENT_ONLY) |
180 |
.if defined(WITH_CLIENT_ONLY) |
180 |
# In client port only install startup script out of script dir (see below post-install) |
181 |
# In client port only install startup script out of script dir (see below post-install) |
Lines 191-196
Link Here
|
191 |
${WRKSRC}/src/tools/bpluginfo.c |
192 |
${WRKSRC}/src/tools/bpluginfo.c |
192 |
.endif |
193 |
.endif |
193 |
|
194 |
|
|
|
195 |
|
194 |
.if !target(pre-install) |
196 |
.if !target(pre-install) |
195 |
pre-install: |
197 |
pre-install: |
196 |
if [ ! -d "${BACULA_DIR}" ]; then \ |
198 |
if [ ! -d "${BACULA_DIR}" ]; then \ |
Lines 212-224
Link Here
|
212 |
@ ${SETENV} PKG_PREFIX=${PREFIX} \ |
214 |
@ ${SETENV} PKG_PREFIX=${PREFIX} \ |
213 |
${SH} ${PKGINSTALL} ${PORTNAME} |
215 |
${SH} ${PKGINSTALL} ${PORTNAME} |
214 |
# Console stuff |
216 |
# Console stuff |
215 |
if [ -f ${PREFIX}/etc/bconsole.conf.new ]; then \ |
217 |
if [ -f ${ETCDIR}/bconsole.conf.new ]; then \ |
216 |
${ECHO_CMD} "etc/bconsole.conf.new" >> ${TMPPLIST}; \ |
218 |
${ECHO_CMD} "etc/bconsole.conf.new" >> ${TMPPLIST}; \ |
217 |
${CHGRP} bacula ${PREFIX}/etc/bconsole.conf.new; \ |
219 |
${CHGRP} bacula ${ETCDIR}/bconsole.conf.new; \ |
218 |
elif [ -f ${PREFIX}/etc/bconsole.conf ]; then \ |
220 |
elif [ -f ${ETCDIR}/bconsole.conf ]; then \ |
219 |
${MV} ${PREFIX}/etc/bconsole.conf ${PREFIX}/etc/bconsole.conf.sample; \ |
221 |
${MV} ${ETCDIR}/bconsole.conf ${ETCDIR}/bconsole.conf.sample; \ |
220 |
${CHGRP} bacula ${PREFIX}/etc/bconsole.conf.sample; \ |
222 |
${CHGRP} bacula ${ETCDIR}/bconsole.conf.sample; \ |
221 |
${ECHO_CMD} "etc/bconsole.conf.sample" >> ${TMPPLIST}; \ |
223 |
${ECHO_CMD} "etc/bacula/bconsole.conf.sample" >> ${TMPPLIST}; \ |
222 |
fi |
224 |
fi |
223 |
|
225 |
|
224 |
# ensure that users in the bacula group can run bconsole |
226 |
# ensure that users in the bacula group can run bconsole |
Lines 226-247
Link Here
|
226 |
.else |
228 |
.else |
227 |
# Install config files and preserve existing ones |
229 |
# Install config files and preserve existing ones |
228 |
${INSTALL_SCRIPT} ${FILESDIR}/chio-bacula ${PREFIX}/sbin |
230 |
${INSTALL_SCRIPT} ${FILESDIR}/chio-bacula ${PREFIX}/sbin |
229 |
if [ -f ${PREFIX}/etc/bacula-barcodes ]; then \ |
231 |
if [ -f ${ETCDIR}/bacula-barcodes ]; then \ |
230 |
${INSTALL_DATA} ${FILESDIR}/bacula-barcodes ${PREFIX}/etc/bacula-barcodes.new ; \ |
232 |
${INSTALL_DATA} ${FILESDIR}/bacula-barcodes ${ETCDIR}/bacula-barcodes.new ; \ |
231 |
${ECHO_CMD} "etc/bacula-barcodes.new" >> ${TMPPLIST}; \ |
233 |
${ECHO_CMD} "etc/bacula/bacula-barcodes.new" >> ${TMPPLIST}; \ |
232 |
else \ |
234 |
else \ |
233 |
${INSTALL_DATA} ${FILESDIR}/bacula-barcodes ${PREFIX}/etc/bacula-barcodes.samples ; \ |
235 |
${INSTALL_DATA} ${FILESDIR}/bacula-barcodes ${ETCDIR}/bacula-barcodes.samples ; \ |
234 |
${ECHO_CMD} "etc/bacula-barcodes.samples" >> ${TMPPLIST}; \ |
236 |
${ECHO_CMD} "etc/bacula/bacula-barcodes.samples" >> ${TMPPLIST}; \ |
235 |
fi |
237 |
fi |
236 |
# chmod of bsmtp program so bacula can use it with dropped down permissions |
238 |
# chmod of bsmtp program so bacula can use it with dropped down permissions |
237 |
${CHMOD} o+x ${PREFIX}/sbin/bsmtp |
239 |
${CHMOD} o+x ${PREFIX}/sbin/bsmtp |
238 |
${CHOWN} -R bacula:bacula ${PREFIX}/share/bacula |
240 |
${CHOWN} -R bacula:bacula ${PREFIX}/share/bacula |
239 |
|
241 |
|
240 |
# on a fresh install, the .new suffix is not used |
242 |
# on a fresh install, the .new suffix is not used |
241 |
if [ -f ${PREFIX}/etc/bacula-dir.conf.new ]; then \ |
243 |
if [ -f ${ETCDIR}/bacula-dir.conf.new ]; then \ |
242 |
${CHGRP} bacula ${PREFIX}/etc/bacula-dir.conf.new; \ |
244 |
${CHGRP} bacula ${ETCDIR}/bacula-dir.conf.new; \ |
243 |
else \ |
245 |
else \ |
244 |
${CHGRP} bacula ${PREFIX}/etc/bacula-dir.conf; \ |
246 |
${CHGRP} bacula ${ETCDIR}/bacula-dir.conf; \ |
245 |
fi |
247 |
fi |
246 |
|
248 |
|
247 |
${CHGRP} bacula ${PREFIX}/sbin/dbcheck |
249 |
${CHGRP} bacula ${PREFIX}/sbin/dbcheck |
Lines 249-259
Link Here
|
249 |
.endif |
251 |
.endif |
250 |
# Install leaves existing conf files untouched. Respect this here! |
252 |
# Install leaves existing conf files untouched. Respect this here! |
251 |
for na in ${CONFFILES}; do \ |
253 |
for na in ${CONFFILES}; do \ |
252 |
if [ -f ${PREFIX}/etc/bacula-$$na.conf.new ]; then \ |
254 |
if [ -f ${ETCDIR}/bacula-$$na.conf.new ]; then \ |
253 |
${ECHO_CMD} "etc/bacula-$$na.conf.new" >> ${TMPPLIST}; \ |
255 |
${ECHO_CMD} "etc/bacula/bacula-$$na.conf.new" >> ${TMPPLIST}; \ |
254 |
elif [ -f ${PREFIX}/etc/bacula-$$na.conf ]; then \ |
256 |
elif [ -f ${ETCDIR}/bacula-$$na.conf ]; then \ |
255 |
${MV} ${PREFIX}/etc/bacula-$$na.conf ${PREFIX}/etc/bacula-$$na.conf.sample; \ |
257 |
${MV} ${ETCDIR}/bacula-$$na.conf ${ETCDIR}/bacula-$$na.conf.sample; \ |
256 |
${ECHO_CMD} "etc/bacula-$$na.conf.sample" >> ${TMPPLIST}; \ |
258 |
${ECHO_CMD} "etc/bacula/bacula-$$na.conf.sample" >> ${TMPPLIST}; \ |
257 |
fi; \ |
259 |
fi; \ |
258 |
done |
260 |
done |
259 |
|
261 |
|
Lines 265-267
Link Here
|
265 |
.include "${MASTERDIR}/Makefile.common" |
267 |
.include "${MASTERDIR}/Makefile.common" |
266 |
.endif # -client and -server are defined |
268 |
.endif # -client and -server are defined |
267 |
.include <bsd.port.post.mk> |
269 |
.include <bsd.port.post.mk> |
|
|
270 |
|