File: rules

package info (click to toggle)
sssd 2.2.0-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 45,204 kB
  • sloc: ansic: 290,302; xml: 58,874; python: 16,662; sh: 7,056; makefile: 5,989; exp: 69; sed: 16
file content (103 lines) | stat: -rwxr-xr-x 3,336 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
#!/usr/bin/make -f
%:
	dh $@ --with quilt,autoreconf,python2,python3 \
		--builddirectory=build

DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

CFLAGS = $(shell dpkg-buildflags --get CFLAGS)
CFLAGS += -I/usr/include/samba-4.0

export CK_DEFAULT_TIMEOUT=30

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

APIDOCDIR = /usr/share/sssd
DISTRIBUTION = $(shell lsb_release -i | sed 's/.*:\t//')
INIT = init
PKGDATE = $(shell dpkg-parsechangelog | \
	awk -F" " '/^Date/ { print $$4 "/" $$3 "/" $$5 }' | \
	sed 's/Jan/01/;s/Feb/02/;s/Mar/03/;s/Apr/04/;s/May/05/;s/Jun/06/;s/Jul/07/;s/Aug/08/;s/Sep/09/;s/Oct/10/;s/Nov/11/;s/Dec/12/;s/\//\\\//g')
CURDATE = $(shell date +%m/%d/%Y | sed 's/\//\\\//g')
export CK_VERBOSITY=verbose

override_dh_auto_configure:
	dh_auto_configure -- --enable-krb5-locator-plugin \
	--datadir=/usr/share/ \
	--with-environment-file=/etc/default/sssd \
	--with-ldb-lib-dir=/usr/lib/$(DEB_HOST_MULTIARCH)/ldb/modules/ldb \
	--with-krb5-plugin-path=/usr/lib/$(DEB_HOST_MULTIARCH)/krb5/plugins/libkrb5 \
	--enable-nsslibdir=/lib/$(DEB_HOST_MULTIARCH) \
	--enable-pammoddir=/lib/$(DEB_HOST_MULTIARCH)/security \
	--enable-systemtap \
	--disable-static \
	--disable-rpath \
	--with-autofs \
	--with-ssh \
	--with-initscript=systemd \
	--with-systemdunitdir=/lib/systemd/system \
	--disable-files-domain \
	--with-smb-idmap-interface-version=6 \
	--with-sudo

override_dh_auto_test:
	export CK_TIMEOUT_MULTIPLIER=10
	dh_auto_test -- VERBOSE=yes
	unset CK_TIMEOUT_MULTIPLIER

override_dh_auto_install:
	dh_auto_install --max-parallel=1

override_dh_fixperms:
	dh_fixperms -Xkrb5_child -Xldap_child -Xselinux_child

override_dh_install:
	install -D -m755 $(CURDIR)/debian/generate-config \
		$(CURDIR)/debian/tmp/usr/share/sssd/generate-config

	mkdir -p $(CURDIR)/debian/libpam-sss/usr/share/pam-configs
	install -m644 debian/libpam-sss.pam-auth-update \
		$(CURDIR)/debian/libpam-sss/usr/share/pam-configs/sss
	install -m644 -D $(CURDIR)/debian/apparmor-profile \
		$(CURDIR)/debian/sssd-common/etc/apparmor.d/usr.sbin.sssd

	cat $(CURDIR)/debian/sssd-common.sssd.$(INIT).in > $(CURDIR)/debian/sssd-common.sssd.$(INIT)

	# remove files we don't want to install
	find $(CURDIR)/debian/tmp/ -name '*.la' -exec rm '{}' ';'
	find $(CURDIR)/debian/tmp/ -name '*.pyc' -exec rm '{}' ';'
	find $(CURDIR)/debian/tmp/ -name '*.egg-info' -exec rm '{}' ';'
	rm -f $(CURDIR)/debian/tmp/etc/rc.d/init.d/sssd

	# match nn/nn/nnnn, replace with the date from changelog
	sed -i 's/[0-1][0-9]\/[0-3][0-9]\/[0-9][0-9][0-9][0-9]/${PKGDATE}/g' $(CURDIR)/debian/tmp/usr/share/man/man*/*

	dh_install

override_dh_installman:

override_dh_missing:
	dh_missing --fail-missing

override_dh_python2:
	dh_python2 --no-guessing-versions

override_dh_installinit:
	dh_apparmor -psssd-common --profile-name=usr.sbin.sssd
	dh_installinit --name sssd --error-handler=invoke_failure

override_dh_installdeb:
	dh_installdeb
	for pkg in sssd-common sssd-ipa sssd-krb5-common sssd-proxy; do \
		sed -i 's/@TRIPLET@/${DEB_HOST_MULTIARCH}/' \
		$(CURDIR)/debian/$$pkg/DEBIAN/postinst; \
	done

override_dh_auto_clean:
	dh_auto_clean
	rm -f $(CURDIR)/debian/sssd-common.$(INIT)
	rm -f $(CURDIR)/po/*.gmo
	rm -f $(CURDIR)/src/config/*.pyc
	rm -f $(CURDIR)/po/stamp-po
	rm -f $(CURDIR)/src/sbus/codegen/__pycache__/*.pyc