File: rules

package info (click to toggle)
super 3.30.1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,860 kB
  • sloc: ansic: 24,673; sh: 297; makefile: 296
file content (59 lines) | stat: -rwxr-xr-x 1,722 bytes parent folder | download
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
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS := hardening=+all

# 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_
CFLAGS          := -Wall -Wno-unused-const-variable \
                   $(shell dpkg-buildflags --get CFLAGS) $(shell getconf LFS_CFLAGS)
LDFLAGS         := -Wl,-z,defs -Wl,--as-needed $(shell dpkg-buildflags --get LDFLAGS)

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