try again
[debian/sudo] / debian / rules
index 725790acc3087b0c3e30ee1e44d741ef4dc6818e..87d7432e816bcda5845ea661bba3c7a612e72bc0 100755 (executable)
@@ -7,8 +7,20 @@ CFLAGS += -Wall -Wno-comment
 LDFLAGS = `dpkg-buildflags --get LDFLAGS`
 CPPFLAGS = `dpkg-buildflags --get CPPFLAGS`
 
+DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
+ifeq ($(DEB_HOST_ARCH_OS),linux)
+  configure_args += --with-selinux
+endif
+
+reconf-stamp:
+       cp -f /usr/share/misc/config.sub config.sub
+       cp -f /usr/share/misc/config.guess config.guess
+       autoconf -I m4
+       touch $@
+
 configure: configure-stamp
-configure-stamp:
+configure-stamp: reconf-stamp
        dh_testdir
        cp -f /usr/share/misc/config.sub config.sub
        cp -f /usr/share/misc/config.guess config.guess
@@ -19,7 +31,6 @@ configure-stamp:
            CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" $(CURDIR)/configure \
                --prefix=/usr -v \
                --with-all-insults \
-               --with-selinux \
                --with-pam \
                --with-fqdn \
                --with-logging=syslog \
@@ -33,7 +44,9 @@ configure-stamp:
                --with-sendmail=/usr/sbin/sendmail \
                --with-timedir=/var/lib/sudo \
                --mandir=/usr/share/man \
-               --libexecdir=/usr/lib/sudo
+               --libexecdir=/usr/lib/sudo \
+               --with-sssd --with-sssd-lib=/usr/lib/$(DEB_HOST_MULTIARCH) \
+               $(configure_args)
 
        # LDAP version
        mkdir -p build-ldap
@@ -142,7 +155,8 @@ binary-arch: build install
        dh_testdir
        dh_testroot
        dh_installdocs -A
-       dh_installinit -psudo -psudo-ldap --name=sudo
+       dh_installinit -psudo --name=sudo
+       dh_installinit -psudo-ldap --name=sudo-ldap
        dh_installman -A
        dh_installinfo -A
        dh_installchangelogs ChangeLog