2014-06-23 07:57:48 +00:00
|
|
|
# $OpenBSD: Makefile,v 1.78 2014/06/23 07:57:48 ajacoutot Exp $
|
|
|
|
|
|
|
|
# XXX building this port while a version is already installed on the
|
|
|
|
# system will lead to unexpected hidden dependencies!!!
|
2012-03-06 20:11:33 +00:00
|
|
|
|
|
|
|
SHARED_ONLY= Yes
|
2007-07-20 11:02:14 +00:00
|
|
|
|
2008-02-07 02:53:35 +00:00
|
|
|
COMMENT-main= network backup solution (client)
|
2007-07-20 11:02:14 +00:00
|
|
|
COMMENT-server= network backup solution (server)
|
2008-10-19 03:44:42 +00:00
|
|
|
COMMENT-bat= network backup solution (gui-client)
|
2014-06-23 07:57:48 +00:00
|
|
|
COMMENT-mysql= Bacula libbaccats support for MySQL
|
|
|
|
COMMENT-pgsql= Bacula libbaccats support for PostgreSQL
|
|
|
|
COMMENT-sqlite3= Bacula libbaccats support for SQLite3
|
2007-07-20 11:02:14 +00:00
|
|
|
|
2014-06-04 14:40:08 +00:00
|
|
|
V= 7.0.4
|
2008-02-07 02:53:35 +00:00
|
|
|
DISTNAME= bacula-$V
|
2014-06-23 07:57:48 +00:00
|
|
|
PKGNAME-main= bacula-client-$V
|
2009-01-12 21:17:07 +00:00
|
|
|
PKGNAME-server= bacula-server-$V
|
2014-06-23 07:57:48 +00:00
|
|
|
PKGNAME-bat= bacula-bat-$V
|
|
|
|
PKGNAME-mysql= bacula-mysql-$V
|
|
|
|
PKGNAME-pgsql= bacula-pgsql-$V
|
|
|
|
PKGNAME-sqlite3= bacula-sqlite3-$V
|
2007-07-20 11:02:14 +00:00
|
|
|
|
2014-06-23 07:57:48 +00:00
|
|
|
REVISION-server= 2
|
|
|
|
REVISION-main= 1
|
|
|
|
REVISION-bat= 1
|
|
|
|
|
|
|
|
CATEGORIES= sysutils
|
2014-06-13 13:34:38 +00:00
|
|
|
|
2014-04-19 09:44:11 +00:00
|
|
|
SHARED_LIBS += bac 5.0
|
|
|
|
SHARED_LIBS += baccfg 5.0
|
|
|
|
SHARED_LIBS += bacfind 5.0
|
|
|
|
SHARED_LIBS += bacsql 5.0
|
2013-05-25 00:33:09 +00:00
|
|
|
|
2014-04-19 09:44:11 +00:00
|
|
|
BACCATS_LIBV = 3.0
|
2012-03-06 20:11:33 +00:00
|
|
|
SHARED_LIBS += baccats ${BACCATS_LIBV}
|
2014-06-23 07:57:48 +00:00
|
|
|
SHARED_LIBS += baccats-mysql ${BACCATS_LIBV}
|
|
|
|
SHARED_LIBS += baccats-postgresql ${BACCATS_LIBV}
|
|
|
|
SHARED_LIBS += baccats-sqlite3 ${BACCATS_LIBV}
|
2009-10-02 02:34:05 +00:00
|
|
|
|
2007-07-20 11:02:14 +00:00
|
|
|
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=bacula/}
|
|
|
|
HOMEPAGE= http://www.bacula.org/
|
|
|
|
|
2014-04-19 09:44:11 +00:00
|
|
|
MAINTAINER= Stuart Henderson <sthen@openbsd.org> \
|
|
|
|
Antoine Jacoutot <ajacoutot@openbsd.org>
|
2007-07-20 11:02:14 +00:00
|
|
|
|
2011-11-17 23:45:56 +00:00
|
|
|
WANTLIB += c pthread crypto ssl z m stdc++
|
2007-07-20 11:02:14 +00:00
|
|
|
|
2011-11-17 23:45:56 +00:00
|
|
|
# AGPLv3 with exception for OpenSSL (majority),
|
2009-10-02 02:34:05 +00:00
|
|
|
# FDL (docs), LGPL (some libraries), and PD
|
2014-04-19 09:44:11 +00:00
|
|
|
# http://www.bacula.org/7.0.x-manuals/en/main/Bacula_Copyright_Trademark_.html
|
2007-07-20 11:02:14 +00:00
|
|
|
PERMIT_PACKAGE_CDROM= Yes
|
|
|
|
|
2013-04-12 10:39:04 +00:00
|
|
|
MODULES= devel/gettext
|
|
|
|
|
2014-04-19 09:44:11 +00:00
|
|
|
LOCALSTATEDIR= ${BASELOCALSTATEDIR}/bacula
|
|
|
|
SYSCONFDIR= ${BASESYSCONFDIR}/bacula
|
2007-07-20 11:02:14 +00:00
|
|
|
|
2014-04-19 09:44:11 +00:00
|
|
|
CONFIGURE_STYLE= gnu
|
|
|
|
USE_GMAKE= Yes
|
|
|
|
NO_TEST= Yes
|
2007-07-20 11:02:14 +00:00
|
|
|
|
2014-06-23 07:57:48 +00:00
|
|
|
PSEUDO_FLAVORS= no_bat
|
|
|
|
FLAVOR?=
|
2011-10-21 17:04:23 +00:00
|
|
|
|
2014-06-23 07:57:48 +00:00
|
|
|
MULTI_PACKAGES= -main -server -bat -mysql -pgsql -sqlite3
|
2011-10-21 17:04:23 +00:00
|
|
|
|
2007-07-20 11:02:14 +00:00
|
|
|
CONFIGURE_ARGS= --enable-smartalloc \
|
2009-10-02 02:34:05 +00:00
|
|
|
--docdir=${PREFIX}/share/doc/bacula \
|
|
|
|
--htmldir=${PREFIX}/share/doc/bacula/html \
|
2014-06-23 07:57:48 +00:00
|
|
|
--with-dir-user=_bacula \
|
|
|
|
--with-dir-group=_bacula \
|
|
|
|
--with-sd-user=_bacula-sd \
|
|
|
|
--with-sd-group=_bacula \
|
2007-07-20 11:02:14 +00:00
|
|
|
--with-scriptdir=${PREFIX}/libexec/bacula \
|
2011-11-17 23:45:56 +00:00
|
|
|
--with-fd-user=root \
|
|
|
|
--with-fd-group=wheel \
|
2007-07-20 11:02:14 +00:00
|
|
|
--with-pid-dir=/var/run \
|
2014-04-19 09:44:11 +00:00
|
|
|
--with-subsys-dir=${LOCALSTATEDIR} \
|
|
|
|
--with-working-dir=${LOCALSTATEDIR} \
|
2014-06-13 15:31:21 +00:00
|
|
|
--with-bsrdir=${LOCALSTATEDIR} \
|
|
|
|
--with-logdir=${LOCALSTATEDIR} \
|
2007-09-11 20:26:45 +00:00
|
|
|
--with-sbin-perm=755 \
|
2007-07-20 11:02:14 +00:00
|
|
|
--without-x \
|
|
|
|
--disable-nls \
|
|
|
|
--disable-conio \
|
|
|
|
--enable-readline \
|
2011-11-17 23:45:56 +00:00
|
|
|
--with-readline=/usr \
|
2009-10-02 02:34:05 +00:00
|
|
|
--with-openssl \
|
|
|
|
--with-basename=bacula \
|
2014-06-13 15:31:21 +00:00
|
|
|
--with-hostname=bacula.domain.tld
|
2007-07-20 11:02:14 +00:00
|
|
|
|
2014-06-23 07:57:48 +00:00
|
|
|
# build support for all DBs at once,
|
|
|
|
# the libbaccats pkg will decide DB support on a system
|
|
|
|
CONFIGURE_ARGS += --with-mysql \
|
|
|
|
--with-postgresql \
|
|
|
|
--with-sqlite3
|
|
|
|
|
2009-10-02 02:34:05 +00:00
|
|
|
MAKE_FLAGS= NO_ECHO=
|
2011-11-17 23:45:56 +00:00
|
|
|
|
|
|
|
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
|
2007-07-20 11:02:14 +00:00
|
|
|
LDFLAGS="-L${LOCALBASE}/lib" \
|
2008-02-07 02:53:35 +00:00
|
|
|
CONFIG_SITE=${PORTSDIR}/infrastructure/db/config.site \
|
2011-11-17 23:45:56 +00:00
|
|
|
MTX=/bin/chio \
|
|
|
|
PKG_CONFIG_LIBDIR="${LOCALBASE}/lib/qt4/pkgconfig:${LOCALBASE}/lib/qt4" \
|
|
|
|
QMAKE=${LOCALBASE}/bin/qmake4
|
2007-07-20 11:02:14 +00:00
|
|
|
|
2011-07-14 15:02:18 +00:00
|
|
|
# configure mistakenly assumes xattr support if it finds any of the
|
|
|
|
# openat() family of functions, so poison the autoconf cache.
|
|
|
|
# None of these functions are used outside the code for Solaris xattr
|
|
|
|
# as of 5.0.2.
|
|
|
|
.for ac_func in openat fstatat unlinkat fchownat futimesat
|
2014-06-23 07:57:48 +00:00
|
|
|
CONFIGURE_ENV += ac_cv_func_${ac_func}=no
|
2011-07-14 15:02:18 +00:00
|
|
|
.endfor
|
|
|
|
|
2014-06-23 07:57:48 +00:00
|
|
|
WANTLIB-main += ${WANTLIB} lzo2 ncurses readline
|
|
|
|
LIB_DEPENDS-main= ${LIB_DEPENDS} \
|
|
|
|
archivers/lzo2
|
2011-10-21 17:04:23 +00:00
|
|
|
|
2014-06-23 07:57:48 +00:00
|
|
|
WANTLIB-server += ${WANTLIB} bac baccats baccfg bacfind lzo2
|
2013-04-12 10:39:04 +00:00
|
|
|
LIB_DEPENDS-server= ${LIB_DEPENDS} \
|
2014-06-23 07:57:48 +00:00
|
|
|
sysutils/bacula,-main \
|
|
|
|
bacula-pgsql-*|bacula-mysql-*|bacula-sqlite3-*:sysutils/bacula,-pgsql
|
2011-10-21 17:04:23 +00:00
|
|
|
|
2014-06-23 07:57:48 +00:00
|
|
|
WANTLIB-pgsql += pq crypto m ssl stdc++
|
|
|
|
LIB_DEPENDS-pgsql += databases/postgresql
|
2007-07-20 11:02:14 +00:00
|
|
|
|
2014-06-23 07:57:48 +00:00
|
|
|
WANTLIB-mysql += mysqlclient_r crypto m pthread ssl stdc++ z
|
|
|
|
LIB_DEPENDS-mysql += databases/mysql
|
|
|
|
|
|
|
|
LIB_DEPENDS-sqlite3= #empty
|
|
|
|
WANTLIB-sqlite3 += sqlite3 m stdc++
|
2008-02-07 02:53:35 +00:00
|
|
|
|
2011-11-17 23:45:56 +00:00
|
|
|
WANTLIB-bat += ${WANTLIB}
|
|
|
|
WANTLIB-bat += ICE QtCore QtGui SM X11 Xext Xi Xinerama Xrender bac
|
2013-04-12 10:39:04 +00:00
|
|
|
WANTLIB-bat += baccfg bacfind expat fontconfig freetype xcb pthread-stubs
|
2014-05-21 10:12:34 +00:00
|
|
|
WANTLIB-bat += ffi glib-2.0 gobject-2.0 gthread-2.0 pcre png
|
2013-04-12 10:39:04 +00:00
|
|
|
RUN_DEPENDS-bat= ${RUN_DEPENDS} \
|
|
|
|
devel/desktop-file-utils
|
|
|
|
LIB_DEPENDS-bat= ${LIB_DEPENDS} \
|
|
|
|
x11/qt4 \
|
2010-11-20 17:22:40 +00:00
|
|
|
sysutils/bacula,-main
|
2011-10-21 17:04:23 +00:00
|
|
|
|
2014-06-23 07:57:48 +00:00
|
|
|
.include <bsd.port.arch.mk>
|
2011-10-21 17:04:23 +00:00
|
|
|
.if !${BUILD_PACKAGES:M-bat}
|
2014-06-23 07:57:48 +00:00
|
|
|
CONFIGURE_ARGS += --disable-bat
|
2011-10-21 17:04:23 +00:00
|
|
|
.else
|
2014-06-23 07:57:48 +00:00
|
|
|
CONFIGURE_ARGS += --enable-bat
|
2008-02-07 02:53:35 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
pre-configure:
|
2008-10-19 03:44:42 +00:00
|
|
|
${SUBST_CMD} ${WRKSRC}/manpages/bat.1 \
|
|
|
|
${WRKSRC}/src/qt-console/main.cpp \
|
2011-03-21 17:06:23 +00:00
|
|
|
${WRKSRC}/scripts/bat.desktop.in
|
2007-08-28 17:51:08 +00:00
|
|
|
|
2007-07-20 11:02:14 +00:00
|
|
|
post-install:
|
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/bacula
|
2009-10-02 02:34:05 +00:00
|
|
|
${INSTALL_SCRIPT_DIR} ${PREFIX}/libexec/bacula/updatedb
|
|
|
|
${INSTALL_SCRIPT} ${WRKSRC}/updatedb/* ${PREFIX}/libexec/bacula/updatedb
|
2012-09-14 08:14:30 +00:00
|
|
|
${INSTALL_SCRIPT} ${WRKSRC}/examples/autochangers/chio-changer-openbsd \
|
2012-07-04 12:02:56 +00:00
|
|
|
${PREFIX}/libexec/bacula/chio-changer-openbsd.dist
|
2011-11-17 23:45:56 +00:00
|
|
|
rm ${PREFIX}/libexec/bacula/updatedb/update*.in
|
2014-06-23 07:57:48 +00:00
|
|
|
rm ${PREFIX}/lib/libbaccats.{a,la}
|
2012-04-04 21:30:56 +00:00
|
|
|
mv ${PREFIX}/libexec/bacula/query.sql{,.dist}
|
|
|
|
mv ${PREFIX}/libexec/bacula/mtx-changer.conf{,.dist}
|
2014-06-23 07:57:48 +00:00
|
|
|
rm ${PREFIX}/sbin/bacula
|
|
|
|
# does nothing
|
|
|
|
cd ${PREFIX}/libexec/bacula/updatedb && rm update_bacula_tables_8_to_9
|
|
|
|
# broken: tries to run scripts from /etc
|
|
|
|
cd ${PREFIX}/libexec/bacula/updatedb && rm update_bdb_tables_8_to_9
|
|
|
|
# unneeded: SQLite2
|
|
|
|
cd ${PREFIX}/libexec/bacula/updatedb && rm update_sqlite_tables_4_to_5 \
|
|
|
|
update_sqlite_tables_5_to_6 update_sqlite_tables_6_to_7 \
|
|
|
|
update_sqlite_tables_7_to_8 update_sqlite_tables_8_to_9
|
2011-10-21 17:04:23 +00:00
|
|
|
.if ${BUILD_PACKAGES:M-bat}
|
2009-10-02 02:34:05 +00:00
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/pixmaps
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/src/qt-console/images/bat_icon.png \
|
|
|
|
${PREFIX}/share/pixmaps
|
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/applications
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/scripts/bat.desktop ${PREFIX}/share/applications
|
2011-11-17 23:45:56 +00:00
|
|
|
.else
|
|
|
|
rm ${PREFIX}/man/man1/bat.1
|
2008-02-07 02:53:35 +00:00
|
|
|
.endif
|
2011-11-17 23:45:56 +00:00
|
|
|
mv ${WRKINST}/etc/bacula/* ${PREFIX}/share/examples/bacula/
|
|
|
|
rmdir ${WRKINST}/{etc,var}/bacula
|
2007-07-20 11:02:14 +00:00
|
|
|
|
|
|
|
.include <bsd.port.mk>
|