# along with this program; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+DESTDIR ?=
prefix=/usr/local
bin_dir=$(prefix)/bin
all: $(TARGETS)
install: $(TARGETS)
- $(INSTALL_DIR) $(bin_dir) $(lib_dir) $(man1_dir) $(man8_dir)
- $(INSTALL_PROGRAM) $(BINTARGETS) $(bin_dir)/.
- $(INSTALL_FILE) $(LIBTARGET) $(lib_dir)/.
- $(STRIP) --strip-unneeded $(lib_dir)/$(LIBTARGET)
- ln -sf $(LIBTARGET) $(lib_dir)/$(LIBCANON)
- $(INSTALL_PROGRAM) $(HELPER) $(libexec_dir)/.
- chmod u+s $(libexec_dir)/$(HELPER)
- $(INSTALL_DIR) $(etc_dir) \
- $(etc_dir)/byport $(etc_dir)/byaddr $(etc_dir)/byuid
+ $(INSTALL_DIR) $(DESTDIR)$(bin_dir) $(DESTDIR)$(lib_dir) $(DESTDIR)$(man1_dir) $(DESTDIR)$(man8_dir)
+ $(INSTALL_PROGRAM) $(BINTARGETS) $(DESTDIR)$(bin_dir)/.
+ $(INSTALL_FILE) $(LIBTARGET) $(DESTDIR)$(lib_dir)/.
+ $(STRIP) --strip-unneeded $(DESTDIR)$(lib_dir)/$(LIBTARGET)
+ ln -sf $(LIBTARGET) $(DESTDIR)$(lib_dir)/$(LIBCANON)
+ $(INSTALL_PROGRAM) $(HELPER) $(DESTDIR)$(libexec_dir)/.
+ chmod u+s $(DESTDIR)$(libexec_dir)/$(HELPER)
+ $(INSTALL_DIR) $(DESTDIR)$(etc_dir) \
+ $(DESTDIR)$(etc_dir)/byport $(DESTDIR)$(etc_dir)/byaddr $(DESTDIR)$(etc_dir)/byuid
install_man: $(MANPAGES_1) $(MANPAGES_8)
- $(INSTALL_FILE) $(MANPAGES_1) $(man1_dir)/.
- $(INSTALL_FILE) $(MANPAGES_8) $(man8_dir)/.
+ $(INSTALL_FILE) $(MANPAGES_1) $(DESTDIR)$(man1_dir)/.
+ $(INSTALL_FILE) $(MANPAGES_8) $(DESTDIR)$(man8_dir)/.
libauthbind.o: libauthbind.c authbind.h
$(CC) -D_REENTRANT $(CFLAGS) $(CPPFLAGS) -c -o $@ -fPIC $<
override_dh_auto_install:
- dh_auto_install -- prefix=debian/$(package)/usr etc_dir=debian/$(package)/etc/authbind \
- install install_man
+ dh_auto_install -- prefix=/usr install install_man
execute_after_dh_fixperms:
# Redo the setuid mode that `dh_fixperms` removes