File: rules

package info (click to toggle)
bareos 17.2.7-2.1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 24,384 kB
  • sloc: ansic: 232,953; sh: 9,715; makefile: 4,170; sql: 3,061; cpp: 2,621; python: 1,546; lisp: 721; perl: 156; sed: 27; awk: 8
file content (123 lines) | stat: -rwxr-xr-x 4,079 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
#!/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
export QT_SELECT=qt5

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:
	cd autoconf && autoconf configure.in > ../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_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

gen-debian-copyright:
	(cd debian; make copyright)