File: rules

package info (click to toggle)
etw 3.6+svn162-4
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 18,672 kB
  • sloc: ansic: 31,633; objc: 244; sh: 97; makefile: 61
file content (43 lines) | stat: -rwxr-xr-x 1,224 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
#!/usr/bin/make -f
#export DH_VERBOSE=1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_LDFLAGS_MAINT_APPEND = -lm

%:
	dh $@

override_dh_auto_configure:
	$(MAKE) -C etw

override_dh_installdocs:
	cp ./web/EatTheWhistle.txt README
	dh_installdocs

override_dh_clean:
	dh_clean
	find . -name "*.o" -delete
	$(RM) etw/etw
	$(RM) README

# Adapted from http://wiki.debian.org/SandroTosi/Svn_get-orig-source
PACKAGE = etw
SRC_VERSION := $(shell dpkg-parsechangelog | sed -ne 's/^Version: \(\([0-9]\+\):\)\?\(.*\)-.*/\3/p')
SVN_REVISION := $(shell echo $(SRC_VERSION) | awk -F"+" '{ print $$2 }' | sed 's/svn//' )
TARBALL = $(PACKAGE)_$(SRC_VERSION).orig.tar.gz

get-orig-source:
	rm -rf get-orig-source $(TARBALL)
	mkdir get-orig-source
	svn export -r $(SVN_REVISION) \
	"https://etw.svn.sourceforge.net/svnroot/etw/trunk" \
	get-orig-source/$(PACKAGE)-$(SRC_VERSION).orig
	find get-orig-source/$(PACKAGE)-$(SRC_VERSION).orig \
	                  -name ".cvsignore" -exec rm {} \;
	GZIP='--best --no-name' \
	tar czf $(TARBALL) -C get-orig-source $(PACKAGE)-$(SRC_VERSION).orig
	rm -rf 	get-orig-source
	echo "  "$(TARBALL)" created; move it to the right destination to build the package"


.PHONY: get-orig-source