1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
|
#!/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
|