comparison debian/rules @ 174:9bbc834d5f3e

new debianization from hggdh
author Carl Byington <carl@five-ten-sg.com>
date Tue, 07 Apr 2009 13:45:20 -0700
parents d9393349ab29
children
comparison
equal deleted inserted replaced
173:d9393349ab29 174:9bbc834d5f3e
1 #!/usr/bin/make -f 1 #!/usr/bin/make -f
2 include /usr/share/cdbs/1/rules/debhelper.mk 2 include /usr/share/cdbs/1/rules/debhelper.mk
3 include /usr/share/cdbs/1/class/autotools.mk 3 include /usr/share/cdbs/1/class/autotools.mk
4 include /usr/share/cdbs/1/rules/simple-patchsys.mk 4 include /usr/share/cdbs/1/rules/simple-patchsys.mk
5 5
6 export DH_VERBOSE=1 6 export DH_VERBOSE=1
7 DEB_CONFIGURE_EXTRA_FLAGS = --enable-libpst-shared 7 DEB_CONFIGURE_EXTRA_FLAGS = --enable-libpst-shared
8 DEB_AUTO_UPDATE_AUTOCONF = 2.63
9 DEB_AUTO_UPDATE_AUTOMAKE = 1.10
10 DEB_AUTO_UPDATE_LIBTOOL = pre
11
12 # Makefile arcanery warning:
13 # $(dir $(_)) gives us the path containing this rules file.
14 # I haven't found this documented in any make documentation, so I am unsure
15 # how portable/version independent it is.
16 # This magic care of Emmet Hickory:
17 # (http://lists.debian.org/debian-devel-games/2008/02/msg00135.html)
18
19 TEMP_DIR := $(shell mktemp -d)
20 SOURCE_DIR = $(word 1, $(shell ls -d --group-directories-first $(TEMP_DIR)/*))
21 SOURCE_VER = $(shell echo $(notdir $(SOURCE_DIR)) | sed s/libpst-//)
22 CURVER = $(shell dpkg-parsechangelog | grep ^Version | cut -d" " -f2 | cut -d"-" -f1 | cut -d"+" -f1 )
23
24 download-tarball:
25 uscan --download --destdir $(TEMP_DIR) \
26 --no-symlink --force-download --download-version $(CURVER) \
27 --watchfile=$(dir $(_))/watch
28 cd $(TEMP_DIR) && tar xzvf *.tar.gz
29
30 delete-shipped-debian: download-tarball
31 rm -r $(TEMP_DIR)/libpst-$(CURVER)/debian
32 repack-source: delete-shipped-debian
33 cd $(TEMP_DIR) && \
34 tar czvf libpst_$(SOURCE_VER).orig.tar.gz \
35 libpst-$(CURVER)
36
37 get-orig-source: repack-source
38 mv $(TEMP_DIR)/libpst_$(CURVER).orig.tar.gz ..
39 rm -r $(TEMP_DIR)
40
41 .PHONY: download-tarball delete-shipped-debian repack-source get-orig-source
42