File: rules

package info (click to toggle)
anyremote 6.0%2Bdfsg-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 5,176 kB
  • sloc: ansic: 9,299; sh: 3,907; python: 115; makefile: 59
file content (46 lines) | stat: -rwxr-xr-x 1,705 bytes parent folder | download
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
#!/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  $@

override_dh_auto_configure:
	cp -f /usr/share/misc/config.sub config.sub
	cp -f /usr/share/misc/config.guess config.guess
	dh_auto_configure

override_dh_auto_clean:
	rm -f config.sub config.guess
	dh_auto_clean

DEBVERSION:=$(shell head -n 1 debian/changelog | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
UPVERSION:=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//' -e 's/\+dfsg$$//')
UPFILENAME:=anyremote_$(UPVERSION).orig.tar.gz
FILENAME:=anyremote_$(UPVERSION)+dfsg.orig.tar.gz
TARBALL_DIR:=tarballs/anyremote-$(UPVERSION).tmp

get-orig-source:
	@@dh_testdir
	@@rm -rf tarballs; mkdir tarballs
	@@echo Downloading $(UPFILENAME)
	@@uscan --verbose --force-download --download-current-version --destdir tarballs
	@@echo Repacking as DFSG-free...
	@@mkdir -p $(TARBALL_DIR)/
	@@cd $(TARBALL_DIR) ; tar -xzf ../$(UPFILENAME)
	@@rm -vf $(TARBALL_DIR)/anyremote-$(UPVERSION)/cfg-data/Utils/winampgui.tar.gz
	@@rm -vrf $(TARBALL_DIR)/anyremote-$(UPVERSION)/cfg-data/iViewer
	@@cd $(TARBALL_DIR) ; mv anyremote-$(UPVERSION) anyremote-$(UPVERSION)+dfsg; tar -czf ../$(FILENAME) *
	@@echo Cleaning up...
	@@$(RM) -rf $(TARBALL_DIR)/
	@@$(RM) -f tarballs/$(UPFILENAME)
	@@mv -vf tarballs/$(FILENAME) ../
	@@$(RM) -rf tarballs
#	@@cd ../; tar -xzf $(FILENAME)