Debian Codegraph @

debian/rules

raw symbols SCIP
1 #!/usr/bin/make -f
2
3 include /usr/share/dpkg/pkg-info.mk
4
5 #export DH_VERBOSE=1
6 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
7
8 %:
9 dh $@
10
11 PKD = $(abspath $(dir $(MAKEFILE_LIST)))
12 PKG = $(DEB_SOURCE)
13 UVER = $(DEB_VERSION_UPSTREAM)
14 REV = $(shell echo $(VER) | perl -ne 'print "$$1" if m/(?:git|svn|hg)(\d+)/;')
15 VER ?= $(subst $(DTYPE),,$(UVER))
16 UURL = svn://svn.code.sf.net/p/avarice/code/trunk
17 UPVER = $(shell echo $(VER) | sed 's/+.*$$//' )
18
19 # get-orig-source is kept because upstream only makes releases rarely.
20 # The usual source of the orig.tar is the upstream SVN.
21 .PHONY: get-orig-source
22 get-orig-source: $(PKG)_$(VER)$(DTYPE).orig.tar.xz
23 echo $(info I: $(PKG)_$(VER))
24 @
25
26 $(PKG)_$(VER).orig.tar.xz:
27 echo $(info I: REV=$(REV) UPVER=$(UPVER))
28 $(if $(wildcard $(PKG)-$(VER)),$(error $(PKG)-$(VER) exist, aborting..))
29 svn checkout --config-option config:miscellany:use-commit-times=yes -r $(REV) \
30 $(UURL) $(PKG)-$(VER) || $(RM) -r $(PKG)-$(VER)
31 @echo "Clean-up..."
32 cd $(PKG)-$(VER)/avarice \
33 && find . -depth -name ".svn" -exec $(RM) -r '{}' \; \
34 && ./Bootstrap && ./configure && make dist-xz
35 @echo "# Packing..."
36 find "$(PKG)-$(VER)/avarice/" -name avarice-$(UPVER)svn*.xz -exec mv '{}' "$(PKG)_$(VER).orig.tar.xz" \; \
37 && $(RM) -r "$(PKG)-$(VER)"