File: rules

package info (click to toggle)
ctpl 0.3.3.dfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 2,820 kB
  • sloc: sh: 11,047; ansic: 5,773; python: 156; makefile: 129
file content (33 lines) | stat: -rwxr-xr-x 1,212 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
30
31
32
33
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

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


%:
	dh  $@ --with=autoreconf

override_dh_installchangelogs:
	dh_installchangelogs NEWS

override_dh_autoreconf:
	dh_autoreconf ./autogen.sh

# get-orig-source to drop waf (see: http://bugs.debian.org/654464)
upstream_version ?= $(shell dpkg-parsechangelog | sed -rne 's/^Version: ([0-9.]+)([.+]dfsg)?.*$$/\1/p')
dfsg_version = $(upstream_version)+dfsg
pkg = $(shell dpkg-parsechangelog | sed -ne 's/^Source: //p')

get-orig-source:
	uscan --noconf --force-download --rename --repack --download-current-version --destdir=.
	tar -xzf $(pkg)_$(upstream_version).orig.tar.gz
	mv $(pkg)-$(upstream_version) $(pkg)-$(dfsg_version)
	rm $(pkg)-$(dfsg_version)/waf
	GZIP="-9fn --rsyncable" tar -czf $(pkg)_$(dfsg_version).orig.tar.gz $(pkg)-$(dfsg_version)
	rm -rf $(pkg)-$(dfsg_version)