File: rules

package info (click to toggle)
xsp 4.2-2.2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 5,168 kB
  • sloc: cs: 13,500; sh: 12,082; xml: 8,279; makefile: 650; perl: 619; ansic: 299; php: 6
file content (87 lines) | stat: -rwxr-xr-x 2,824 bytes parent folder | download | duplicates (4)
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#!/usr/bin/make -f

#export DH_VERBOSE=1
export MONO_SHARED_DIR=$(CURDIR)

MONO_ABI_COMP_VERSION = 3.2.8

DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

MAKEFILE = $(firstword $(MAKEFILE_LIST))
DEBIAN_DIR = $(dir $(MAKEFILE))
SOURCE_DIR = $(DEBIAN_DIR)/..

# Perl code to figure out the current version and the next "potential" version
VERSION = $(shell dpkg-parsechangelog -l$(DEBIAN_DIR)/changelog | grep ^Vers | cut -d\  -f2)
UPVERSION = $(shell echo $(VERSION) | sed 's,-.*,,' | sed 's,+dfsg.*,,')
NEXT_UPVERSION = $(shell perl -e '$$_=pop; s/(\d+)$$/$$1+1/e; print' $(UPVERSION))
DEB_SOURCE_NAME = $(shell dpkg-parsechangelog -l$(DEBIAN_DIR)/changelog | grep ^Source | cut -d" " -f2)

override_dh_auto_build:
	dh_auto_build
	pod2man --section=8 \
		$(CURDIR)/debian/mono-server4-admin \
		> $(CURDIR)/debian/mono-server4-admin.8
	pod2man --section=8 $(CURDIR)/debian/mono-server4-update \
		> $(CURDIR)/debian/mono-server4-update.8
	pod2man --section=8 $(CURDIR)/debian/mono-xsp4-admin \
		> $(CURDIR)/debian/mono-xsp4-admin.8
	pod2man --section=8 $(CURDIR)/debian/mono-xsp4-update \
		> $(CURDIR)/debian/mono-xsp4-update.8

	pod2man --section=1 $(CURDIR)/debian/dh_installxsp \
		> $(CURDIR)/debian/dh_installxsp.1

	cp $(CURDIR)/debian/mono-server4-update.8 \
		$(CURDIR)/debian/update-mono-server4.8
	cp $(CURDIR)/debian/mono-xsp4-update.8 \
		$(CURDIR)/debian/update-mono-xsp4.8

	touch build-stamp

override_dh_clean:
	rm -f $(CURDIR)/debian/*.8 $(CURDIR)/debian/*.1
	dh_clean 

override_dh_installman:
	# Make version three variants on the manpages
	cat debian/tmp/usr/share/man/man1/xsp.1 \
		| sed 's/xsp/xsp4/g' \
		> debian/tmp/usr/share/man/man1/xsp4.1
	cat debian/tmp/usr/share/man/man1/dbsessmgr.1 \
		| sed 's/dbsessmgr/dbsessmgr4/g' \
		> debian/tmp/usr/share/man/man1/dbsessmgr4.1
	cat debian/tmp/usr/share/man/man1/asp-state.1 \
		| sed 's/asp-state/asp-state4/g' \
		> debian/tmp/usr/share/man/man1/asp-state4.1
	cat debian/tmp/usr/share/man/man1/mod-mono-server.1 \
		| sed 's/mono-server/mono-server4/g' \
		> debian/tmp/usr/share/man/man1/mod-mono-server4.1
	cat debian/tmp/usr/share/man/man1/fastcgi-mono-server.1 \
		| sed 's/mono-server/mono-server4/g' \
		> debian/tmp/usr/share/man/man1/fastcgi-mono-server4.1
	DH_AUTOSCRIPTDIR=$(CURDIR)/debian/ debian/dh_installxsp -i -V 4
	dh_installman

override_dh_makeclilibs:
	dh_makeclilibs -V

override_dh_clideps:
	dh_clideps -d

override_dh_gencontrol:
	dh_gencontrol -- -Vmono-abi-comp-version=$(MONO_ABI_COMP_VERSION)

%:
	dh $@ --with cli

get-orig-source:
	uscan \
		--package $(DEB_SOURCE_NAME) \
		--watchfile $(DEBIAN_DIR)/watch \
		--upstream-version $(VERSION) \
		--download-version $(VERSION) \
		--destdir . \
		--force-download \
		--rename