blob: 8664eba9659e8b48355e174426b4b33913ac81fe (
plain)
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
|
#!/usr/bin/make -f
#export DH_VERBOSE=1
export DH_COMPAT=3
include /usr/share/dpatch/dpatch.make
# Use ./configure if configure exists, ./autogen.sh if not.
# If neither exist, exit with an error.
CONFCMD:=$(shell test -x configure && echo "configure" || echo "")
ifeq (${CONFCMD},)
CONFCMD:=$(shell test -x autogen.sh && echo "autogen.sh" || echo "")
$(shell touch needs-maintclean)
endif
VERSION = $(shell dpkg-parsechangelog | grep ^Vers | cut -d\ -f2)
build: patch build-stamp
build-stamp:
dh_testdir
# refresh autotools crap
NOCONFIGURE=yes sh debian/autogen.sh
# ...testing whether configure or autogen.sh check was successfull
test "${CONFCMD}"
PATH="$(CURDIR)/debian:$$PATH" ./$(CONFCMD) --prefix=/usr --with-gc=included \
--mandir=\$${prefix}/share/man \
--infodir=\$${prefix}/share/info \
--sysconfdir=/etc
$(MAKE)
$(CC) -o cli-wrapper debian/cli-wrapper.c `pkg-config glib-2.0 --cflags --libs`
touch build-stamp
clean: unpatch
dh_testdir
dh_testroot
rm -f build-stamp
# Use the right clean target depending if we ran ./autogen.sh or not
-if [ -e "needs-maintclean" ]; then \
rm -f needs-maintclean; \
$(MAKE) maintainer-clean; \
else \
$(MAKE) distclean; \
fi
-cd debian/detector && $(MAKE) clean
# I shouldn't have to do this
rm -f mono/arch/arm/Makefile mono/arch/ppc/Makefile \
mono/arch/sparc/Makefile mono/os/win32/Makefile \
data/config config.log cli-wrapper
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
$(MAKE) install DESTDIR=$(PWD)/debian/tmp
install -D -m755 cli-wrapper $(CURDIR)/debian/mono-common/usr/bin/cli-wrapper
cd $(CURDIR)/debian/detector && $(MAKE) && install -D -m755 binfmt-detector-cli $(CURDIR)/debian/mono-common/usr/lib/cli/binfmt-detector-cli
install -o root -g root -m 644 debian/cli.binfmt \
debian/mono-common/usr/share/binfmts/cli
# Build architecture-independent files here.
binary-indep: build install
dh_testdir -i
dh_testroot -i
dh_movefiles -i
dh_link -i
dh_installchangelogs -i ChangeLog
dh_installdocs -i
# dh_installexamples -i
# dh_installdebconf -i
# dh_installinfo -i
# dh_undocumented -i
dh_installman -i
dh_compress -i
dh_fixperms -i
dh_installdeb -i
dh_gencontrol -i
dh_md5sums -i
dh_builddeb -i
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir -s
dh_testroot -s
dh_movefiles -s
dh_link -s
install -m644 -D debian/lintian debian/mono/usr/share/lintian/overrides/mono
# the SONAMEs fix
perl -pe 's/-0.dll(.*)\.so/-0.dll$$1.so.0/; s/libgstreamer-0.6.so/libgstreamer-0.6.so.0/;' -i debian/mono-common/etc/mono/config
# cd debian; for s in *.shlibs.in ; do sed -e "s/_VERSION_/$(VERSION)/g" < $$s | tee $${s%%.in} | tee $${s%%.shlibs.in}/DEBIAN/shlibs >> shlibs.local ; done
# cd debian; for s in *.shlibs.in ; do sed -e "s/_VERSION_/$(VERSION)/g" < $$s | tee $${s%%.in} >> shlibs.local ; done
dh_installchangelogs -s
dh_installdocs -s
dh_installexamples -s
dh_installmenu -s
# dh_installdebconf -s
# dh_installinfo -s
dh_undocumented -s
dh_installman -s
dh_strip -s
dh_compress -s
dh_fixperms -s
if test -d debian/libmono0 ; then dh_makeshlibs -plibmono0 -V 'libmono0 (= $(VERSION))' ;fi
#dh_makeshlibs -plibmint0 -V 'libmint0 (= $(VERSION))'
dh_installdeb -s
dh_shlibdeps -s -Xlibmono-profiler-cov
# fix cross-dependencies... but calls for trouble... using -X for now
# perl -pe 's/(Depends:.*)libmono0[^,\n]+[,\n](.*)/$$1$$2/' -i debian/libmono0/DEBIAN/control
dh_gencontrol -s
dh_md5sums -s
dh_builddeb -s
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
|