#!/usr/bin/make -f # disable autoheader, as it fails for some reason export AUTOHEADER := /bin/true BUILDDIR := DEB-BUILD DH_AUTO_OPTIONS := -v -Sautoconf -B$(BUILDDIR) --parallel DESTDIR := $(CURDIR)/debian/$(shell dh_listpackages) TDIR := $(CURDIR)/debian/_tmp_ DEB_BUILD_MAINT_OPTIONS := hardening=+all DEB_CFLAGS_MAINT_APPEND := -Wall -Wno-unused-const-variable $(shell getconf LFS_CFLAGS) DEB_LDFLAGS_MAINT_APPEND := -Wl,-z,defs DPKG_EXPORT_BUILDFLAGS := 1 include /usr/share/dpkg/buildflags.mk include /usr/share/dpkg/architecture.mk ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE)) CC := $(DEB_HOST_GNU_TYPE)-gcc else CC := gcc endif %: dh ${@} override_dh_auto_configure: CC="$(CC)" \ CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \ dh_auto_configure $(DH_AUTO_OPTIONS) -- \ --enable-pam override_dh_auto_build: dh_auto_build $(DH_AUTO_OPTIONS) -- \ TIMESTAMP_DIR=/run/superstamps \ D_SYSLOG_PRIORITY="-DSYSLOG_PRIORITY=LOG_INFO -DSYSLOG_FACILITY=LOG_AUTH" mkdir $(TDIR) sed '25,50d' README > $(TDIR)/README cp -a sample.tab $(TDIR)/super.tab cp -a sample.cdmount $(TDIR)/cdmount cp -a sample.cdumount $(TDIR)/cdumount chmod 755 $(TDIR)/cdmount chmod 755 $(TDIR)/cdumount override_dh_auto_clean: dh_auto_clean $(DH_AUTO_OPTIONS) rm -rf Makefile *~ $(TDIR) config.cache config.log override_dh_auto_install: dh_auto_install $(DH_AUTO_OPTIONS) --destdir="$(DESTDIR)" dh_install debian/super.tab etc mv $(DESTDIR)/usr/share/man/man5/super.5 \ $(DESTDIR)/usr/share/man/man5/super.tab.5 override_dh_installchangelogs: dh_installchangelogs WhatsNew override_dh_fixperms: dh_fixperms -Xusr/bin/super