File: rules

package info (click to toggle)
catch 1.0%2Bm10git1e2f1d16-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,984 kB
  • ctags: 2,218
  • sloc: cpp: 14,476; ansic: 738; python: 173; objc: 39; makefile: 17
file content (28 lines) | stat: -rwxr-xr-x 896 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
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

upstreamVersion := $(shell dpkg-parsechangelog -SVersion | cut -d- -f1)
upstreamBuild := $(shell echo $(upstreamVersion) | grep -oP '(?<=\+m)\d+(?=git\w+)')
upstreamHash := $(shell echo $(upstreamVersion) | grep -oP '(?<=\+m$(upstreamBuild)git)\w+')
upstreamUrl := $(shell grep -oP "(?<=Homepage: )(.+)" $(CURDIR)/debian/control)
upstreamName := $(shell dpkg-parsechangelog -SSource)


%:
	dh $@

override_dh_build:
	cp single_include/catch.hpp single_include/catch.hpp.bak
	python scripts/generateSingleHeader.py nobump

override_dh_clean:
	if [ -f single_include/catch.hpp.bak ]; then \
		mv -f single_include/catch.hpp.bak single_include/catch.hpp; \
	fi;
	dh_clean

get-orig-source:
	wget -O - $(upstreamUrl)/archive/$(upstreamHash).tar.gz > $(upstreamName)_$(upstreamVersion).orig.tar.gz