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
|
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
%:
dh $@ --parallel
override_dh_installdocs:
head -n 42 README | tail -n 16 > Changelog
dh_installdocs
DPATH := $(abspath $(dir $(MAKEFILE_LIST)))
DTYPE := +dfsg
PKG := brainparty
VER ?= $(shell dpkg-parsechangelog -l$(DPATH)/changelog | perl -ne 'print $$1 if m{Version:\s*([\d\.]+)}')
.PHONY: get-orig-source
get-orig-source: $(PKG)_$(VER)$(DTYPE).orig.tar.xz
@
$(PKG)_$(VER)$(DTYPE).orig.tar.xz:
@echo "# Downloading..."
uscan --noconf --verbose --rename --destdir=$(CURDIR) --check-dirname-level=0 --force-download --download-version $(VER) $(DPATH)
@echo "# Extracting..."
mkdir $(PKG)-$(VER) \
&& tar -xf $(PKG)_$(VER).orig.tar.* --directory $(PKG)-$(VER) --strip-components 1 \
|| $(RM) -r $(PKG)-$(VER)
@echo "# Clean-up..."
cd $(PKG)-$(VER) \
&& $(RM) -r -v \
Content/morningwave.ogg \
Content/highway.ogg \
Content/nevertoolate.ogg \
Content/chekolake.ogg \
Content/starmarch.ogg \
Content/ambient.ogg \
Content/brainrace.ogg \
Content/lively.ogg \
Content/professor.ogg \
Content/results.ogg \
Content/theme.ogg \
Content/*.ttf
@echo "# Correcting permissions..."
chmod a-x $(PKG)-$(VER)/Content/*
@echo "# Packing..."
tar -caf "$(PKG)_$(VER)$(DTYPE).orig.tar.xz" "$(PKG)-$(VER)" \
&& $(RM) -r "$(PKG)-$(VER)"
|