Makefile 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. # $OpenBSD: Makefile,v 1.107 2017/04/10 11:46:33 sthen Exp $
  2. # XXX building this port while a version is already installed on the
  3. # system will lead to unexpected hidden dependencies!!!
  4. COMMENT-main= network backup solution (client)
  5. COMMENT-server= network backup solution (server)
  6. COMMENT-bat= network backup solution (gui-client)
  7. COMMENT-mysql= Bacula libbaccats support for MySQL
  8. COMMENT-pgsql= Bacula libbaccats support for PostgreSQL
  9. COMMENT-sqlite3= Bacula libbaccats support for SQLite3
  10. V= 7.4.7
  11. DISTNAME= bacula-$V
  12. PKGNAME-main= bacula-client-$V
  13. PKGNAME-server= bacula-server-$V
  14. PKGNAME-bat= bacula-bat-$V
  15. PKGNAME-mysql= bacula-mysql-$V
  16. PKGNAME-pgsql= bacula-pgsql-$V
  17. PKGNAME-sqlite3= bacula-sqlite3-$V
  18. CATEGORIES= sysutils
  19. SHARED_LIBS += bac 6.0
  20. SHARED_LIBS += baccfg 6.0
  21. SHARED_LIBS += bacfind 5.1
  22. SHARED_LIBS += bacsql 5.0
  23. BACCATS_LIBV = 3.0
  24. SHARED_LIBS += baccats ${BACCATS_LIBV}
  25. SHARED_LIBS += baccats-mysql ${BACCATS_LIBV}
  26. SHARED_LIBS += baccats-postgresql ${BACCATS_LIBV}
  27. SHARED_LIBS += baccats-sqlite3 ${BACCATS_LIBV}
  28. MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=bacula/}
  29. HOMEPAGE= http://www.bacula.org/
  30. MAINTAINER= Stuart Henderson <sthen@openbsd.org>
  31. WANTLIB += c pthread crypto ssl z m ${LIBCXX}
  32. # AGPLv3 with exception for OpenSSL (majority),
  33. # FDL (docs), LGPL (some libraries), and PD
  34. # http://www.bacula.org/7.0.x-manuals/en/main/Bacula_Copyright_Trademark_.html
  35. PERMIT_PACKAGE_CDROM= Yes
  36. MODULES= devel/gettext
  37. LOCALSTATEDIR= ${BASELOCALSTATEDIR}/bacula
  38. SYSCONFDIR= ${BASESYSCONFDIR}/bacula
  39. CONFIGURE_STYLE= gnu
  40. USE_GMAKE= Yes
  41. NO_TEST= Yes
  42. PSEUDO_FLAVORS= no_bat
  43. FLAVOR?=
  44. MULTI_PACKAGES= -main -server -bat -mysql -pgsql -sqlite3
  45. CONFIGURE_ARGS= --enable-smartalloc \
  46. --docdir=${PREFIX}/share/doc/bacula \
  47. --htmldir=${PREFIX}/share/doc/bacula/html \
  48. --with-dir-user=_bacula \
  49. --with-dir-group=_bacula \
  50. --with-sd-user=_bacula-sd \
  51. --with-sd-group=_bacula \
  52. --with-scriptdir=${PREFIX}/libexec/bacula \
  53. --with-fd-user=root \
  54. --with-fd-group=wheel \
  55. --with-pid-dir=/var/run \
  56. --with-subsys-dir=${LOCALSTATEDIR} \
  57. --with-working-dir=${LOCALSTATEDIR} \
  58. --with-bsrdir=${LOCALSTATEDIR} \
  59. --with-logdir=${LOCALSTATEDIR} \
  60. --with-sbin-perm=755 \
  61. --without-x \
  62. --disable-nls \
  63. --disable-conio \
  64. --enable-readline \
  65. --with-readline=/usr \
  66. --with-openssl \
  67. --with-basename=bacula \
  68. --with-hostname=bacula.domain.tld
  69. # build support for all DBs at once,
  70. # the libbaccats pkg will decide DB support on a system
  71. CONFIGURE_ARGS += --with-mysql \
  72. --with-postgresql \
  73. --with-sqlite3
  74. MAKE_FLAGS= NO_ECHO=
  75. CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
  76. LDFLAGS="-L${LOCALBASE}/lib" \
  77. CONFIG_SITE=${PORTSDIR}/infrastructure/db/config.site \
  78. MTX=/bin/chio \
  79. PKG_CONFIG_LIBDIR="${LOCALBASE}/lib/qt4/pkgconfig:${LOCALBASE}/lib/qt4" \
  80. QMAKE=${LOCALBASE}/bin/qmake4
  81. # configure mistakenly assumes xattr support if it finds any of the
  82. # openat() family of functions, so poison the autoconf cache.
  83. # None of these functions are used outside the code for Solaris xattr
  84. # as of 5.0.2.
  85. .for ac_func in openat fstatat unlinkat fchownat futimesat
  86. CONFIGURE_ENV += ac_cv_func_${ac_func}=no
  87. .endfor
  88. WANTLIB-main += ${WANTLIB} lzo2 ncurses readline
  89. LIB_DEPENDS-main= ${LIB_DEPENDS} \
  90. archivers/lzo2
  91. WANTLIB-server += ${WANTLIB} bac baccats baccfg bacfind lzo2
  92. LIB_DEPENDS-server= ${LIB_DEPENDS} \
  93. sysutils/bacula,-main \
  94. bacula-pgsql-*|bacula-mysql-*|bacula-sqlite3-*:sysutils/bacula,-pgsql
  95. WANTLIB-pgsql += pq crypto m ssl ${LIBCXX}
  96. LIB_DEPENDS-pgsql += databases/postgresql
  97. WANTLIB-mysql += mysqlclient_r crypto m pthread ssl ${LIBCXX} z
  98. LIB_DEPENDS-mysql += databases/mariadb
  99. WANTLIB-sqlite3 += sqlite3 m pthread ${LIBCXX}
  100. LIB_DEPENDS-sqlite3= databases/sqlite3
  101. WANTLIB-bat += ${WANTLIB}
  102. WANTLIB-bat += ICE QtCore QtGui SM X11 Xext Xi Xinerama Xrender bac
  103. WANTLIB-bat += baccfg bacfind expat fontconfig freetype xcb pthread-stubs
  104. WANTLIB-bat += ffi glib-2.0 gobject-2.0 gthread-2.0 pcre png
  105. RUN_DEPENDS-bat= ${RUN_DEPENDS} \
  106. devel/desktop-file-utils
  107. LIB_DEPENDS-bat= ${LIB_DEPENDS} \
  108. x11/qt4 \
  109. sysutils/bacula,-main
  110. .include <bsd.port.arch.mk>
  111. .if !${BUILD_PACKAGES:M-bat}
  112. CONFIGURE_ARGS += --disable-bat
  113. .else
  114. CONFIGURE_ARGS += --enable-bat
  115. .endif
  116. pre-configure:
  117. ${SUBST_CMD} ${WRKSRC}/manpages/bat.1 \
  118. ${WRKSRC}/src/qt-console/main.cpp \
  119. ${WRKSRC}/scripts/bat.desktop.in
  120. post-install:
  121. ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/bacula
  122. ${INSTALL_SCRIPT_DIR} ${PREFIX}/libexec/bacula/updatedb
  123. ${INSTALL_SCRIPT} ${WRKSRC}/updatedb/* ${PREFIX}/libexec/bacula/updatedb
  124. ${INSTALL_SCRIPT} ${WRKSRC}/examples/autochangers/chio-changer-openbsd \
  125. ${PREFIX}/libexec/bacula/chio-changer-openbsd.dist
  126. rm ${PREFIX}/libexec/bacula/updatedb/update*.in
  127. rm ${PREFIX}/lib/libbaccats.{a,la}
  128. mv ${PREFIX}/libexec/bacula/query.sql{,.dist}
  129. mv ${PREFIX}/libexec/bacula/mtx-changer.conf{,.dist}
  130. rm ${PREFIX}/sbin/bacula
  131. # does nothing
  132. cd ${PREFIX}/libexec/bacula/updatedb && rm update_bacula_tables_8_to_9
  133. # unneeded: SQLite2
  134. cd ${PREFIX}/libexec/bacula/updatedb && rm update_sqlite_tables_4_to_5 \
  135. update_sqlite_tables_5_to_6 update_sqlite_tables_6_to_7 \
  136. update_sqlite_tables_7_to_8 update_sqlite_tables_8_to_9
  137. .if ${BUILD_PACKAGES:M-bat}
  138. ${INSTALL_DATA_DIR} ${PREFIX}/share/pixmaps
  139. ${INSTALL_DATA} ${WRKSRC}/src/qt-console/images/bat_icon.png \
  140. ${PREFIX}/share/pixmaps
  141. ${INSTALL_DATA_DIR} ${PREFIX}/share/applications
  142. ${INSTALL_DATA} ${WRKSRC}/scripts/bat.desktop ${PREFIX}/share/applications
  143. .else
  144. rm ${PREFIX}/man/man1/bat.1
  145. .endif
  146. mv ${WRKINST}/etc/bacula/* ${PREFIX}/share/examples/bacula/
  147. rmdir ${WRKINST}/{etc,var}/bacula
  148. .include <bsd.port.mk>