File: rules

package info (click to toggle)
bsdmainutils 11.1.2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 1,488 kB
  • sloc: ansic: 7,001; makefile: 157; python: 108; sh: 91; perl: 39
file content (70 lines) | stat: -rwxr-xr-x 1,516 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
60
61
62
63
64
65
66
67
68
69
70
#!/usr/bin/make -f

SHELL+= -e
#export DH_VERBOSE=1

include /usr/share/quilt/quilt.make

CFLAGS = `dpkg-buildflags --get CFLAGS`
CFLAGS += `dpkg-buildflags --get CPPFLAGS`
LDFLAGS = `dpkg-buildflags --get LDFLAGS`
export CFLAGS
export LDFLAGS

ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
	CROSS += "CC=$(DEB_HOST_GNU_TYPE)-gcc"
else
	CROSS +=
endif

build: build-arch build-indep
build-arch: build-stamp
build-indep: build-stamp
build-stamp: debian/stamp-patched
	dh_testdir
	$(MAKE) $(CROSS)
	currentyear=$(shell date --date="`dpkg-parsechangelog -S Date`" +%Y); \
	year=`expr $$currentyear + 5`; \
	while [ $${year} -ne $${currentyear} ] ; do \
	    year=`expr $$year - 1`; \
	    python $(CURDIR)/debian/calendarJudaic.py $$year > $(CURDIR)/debian/calendars/calendar.judaic.$$year; \
	done; \
	cd $(CURDIR)/debian/calendars; \
	[ -L calendar.judaic ] || ln -s calendar.judaic.$$year calendar.judaic;
	touch build-stamp

clean: unpatch
	dh_testdir
	$(MAKE) clean
	-rm -f $(CURDIR)/debian/calendars/calendar.judaic*
	-rm -f build-stamp
	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_installdirs
	$(MAKE) install DESTDIR=$(CURDIR)/debian/bsdmainutils

binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installdocs
	dh_installchangelogs
	dh_installcron
	dh_installinit
	dh_install
	dh_strip
	dh_compress
	dh_fixperms -Xbsd-write
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_installdeb
	dh_builddeb

binary-indep:

binary: binary-arch

.PHONY: binary binary-arch binary-indep clean build install