3687d4b37e
Pointed out by sthen@ "reads fine" jasper@
186 lines
5.1 KiB
Makefile
186 lines
5.1 KiB
Makefile
# $OpenBSD: Makefile,v 1.10 2008/02/16 21:22:41 merdely Exp $
|
|
|
|
COMMENT-main= network backup solution (client)
|
|
COMMENT-server= network backup solution (server)
|
|
|
|
V= 2.2.8
|
|
DISTNAME= bacula-$V
|
|
FULLPKGNAME-main= bacula-client-$Vp0
|
|
PKGNAME-server= bacula-server-$Vp0
|
|
CATEGORIES= sysutils
|
|
|
|
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=bacula/}
|
|
HOMEPAGE= http://www.bacula.org/
|
|
|
|
MAINTAINER= Michael Erdely <merdely@openbsd.org>
|
|
|
|
WANTLIB= c pthread crypto ssl z m stdc++
|
|
WANTLIB-server= ${WANTLIB} readline termcap
|
|
|
|
MULTI_PACKAGES= -main -server
|
|
|
|
# GPL (majority), LGPL (some libraries) and PD
|
|
# http://bacula.org/en/dev-manual/Bacula_Copyri_Tradem_Licens.html
|
|
PERMIT_PACKAGE_CDROM= Yes
|
|
PERMIT_PACKAGE_FTP= Yes
|
|
PERMIT_DISTFILES_CDROM= Yes
|
|
PERMIT_DISTFILES_FTP= Yes
|
|
|
|
SD_USER= _bacula-sd
|
|
BACULACONF= /etc/bacula
|
|
BACULASTATE= /var/bacula
|
|
SUBST_VARS= SD_USER BACULACONF BACULASTATE
|
|
|
|
CONFIGURE_STYLE= simple
|
|
USE_GMAKE= yes
|
|
NO_REGRESS= yes
|
|
|
|
FLAVORS= pgsql mysql sqlite3 sqlite
|
|
FLAVOR?= sqlite3
|
|
|
|
CONFIGURE_ARGS= --enable-smartalloc \
|
|
--prefix=${PREFIX} \
|
|
--mandir=${PREFIX}/man \
|
|
--infodir=${PREFIX}/info \
|
|
--sysconfdir=${BACULACONF} \
|
|
--with-scriptdir=${PREFIX}/libexec/bacula \
|
|
--localstatedir=${BACULASTATE} \
|
|
--with-pid-dir=/var/run \
|
|
--with-subsys-dir=${BACULASTATE} \
|
|
--with-working-dir=${BACULASTATE} \
|
|
--with-dir-user=_bacula \
|
|
--with-dir-group=_bacula \
|
|
--with-sd-user=${SD_USER} \
|
|
--with-sd-group=_bacula \
|
|
--with-sbin-perm=755 \
|
|
--without-x \
|
|
--without-tcp-wrappers \
|
|
--without-smtp-host \
|
|
--without-job-email \
|
|
--without-dump-email \
|
|
--disable-gnome \
|
|
--disable-bwx-console \
|
|
--disable-tray-monitor \
|
|
--disable-nls \
|
|
--disable-conio \
|
|
--enable-readline \
|
|
--with-openssl
|
|
|
|
CONFIGURE_ENV+= CPPFLAGS="-I/usr/include/readline \
|
|
-I${LOCALBASE}/include" \
|
|
LDFLAGS="-L${LOCALBASE}/lib" \
|
|
PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
|
|
PTHREAD_LIBS="${PTHREAD_LIBS}" \
|
|
MTX=/bin/chio \
|
|
TAPEDRIVE=/dev/rst0 \
|
|
CONFIG_SITE=${PORTSDIR}/infrastructure/db/config.site \
|
|
QMAKEQT4=${LOCALBASE}/bin/qmake4 \
|
|
PKG_CONFIG_LIBDIR="${LOCALBASE}/lib/qt4/pkgconfig:${LOCALBASE}/lib/qt4"
|
|
|
|
BACKEND=
|
|
.if ${FLAVOR:L:Mpgsql}
|
|
.if !empty(BACKEND)
|
|
ERRORS+= "Fatal: choose either pgsql or mysql or sqlite or sqlite3"
|
|
.endif
|
|
CONFIGURE_ARGS+= --with-postgresql \
|
|
--without-mysql \
|
|
--without-sqlite \
|
|
--without-sqlite3
|
|
LIB_DEPENDS+= pq.>=2:postgresql-client-*:databases/postgresql
|
|
BACKEND= postgresql
|
|
.else
|
|
CONFIGURE_ARGS+= --without-postgresql
|
|
.endif
|
|
|
|
.if ${FLAVOR:L:Mmysql}
|
|
.if !empty(BACKEND)
|
|
ERRORS+= "Fatal: choose either pgsql or mysql or sqlite or sqlite3"
|
|
.endif
|
|
CONFIGURE_ARGS+= --without-postgresql \
|
|
--with-mysql \
|
|
--without-sqlite \
|
|
--without-sqlite3 \
|
|
--enable-batch-insert
|
|
LIB_DEPENDS+= lib/mysql/mysqlclient.>=10::databases/mysql
|
|
BACKEND= mysql
|
|
.else
|
|
CONFIGURE_ARGS+= --without-mysql
|
|
.endif
|
|
|
|
.if ${FLAVOR:L:Msqlite3}
|
|
.if !empty(BACKEND)
|
|
ERRORS+= "Fatal: choose either pgsql or mysql or sqlite or sqlite3"
|
|
.endif
|
|
CONFIGURE_ARGS+= --without-postgresql \
|
|
--without-mysql \
|
|
--without-sqlite \
|
|
--with-sqlite3
|
|
LIB_DEPENDS+= sqlite3.>=8::databases/sqlite3
|
|
BACKEND= sqlite3
|
|
.else
|
|
CONFIGURE_ARGS+= --without-sqlite3
|
|
.endif
|
|
|
|
.if ${FLAVOR:L:Msqlite}
|
|
.if !empty(BACKEND)
|
|
ERRORS+= "Fatal: choose either pgsql or mysql or sqlite or sqlite3"
|
|
.endif
|
|
CONFIGURE_ARGS+= --without-postgresql \
|
|
--without-mysql \
|
|
--with-sqlite \
|
|
--without-sqlite3
|
|
LIB_DEPENDS+= sqlite::databases/sqlite
|
|
BACKEND= sqlite
|
|
.else
|
|
CONFIGURE_ARGS+= --without-sqlite
|
|
.endif
|
|
SUBST_VARS+= BACKEND
|
|
|
|
.if empty(BACKEND)
|
|
ERRORS+= "Fatal: choose either pgsql or mysql or sqlite or sqlite3"
|
|
.endif
|
|
|
|
LIB_DEPENDS-main=
|
|
|
|
PSEUDO_FLAVORS+= no_bat
|
|
.if ${FLAVOR:L:Mno_bat}
|
|
CONFIGURE_ARGS+= --disable-bat \
|
|
--without-qwt
|
|
.else
|
|
CONFIGURE_ARGS+= --enable-bat \
|
|
--with-qwt=${LOCALBASE}
|
|
FULLPKGNAME-bat= bacula-bat-$Vp0
|
|
WANTLIB-bat= ${WANTLIB} ICE QtCore QtGui SM X11 Xcursor Xext Xfixes
|
|
WANTLIB-bat+= Xi Xinerama Xrandr Xrender fontconfig freetype glib-2.0
|
|
WANTLIB-bat+= gthread-2.0 iconv intl png
|
|
MULTI_PACKAGES+= -bat
|
|
LIB_DEPENDS-bat= qwt.>=5::x11/qwt
|
|
COMMENT-bat= network backup solution (gui-client)
|
|
.endif
|
|
|
|
pre-configure:
|
|
perl -pi -e "s%!!BACULACONF!!%${BACULACONF}%" \
|
|
${WRKSRC}/manpages/bat.1 ${WRKSRC}/src/qt-console/main.cpp
|
|
|
|
post-install:
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/bacula
|
|
${INSTALL_DATA} ${WRKINST}/etc/bacula/bacula-dir.conf \
|
|
${WRKINST}/etc/bacula/bacula-fd.conf \
|
|
${WRKINST}/etc/bacula/bacula-sd.conf \
|
|
${WRKINST}/etc/bacula/bconsole.conf \
|
|
${PREFIX}/share/examples/bacula/
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/bacula
|
|
perl -pe "s%!!TRUEPREFIX!!%${TRUEPREFIX}%g,s%!!BACULACONF!!%${BACULACONF}%g" \
|
|
${FILESDIR}/README-client.OpenBSD > \
|
|
${PREFIX}/share/doc/bacula/README-client.OpenBSD
|
|
perl -pe "s%!!TRUEPREFIX!!%${TRUEPREFIX}%g,s%!!BACULACONF!!%${BACULACONF}%g,s%!!SD_USER!!%${SD_USER}%g" \
|
|
${FILESDIR}/README-server.OpenBSD > \
|
|
${PREFIX}/share/doc/bacula/README-server.OpenBSD
|
|
.if !${FLAVOR:L:Mno_bat}
|
|
${INSTALL_PROGRAM} ${WRKSRC}/src/qt-console/bat ${PREFIX}/sbin/
|
|
${INSTALL_DATA} ${WRKINST}/etc/bacula/bat.conf \
|
|
${PREFIX}/share/examples/bacula/
|
|
.endif
|
|
|
|
.include <bsd.port.mk>
|