blob: e809db5f73b1bd2587a6bd449bdd583b26df85ac (
plain)
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
|
#!/usr/bin/make -f
# -*- makefile -*-
PKD = $(abspath $(dir $(MAKEFILE_LIST)))
PKG = $(word 2,$(shell dpkg-parsechangelog -l$(PKD)/changelog | grep ^Source))
UVER = $(shell dpkg-parsechangelog -l$(PKD)/changelog | perl -ne 'print $$1 if m{^Version:\s+(?:\d+:)?(\d.*)(?:\-\d+.*)};')
DTYPE = +dfsg
VER ?= $(subst $(DTYPE),,$(UVER))
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
%:
dh $@ --parallel --with pkgkde_symbolshelper
override_dh_auto_configure:
dh_auto_configure -- -DLIB_SUFFIX=/$(DEB_HOST_MULTIARCH) -DSFML_BUILD_DOC=ON
override_dh_strip:
dh_strip --dbg-package=libsfml2-dbg
## http://wiki.debian.org/onlyjob/get-orig-source
.PHONY: get-orig-source
get-orig-source: $(PKG)_$(VER)$(DTYPE).orig.tar.xz $(info I: $(PKG)_$(VER)$(DTYPE))
@
$(PKG)_$(VER)$(DTYPE).orig.tar.xz:
@echo "# Downloading..."
uscan --noconf --verbose --rename --destdir=$(CURDIR) --check-dirname-level=0 --force-download --download-version $(VER) $(PKD)
$(if $(wildcard $(PKG)-$(VER)),$(error $(PKG)-$(VER) exist, aborting..))
@echo "# Extracting..."
mkdir $(PKG)-$(VER) \
&& tar -xf $(PKG)_$(VER).orig.tar.* --directory $(PKG)-$(VER) --strip-components 1 \
|| $(RM) -r $(PKG)-$(VER)
@echo "# Cleaning-up..."
cd $(PKG)-$(VER) \
&& $(RM) -r -v \
extlibs/ \
examples/*/resources/ \
tools/xcode
#$(RM) -v $(PKG)_$(VER).orig.tar.*
@echo "# Packing..."
find -L "$(PKG)-$(VER)" -xdev -type f -print | sort \
| XZ_OPT="-6v" tar -caf "$(PKG)_$(VER)$(DTYPE).orig.tar.xz" -T- --owner=root --group=root --mode=a+rX \
&& $(RM) -r "$(PKG)-$(VER)"
|