File: rules

package info (click to toggle)
cecil 0.4.3-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 2,348 kB
  • ctags: 6,289
  • sloc: cs: 14,484; xml: 663; ruby: 428; makefile: 74; sh: 52
file content (81 lines) | stat: -rwxr-xr-x 2,252 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
71
72
73
74
75
76
77
78
79
80
81
#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

# This is for the .wapi directory for Mono.
export MONO_SHARED_DIR=$(CURDIR)

# provide patch and unpatch targets
include /usr/share/dpatch/dpatch.make

UPVERSION = $(shell dpkg-parsechangelog | grep ^Vers | cut -d\  -f2 | sed 's,-.*,,')
ABIVERSION = 0.4

configure: configure-stamp
configure-stamp:
	./configure --prefix=debian/tmp/usr
	touch configure-stamp

build: patch-stamp configure-stamp build-stamp
build-stamp:
	uudecode -o debian/Cecil.snk debian/Cecil.snk.uue
	$(MAKE)
	cd debian && al -link:policy.0.4.Mono.Cecil.config \
                    -out:policy.0.4.Mono.Cecil.dll \
                    -keyfile:Cecil.snk

	touch build-stamp

clean: unpatch
	dh_testdir
	dh_testroot
	-$(MAKE) clean
	rm -f debian/policy.0.4.Mono.Cecil.dll
	rm -rf $(MONO_SHARED_DIR)/.wapi
	rm -f build-stamp configure-stamp debian/Cecil.snk
	rm -f config.make
	dh_clean 

install: build
	dh_testdir
	dh_testroot
	dh_clean -k 
	dh_installdirs
	$(MAKE) install
	# fix the path in the pkgconfig file
	sed -i 's;debian/tmp/usr;/usr;g' debian/tmp/usr/lib/pkgconfig/mono-cecil.pc
	# fix the version in the pkgconfig file
	sed -i 's;^Version:.*;Version:\ $(UPVERSION);g' debian/tmp/usr/lib/pkgconfig/mono-cecil.pc
	# fix the assemblies dir
	mkdir -p debian/tmp/usr/lib/cli/mono-cecil-$(ABIVERSION)
	cp -a debian/tmp/usr/lib/Mono.Cecil/* debian/tmp/usr/lib/cli/mono-cecil-$(ABIVERSION)
	cp -a debian/policy.0.4.Mono.Cecil* debian/tmp/usr/lib/cli/mono-cecil-$(ABIVERSION)
	sed -i 's;^assemblies_dir=.*;assemblies_dir=$${prefix}/lib/cli/mono-cecil-$(ABIVERSION);g' debian/tmp/usr/lib/pkgconfig/mono-cecil.pc
	# fix permissions
	find debian/tmp -type f -name "*.dll" -or -name "*.mdb" -or -name "*.cs" -or -name "*.config" | xargs chmod -x

binary-indep: configure build install
	dh_testdir
	dh_testroot
	dh_installchangelogs ChangeLog
	dh_installdocs
	dh_installdirs
	dh_install
	dh_installman
	dh_installcligac
	dh_compress
	dh_fixperms
	dh_makeclilibs -m $(UPVERSION)
	dh_clideps
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary-arch: build install

binary: binary-indep binary-arch

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