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
|
#!/usr/bin/make -f
#export DH_VERBOSE=1
export MONO_SHARED_DIR=$(CURDIR)
MAKEFILE = $(firstword $(MAKEFILE_LIST))
DEBIAN_DIR = $(dir $(MAKEFILE))
SOURCE_DIR = $(DEBIAN_DIR)/..
DEB_VERSION = $(shell dpkg-parsechangelog -l$(DEBIAN_DIR)/changelog | grep ^Version | cut -d" " -f2)
DEB_SOURCE_NAME = $(shell dpkg-parsechangelog -l$(DEBIAN_DIR)/changelog | grep ^Source | cut -d" " -f2)
VERSION = $(shell echo $(DEB_VERSION) | cut -d"-" -f1 | sed 's/+dfsg.*//')
include /usr/share/quilt/quilt.make
configure: config-stamp
config-stamp: $(QUILT_STAMPFN)
dh_testdir
aclocal
autoconf
automake --add-missing --copy
./configure --prefix=/usr
touch $@
build: build-stamp
build-stamp: config-stamp
dh_testdir
$(MAKE)
touch build-stamp
clean: clean-patched unpatch
clean-patched:
dh_testdir
dh_testroot
[ ! -f Makefile ] || $(MAKE) distclean
find . -name "Makefile.in" | xargs rm -rf
rm -rf $$MONO_SHARED_DIR/.wapi autom4te.cache/
dh_clean configure config.sub config.guess aclocal.m4
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp/
binary-indep: build install
dh_testdir
dh_testroot
dh_movefiles
dh_link
dh_install
cp $(CURDIR)/debian/monodoc-http-script $(CURDIR)/debian/monodoc-http/usr/bin/monodoc-http
# fix upstream file permissions
find debian/monodoc-http/usr/*/monodoc/web -type f -exec chmod 644 {} \;
find debian/monodoc-http/usr/*/monodoc/web -type d -exec chmod 755 {} \;
rm debian/monodoc-http/usr/lib/monodoc/web/xtree/xmlextras.js
ln -s /usr/share/javascript/xmlextras/xmlextras.js debian/monodoc-http/usr/lib/monodoc/web/xtree/xmlextras.js
# remove directories moved to /usr/share/
#find debian/monodoc-http/usr/lib/monodoc/web -type d -name "images" -o -name "xtree" | xargs rm -rf
dh_installchangelogs ChangeLog
dh_installdocs
dh_installmenu
dh_desktop
dh_installman
dh_strip
dh_clistrip
dh_compress
dh_fixperms
dh_clifixperms
dh_installdeb
dh_installxsp -V 2
dh_clideps
dh_gencontrol
dh_md5sums
dh_builddeb
binary-arch:
binary: binary-indep
get-orig-source:
uscan \
--package $(DEB_SOURCE_NAME) \
--watchfile $(DEBIAN_DIR)/watch \
--upstream-version $(VERSION) \
--download-version $(VERSION) \
--destdir . \
--force-download \
--rename
bzcat ./$(DEB_SOURCE_NAME)_$(VERSION).orig.tar.bz2 | \
gzip -9fn -c - > ./$(DEB_SOURCE_NAME)_$(VERSION).orig.tar.gz
rm ./$(DEB_SOURCE_NAME)_$(VERSION).orig.tar.bz2
.PHONY: build clean clean-patched binary-indep binary install
|