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 47 48 49
|
#!/usr/bin/make -f
#export DH_VERBOSE=1
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
PKD := $(abspath $(dir $(MAKEFILE_LIST)))
DTYPE := +dfsg
PKG := foobillardplus
UVER := $(shell dpkg-parsechangelog -l$(PKD)/changelog | grep Version: | cut -d' ' -f2 | cut -d'-' -f1)
REV := $(shell echo $(UVER) | awk -F"~" '{ print $$2 }' | sed -e 's/svn//' -e 's/$(DTYPE)//')
VER ?= $(subst $(DTYPE),,$(UVER))
UURL := http://svn.code.sf.net/p/foobillardplus/code/
%:
dh $@
override_dh_auto_configure:
aclocal --force
autoconf -f
autoheader -f
automake -a -c -f
dh_auto_configure -- \
--enable-network=no \
--enable-fastmath=no \
--enable-debian
.PHONY: get-orig-source
## http://wiki.debian.org/onlyjob/get-orig-source
get-orig-source: $(PKG)_$(VER)$(DTYPE).orig.tar.xz
@
$(PKG)_$(VER)$(DTYPE).orig.tar.xz:
@echo "# Downloading..."
svn export --config-option config:miscellany:use-commit-times=yes -r $(REV) \
$(UURL) $(PKG)-$(VER)
@echo "# Clean-up..."
cd $(PKG)-$(VER) \
&& $(RM) -r -v \
data/music/*.ogg \
data/DejaVuSans.ttf \
data/DejaVuSans-Bold.ttf \
data/locale/img/gpl.txt \
osx/ \
OFL.txt \
debian/
@echo "# Packing..."
find -L "$(PKG)-$(VER)" -xdev -type f -print \
| sort | XZ_OPT="-7v" tar -caf "$(PKG)_$(VER)$(DTYPE).orig.tar.xz" -T- --owner=root --group=root --mode=a+rX \
&& $(RM) -r "$(PKG)-$(VER)"
|