File: rules

package info (click to toggle)
libbinio 1.4%2Bdfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,268 kB
  • ctags: 235
  • sloc: sh: 8,413; cpp: 937; makefile: 32
file content (29 lines) | stat: -rwxr-xr-x 1,241 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

DEB_DEBIAN_DIR=$(dir $(firstword $(MAKEFILE_LIST)))
DEB_UPSTREAM_VERSION=$(shell dpkg-parsechangelog -l$(DEB_DEBIAN_DIR)/changelog \
                               | sed -rne 's,^Version: ([^+]+).*,\1,p')

REPACK_TMPDIR:=$(shell mktemp -d)


%:
	dh $@  --with autoreconf --parallel

override_dh_autoreconf:
	mv configure.in configure.ac
	dh_autoreconf

override_dh_autoreconf_clean:
	dh_autoreconf_clean
	[ ! -f configure.ac ] || mv configure.ac configure.in

get-orig-source:
	uscan --noconf --force-download --rename --download-current-version --destdir=$(REPACK_TMPDIR) --package=libbinio --upstream-version=$(DEB_UPSTREAM_VERSION) --watchfile=$(DEB_DEBIAN_DIR)/watch
	rm -rf $(REPACK_TMPDIR)/libbinio-$(DEB_UPSTREAM_VERSION)
	tar -xf $(REPACK_TMPDIR)/libbinio_$(DEB_UPSTREAM_VERSION).orig.tar.gz -C $(REPACK_TMPDIR)
	rm $(REPACK_TMPDIR)/libbinio_$(DEB_UPSTREAM_VERSION).orig.tar.gz
	GZIP="--best --no-name" tar -C $(REPACK_TMPDIR) -czf $(REPACK_TMPDIR)/libbinio_$(DEB_UPSTREAM_VERSION)+dfsg1.orig.tar.gz --exclude=doc/* libbinio-$(DEB_UPSTREAM_VERSION)
	rm -r $(REPACK_TMPDIR)/libbinio-$(DEB_UPSTREAM_VERSION)
	mv $(REPACK_TMPDIR)/libbinio_$(DEB_UPSTREAM_VERSION)+dfsg1.orig.tar.gz $(CURDIR)
	rm -rf $(REPACK_TMPDIR)