File: rules

package info (click to toggle)
sssd 1.8.4-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 13,628 kB
  • sloc: ansic: 99,910; xml: 21,353; sh: 12,272; python: 3,465; makefile: 1,492; sed: 16
file content (64 lines) | stat: -rwxr-xr-x 2,187 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
#!/usr/bin/make -f
%:
	dh $@ --with quilt,autoreconf,python2 --builddirectory=build

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/%e/%Y | sed 's/\//\\\//g')

ifeq ($(DISTRIBUTION), Ubuntu)
	INIT = upstart
endif

override_dh_auto_configure:
	dh_auto_configure -- --enable-krb5-locator-plugin \
	--libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \
	--with-ldb-lib-dir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH)/ldb/modules/ldb \
	--with-krb5-plugin-path=\$${libdir}/krb5/plugins/libkrb5 \
	--enable-nsslibdir=/lib/$(DEB_HOST_MULTIARCH) \
	--enable-pammoddir=/lib/$(DEB_HOST_MULTIARCH)/security \
	--disable-static \
	--disable-rpath \
	--with-autofs \
	--with-ssh \
	--with-sudo

override_dh_install:
	install -D -m755 $(CURDIR)/debian/generate-config \
		$(CURDIR)/debian/tmp/usr/lib/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 -D $(CURDIR)/debian/apparmor-profile \
		$(CURDIR)/debian/sssd/etc/apparmor.d/usr.sbin.sssd

	cat $(CURDIR)/debian/sssd.$(INIT).in > $(CURDIR)/debian/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

	dh_install --fail-missing

	sed -i 's/${CURDATE}/${PKGDATE}/g' $(CURDIR)/debian/tmp/usr/share/man/man8/pam_sss.8

override_dh_python2:
	dh_python2 --no-guessing-versions

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

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