#!/usr/bin/make -f # -*- makefile -*- # # Sample debian/rules that uses debhelper. # # This file was originally written by Joey Hess and Craig Small. # As a special exception, when this file is copied by dh-make into a # dh-make output file, you may use that output file without restriction. # This special exception was added by Craig Small in version 0.37 of dh-make. # # Modified to make a template file for a multi-binary package with separated # build-arch and build-indep targets by Bill Allombert 2001 # Uncomment this to turn on verbose mode. # DH_VERBOSE = 1 # This has to be exported to make some magic below work. # DH_OPTIONS = -v export DEB_BUILD_MAINT_OPTIONS=hardening=+all DAEMON_USER = bareos DAEMON_GROUP = bareos DIRECTOR_DAEMON_USER = $(DAEMON_USER) STORAGE_DAEMON_USER = $(DAEMON_USER) FILE_DAEMON_USER = root STORAGE_DAEMON_GROUP = $(DAEMON_GROUP) define CONFIGURE_COMMON --with-sbin-perm=755 \ --libdir=/usr/lib/bareos \ --sysconfdir=/etc \ --with-confdir=/etc/bareos \ --with-archivedir=/var/lib/bareos/storage \ --with-backenddir=/usr/lib/bareos/backends \ --with-configtemplatedir=/usr/lib/bareos/defaultconfigs \ --with-scriptdir=/usr/lib/bareos/scripts \ --with-plugindir=/usr/lib/bareos/plugins \ --with-working-dir=/var/lib/bareos \ --with-pid-dir=/var/lib/bareos \ --with-bsrdir=/var/lib/bareos \ --with-logdir=/var/log/bareos \ --with-subsys-dir=/var/lock \ --enable-smartalloc \ --disable-conio \ --enable-readline \ --enable-batch-insert \ --enable-dynamic-cats-backends \ --enable-dynamic-storage-backends \ --enable-acl \ --enable-xattr \ --enable-scsi-crypto \ --enable-lmdb \ --enable-ndmp \ --enable-ipv6 \ --with-postgresql \ --with-mysql \ --with-sqlite3 \ --with-tcp-wrappers \ --without-openssl \ --with-gnutls \ --with-dir-user=$(DIRECTOR_DAEMON_USER) \ --with-dir-group=$(DAEMON_GROUP) \ --with-sd-user=$(STORAGE_DAEMON_USER) \ --with-sd-group=$(STORAGE_DAEMON_GROUP) \ --with-fd-user=$(FILE_DAEMON_USER) \ --with-fd-group=$(DAEMON_GROUP) \ --with-dir-password="XXX_REPLACE_WITH_DIRECTOR_PASSWORD_XXX" \ --with-fd-password="XXX_REPLACE_WITH_CLIENT_PASSWORD_XXX" \ --with-sd-password="XXX_REPLACE_WITH_STORAGE_PASSWORD_XXX" \ --with-mon-dir-password="XXX_REPLACE_WITH_DIRECTOR_MONITOR_PASSWORD_XXX" \ --with-mon-fd-password="XXX_REPLACE_WITH_CLIENT_MONITOR_PASSWORD_XXX" \ --with-mon-sd-password="XXX_REPLACE_WITH_STORAGE_MONITOR_PASSWORD_XXX" \ --with-basename="XXX_REPLACE_WITH_LOCAL_HOSTNAME_XXX" \ --with-hostname="XXX_REPLACE_WITH_LOCAL_HOSTNAME_XXX" \ --enable-includes \ --disable-rpath endef # --docdir="\$(_docdir)/bareos" \ # --htmldir="\$(_docdir)/bareos/html" \ ifeq ($(DEB_HOST_ARCH_OS),kfreebsd) CONFIGURE_COMMON += --disable-acl --disable-xattr --disable-scsi-crypto --disable-ndmp endif ifeq ($(DEB_HOST_ARCH_OS),hurd) CONFIGURE_COMMON += --disable-scsi-crypto --disable-ndmp endif CONFIGURE_CLIENT_ONLY = $(CONFIGURE_COMMON) --enable-client-only CONFIGURE_FULL = $(CONFIGURE_COMMON) --with-python --enable-bat --enable-traymonitor override_dh_auto_configure: dh_auto_configure -- $(CONFIGURE_FULL) override_dh_fixperms: # all files in /etc/bareos dh_fixperms \ --exclude etc/bareos/ \ --exclude var/lib/bareos/ \ --exclude var/log/bareos/ override_dh_strip: dh_strip --dbg-package=bareos-dbg override_dh_install: chrpath -d $(CURDIR)/debian/tmp/usr/lib/bareos/backends/libbareoscats-mysql* \ $(CURDIR)/debian/tmp/usr/lib/bareos/backends/libbareoscats-postgresql* \ $(CURDIR)/debian/tmp/usr/lib/bareos/backends/libbareoscats-sqlite3* dh_install override_dh_installinit: dh_installinit --package=bareos-director --name=bareos-dir --no-start dh_installinit --package=bareos-storage --name=bareos-sd --no-start dh_installinit --package=bareos-filedaemon --name=bareos-fd override_dh_makeshlibs: dh_makeshlibs -n -Xusr/lib/bareos/plugins/ -Xusr/lib/bareos/backends/ %: dh $@ --max-parallel=4 --with systemd gen-debian-copyright: (cd debian; make copyright)