File: rules

package info (click to toggle)
sfarklib 2.24-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 252 kB
  • ctags: 303
  • sloc: cpp: 1,483; makefile: 88
file content (34 lines) | stat: -rwxr-xr-x 1,040 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
#!/usr/bin/make -f

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

export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

%:
	dh $@ 

override_dh_strip:
	dh_strip -plibsfark0 --keep-debug --dbg-package=libsfark0-dbg



PKD = $(abspath $(dir $(MAKEFILE_LIST)))
PKG  = $(word 2,$(shell dpkg-parsechangelog -l$(PKD)/changelog | grep ^Source))
VER ?= $(shell dpkg-parsechangelog -l$(PKD)/changelog | perl -ne 'print $$1 if m{^Version:\s+(?:\d+:)?(\d.*)(?:\-\d+.*)};')

get-orig-source: $(PKG)_$(VER).orig.tar.gz $(info I: $(PKG)_$(VER))
	@

$(PKG)_$(VER).orig.tar.gz:
	@echo "# Downloading..."
	rm -rf $(PKG)-$(VER)
	git clone git://github.com/raboof/sfArkLib.git $(PKG)-$(VER)
	cd $(PKG)-$(VER) \
	&& git checkout `echo $(VER) | perl -pe 's/\d+?\.\d+?\+\d\d\d\d\d\d\d\dgit(\w\w\w\w\w\w\w)/\1/'` \
	&& $(RM) -rf .git .gitignore
	@echo "# Packing..."
	find -L "$(PKG)-$(VER)" -xdev -type f -print | sort \
	| GZIP=-9n tar -czvf "$(PKG)_$(VER).orig.tar.gz" -T- --owner=root --group=root --mode=a+rX \
	&& $(RM) -rf "$(PKG)-$(VER)"