5 CFLAGS = -O2 -Wall -Wno-comment
6 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
11 configure: configure-stamp
14 cp -f /usr/share/misc/config.sub config.sub
15 cp -f /usr/share/misc/config.guess config.guess
19 cd build-simple && NROFFPROG=/usr/bin/nroff $(CURDIR)/configure \
25 --with-logging=syslog \
26 --with-logfac=authpriv \
28 --with-editor=/usr/bin/editor \
30 --with-password-timeout=0 \
31 --with-passprompt="[sudo] password for %p: " \
32 --with-timedir=/var/lib/sudo \
33 --disable-root-mailer \
35 --with-sendmail=/usr/sbin/sendmail \
36 --mandir=/usr/share/man \
37 --libexecdir=/usr/lib/sudo \
38 --with-secure-path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin"
42 cd build-ldap && NROFFPROG=/usr/bin/nroff $(CURDIR)/configure \
49 --with-logging=syslog \
50 --with-logfac=authpriv \
52 --with-editor=/usr/bin/editor \
54 --with-password-timeout=0 \
55 --with-passprompt="[sudo] password for %p: " \
56 --disable-root-mailer \
58 --with-sendmail=/usr/sbin/sendmail \
59 --with-ldap-conf-file=/etc/sudo-ldap.conf \
60 --mandir=/usr/share/man \
61 --libexecdir=/usr/lib/sudo \
62 --with-secure-path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin"
67 build-stamp: configure-stamp
70 # ensure our pod changes get picked up
71 $(MAKE) sudoers.man.in sudo.man.in visudo.man.in
73 $(MAKE) -C build-simple
81 rm -f config-stamp build-stamp
82 rm -rf build-simple build-ldap
92 $(MAKE) -C build-simple install DESTDIR=$(CURDIR)/debian/sudo
93 $(MAKE) -C build-ldap install DESTDIR=$(CURDIR)/debian/sudo-ldap
95 # remove stuff we don't want
96 rm -f debian/sudo/etc/sudoers \
97 debian/sudo-ldap/etc/sudoers \
98 debian/sudo/usr/share/doc/sudo/LICENSE* \
99 debian/sudo-ldap/usr/share/doc/sudo/LICENSE*
101 # move upstream-installed docs to the right place for ldap package
102 mv debian/sudo-ldap/usr/share/doc/sudo/* \
103 debian/sudo-ldap/usr/share/doc/sudo-ldap/
104 rmdir debian/sudo-ldap/usr/share/doc/sudo
106 # and install things we do want that make install doesn't know about
107 install -o root -g root -m 0644 debian/sudo.pam \
108 debian/sudo/etc/pam.d/sudo
109 install -o root -g root -m 0644 debian/sudo.pam \
110 debian/sudo-ldap/etc/pam.d/sudo
112 install -o root -g root -m 0644 debian/sudo.lintian \
113 debian/sudo/usr/share/lintian/overrides/sudo
114 install -o root -g root -m 0644 debian/sudo-ldap.lintian \
115 debian/sudo-ldap/usr/share/lintian/overrides/sudo-ldap
117 install -o root -g root -m 0440 debian/README \
118 debian/sudo/etc/sudoers.d/README
119 install -o root -g root -m 0440 debian/README \
120 debian/sudo-ldap/etc/sudoers.d/README
122 binary-indep: build install
124 binary-arch: build install
128 dh_installexamples -A sample.sudoers
129 dh_installinit -psudo -psudo-ldap --name=sudo
132 dh_installchangelogs ChangeLog
136 chown root.root debian/sudo/usr/bin/sudo debian/sudo-ldap/usr/bin/sudo
137 chmod 4755 debian/sudo/usr/bin/sudo debian/sudo-ldap/usr/bin/sudo
138 chmod 0440 debian/sudo/etc/sudoers.d/README \
139 debian/sudo-ldap/etc/sudoers.d/README
146 binary: binary-indep binary-arch
147 .PHONY: configure build clean binary-indep binary-arch binary install