aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/bacula-server
diff options
context:
space:
mode:
authorlkoeller <lkoeller@FreeBSD.org>2004-12-20 01:12:44 +0800
committerlkoeller <lkoeller@FreeBSD.org>2004-12-20 01:12:44 +0800
commit32a6c2b4d38ac3e6c6ee58f15e48f96e756f868c (patch)
tree39ad19e76603d85b2b387c0d33a404668dccbfa1 /sysutils/bacula-server
parentce1b83962406295ecb93a159a6c725ee18389b89 (diff)
downloadfreebsd-ports-gnome-32a6c2b4d38ac3e6c6ee58f15e48f96e756f868c.tar.gz
freebsd-ports-gnome-32a6c2b4d38ac3e6c6ee58f15e48f96e756f868c.tar.zst
freebsd-ports-gnome-32a6c2b4d38ac3e6c6ee58f15e48f96e756f868c.zip
o) Fix install and pkg-plist problems due to split of bacula into -client and
-server ports. The install process of bacula only knows client only (but it's not clean) and a full install. Submitted by: Kris Kennaway <kris@obsecurity.org>
Diffstat (limited to 'sysutils/bacula-server')
-rw-r--r--sysutils/bacula-server/Makefile31
-rw-r--r--sysutils/bacula-server/pkg-plist1
2 files changed, 23 insertions, 9 deletions
diff --git a/sysutils/bacula-server/Makefile b/sysutils/bacula-server/Makefile
index ed0fd55f2643..47a3d91296e5 100644
--- a/sysutils/bacula-server/Makefile
+++ b/sysutils/bacula-server/Makefile
@@ -7,7 +7,7 @@
PORTNAME= bacula
PORTVERSION= 1.36.1
-PORTREVISION= 0
+PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= bacula
@@ -39,7 +39,7 @@ CONFIGURE_ARGS= --with-tcp-wrappers=/usr/lib \
CONFIGURE_ENV+= CPPFLAGS="-I/usr/include/readline -I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib ${PTHREAD_LIBS}"
-ALL_OPTIONS= CLIENT_ONLY WXCONSOLE GNOMECONSOLE MYSQL POSTGRESQL
+ALL_OPTIONS= CLIENT_ONLY WXCONSOLE GNOMECONSOLE MYSQL POSTGRESQL MTX
.for opt in ${ALL_OPTIONS}
.if defined(WITH_${opt})
@@ -151,9 +151,21 @@ pre-everything::
post-patch:
@${REINPLACE_CMD} -e 's|-pthread|${PTHREAD_CFLAGS}|g' ${WRKSRC}/configure
+.if defined(WITH_CLIENT_ONLY)
+ # In client port only install startup script out of script dir (see below post-install)
+ # Dont mkdir ${PREFIX}/share/bacule cause it's empty
+ @${REINPLACE_CMD} -e 's|^\(fd_subdirs = .*\)scripts\(.*\)|\1\2|g' ${WRKSRC}/Makefile.in
+ ${REINPLACE_CMD} -e 's|\(.*$$(MKDIR) $$(DESTDIR)$$(scriptdir)\)|#\1|g' ${WRKSRC}/Makefile.in
+.else
+ # In server port don't install documentation and filed
+ @${REINPLACE_CMD} -e 's|^\(fd_subdirs = .*\)doc\(.*\)|\1\2|g' ${WRKSRC}/Makefile.in
+ @${REINPLACE_CMD} -e 's|^all_subdirs = .*|all_subdirs = scripts src\/lib src\/findlib $${subdirs}|g' ${WRKSRC}/Makefile.in
+.endif
post-install:
.if defined(WITH_CLIENT_ONLY)
+ # Install start script
+ ${INSTALL_SCRIPT} ${WRKSRC}/scripts/bacula ${PREFIX}/etc/rc.d/bacula.sh.sample
# Extend only /etc/services
@ ${SETENV} PKG_PREFIX=${PREFIX} \
${SH} ${PKGINSTALL} ${PORTNAME}
@@ -180,6 +192,14 @@ post-install:
${ECHO_CMD} "etc/gnome-console.conf.sample" >> ${TMPPLIST}; \
fi
.endif
+# Documentaion is only installed in -client port
+.if !defined(NOPORTDOCS)
+ ${MKDIR} ${DOCSDIR}/html-manual
+ cd ${WRKSRC}/doc && ${FIND} html-manual | \
+ ${CPIO} -pdm -L -R root:wheel ${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/doc/bacula.pdf ${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/ReleaseNotes ${DOCSDIR}
+.endif
.else
# Extend /etc/services and install UID/GID
@ ${SETENV} PKG_PREFIX=${PREFIX} \
@@ -207,13 +227,6 @@ post-install:
fi; \
done
-.if !defined(NOPORTDOCS)
- ${MKDIR} ${DOCSDIR}/html-manual
- cd ${WRKSRC}/doc && ${FIND} html-manual | \
- ${CPIO} -pdm -L -R root:wheel ${DOCSDIR}
- ${INSTALL_DATA} ${WRKSRC}/doc/bacula.pdf ${DOCSDIR}
- ${INSTALL_DATA} ${WRKSRC}/ReleaseNotes ${DOCSDIR}
-.endif
# Inform user after install about important things ....
@${ECHO_MSG} "*********************************************************************"
diff --git a/sysutils/bacula-server/pkg-plist b/sysutils/bacula-server/pkg-plist
index 139cb31b1650..c970de2ba59d 100644
--- a/sysutils/bacula-server/pkg-plist
+++ b/sysutils/bacula-server/pkg-plist
@@ -12,6 +12,7 @@ sbin/btape
%%GNOMECONS%%sbin/gnome-console
sbin/dbcheck
sbin/bsmtp
+@unexec if cmp -s %D/share/bacula/mtx-changer.old %D/share/bacula/mtx-changer; then rm -f %D/share/bacula/mtx-changer.old; fi
%%DATADIR%%/mtx-changer
%%DATADIR%%/create_bacula_database
%%DATADIR%%/create_%%DBTYPE%%_database