| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
| 4 |
DPKG_EXPORT_BUILDFLAGS = 1 |
| 5 |
include /usr/share/dpkg/buildflags.mk |
| 6 |
|
| 7 |
# Uncomment this to turn on verbose mode. |
| 8 |
#export DH_VERBOSE=1 |
| 9 |
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) |
| 10 |
# Taken from #1636781 as it's the same problem here. Also see |
| 11 |
# https://lists.ubuntu.com/archives/ubuntu-devel/2018-June/040369.html |
| 12 |
ifeq ($(shell dpkg-vendor --derives-from Ubuntu && echo yes),yes) |
| 13 |
export DEB_LDFLAGS_MAINT_STRIP = -Wl,-Bsymbolic-functions |
| 14 |
endif |
| 15 |
|
| 16 |
%: |
| 17 |
dh $@ |
| 18 |
|
| 19 |
override_dh_auto_configure: |
| 20 |
autoreconf --force |
| 21 |
# Set some standard util paths explicitly, |
| 22 |
# or else we'll have to build-depend on all of them. |
| 23 |
# It is hackish, real solution should be to patch upstream |
| 24 |
# to never check for standard utilities. |
| 25 |
# Upstream also should not distinguish between ext*fs, |
| 26 |
# for all of which /sbin/e2fsck is the real filesystem checker |
| 27 |
# which will figure out type of the filesystem automatically. |
| 28 |
# Also explicitly define some dirs/locations which will be searched |
| 29 |
# if not defined. |
| 30 |
# Always define --enable-sloppy-mount (mount -s). Also a hack and |
| 31 |
# the same comment as above applies: upstream should use it unconditionally. |
| 32 |
# Even busybox mount understands -s. |
| 33 |
MOUNT=/bin/mount UMOUNT=/bin/umount \ |
| 34 |
MOUNT_NFS=/sbin/mount.nfs \ |
| 35 |
E2FSCK=/sbin/fsck.ext2 E3FSCK=/sbin/fsck.ext3 E4FSCK=/sbin/fsck.ext4 \ |
| 36 |
initdir=/etc/init.d piddir=/var/run \ |
| 37 |
sssldir=/usr/lib/$(DEB_HOST_MULTIARCH)/sssd/modules \ |
| 38 |
dh_auto_configure -- \ |
| 39 |
--disable-mount-locking \ |
| 40 |
--enable-force-shutdown \ |
| 41 |
--enable-ignore-busy \ |
| 42 |
--enable-sloppy-mount \ |
| 43 |
--mandir=/usr/share/man \ |
| 44 |
--with-confdir=/etc/default \ |
| 45 |
--with-mapdir=/etc \ |
| 46 |
--with-fifodir=/var/run --with-flagdir=/var/run \ |
| 47 |
--with-hesiod \ |
| 48 |
--with-openldap \ |
| 49 |
--with-sasl \ |
| 50 |
--with-libtirpc \ |
| 51 |
$(NULL) |
| 52 |
|
| 53 |
override_dh_auto_build: |
| 54 |
CFLAGS="$(CFLAGS) $(CPPFLAGS)" \ |
| 55 |
DONTSTRIP=1 dh_auto_build |
| 56 |
|
| 57 |
override_dh_auto_install: |
| 58 |
dh_auto_install |
| 59 |
make install_samples INSTALLROOT="$(CURDIR)/debian/tmp" |
| 60 |
|
| 61 |
override_dh_install: |
| 62 |
dh_install |
| 63 |
# remove hesiod and ldap modules, they're in separate packages |
| 64 |
$(RM) debian/autofs/usr/lib/*/autofs/*hesiod*.so \ |
| 65 |
debian/autofs/usr/lib/*/autofs/*ldap*.so |
| 66 |
|
| 67 |
override_dh_installinit: |
| 68 |
# /etc/default/autofs is shipped using ucf |
| 69 |
dh_installinit -pautofs -- start 19 2 3 4 5 . stop 81 0 1 6 . |
| 70 |
|
| 71 |
override_dh_installchangelogs: |
| 72 |
dh_installchangelogs CHANGELOG |
| 73 |
|
| 74 |
override_dh_fixperms: |
| 75 |
dh_fixperms -Xdebian/autofs-ldap/etc/autofs_ldap_auth.conf |
| 76 |
|
| 77 |
get-orig-source: |
| 78 |
uscan --noconf --force-download --rename --download-current-version --destdir=.. |