summaryrefslogtreecommitdiff
path: root/debian/rules
blob: aa773ff2ea53b98bfc0a36827c74567a366009b5 (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
#!/usr/bin/make -f

override_dh_auto_install:
	make \
		install_cursors \
		install_doc \
		install_fonts \
		install_gtk_theme \
		install_icons \
		install_login_sound \
		install_sounds \
		DESTDIR=$(CURDIR)/debian/tmp
	rm -rfv $(CURDIR)/debian/tmp/usr/share/icons/*/src
	rm -rfv $(CURDIR)/debian/tmp/usr/share/icons/*/build
	rm -fv $(CURDIR)/debian/tmp/usr/share/themes/Chicago95/index.theme
	rm -fv $(CURDIR)/debian/tmp/usr/share/themes/Chicago95/gtk-3.2*

%:
	dh $@

PACKAGE      := chicago95
GIT_REPO     := https://github.com/grassmunk/Chicago95.git
DEBIAN_PATH  := $(abspath $(dir $(firstword $(MAKEFILE_LIST))))
SRC_VERSION  := $(shell dpkg-parsechangelog -l$(DEBIAN_PATH)/changelog | awk '/^Version:/ {sub(/-[^-]*/, "", $$2); print $$2}')
GIT_REVISION := $(shell echo $(SRC_VERSION) | sed -r 's,.+git\.(\w+).*,\1,')
TARBALL      := $(PACKAGE)_$(SRC_VERSION).orig.tar.xz
.PHONY: get-orig-source
get-orig-source:
	rm -rf get-orig-source $(TARBALL) && mkdir get-orig-source
	git clone $(GIT_REPO) get-orig-source/$(PACKAGE)-$(SRC_VERSION)
	git -C get-orig-source/$(PACKAGE)-$(SRC_VERSION) checkout $(GIT_REVISION)
	find get-orig-source/$(PACKAGE)-$(SRC_VERSION) -name '.*' -print0 | xargs -0 --no-run-if-empty rm -rfv
	tar cJf $(TARBALL) -C get-orig-source $(PACKAGE)-$(SRC_VERSION)
	rm -rf get-orig-source
	@echo "  "$(TARBALL)" created; move it to the right destination to build the package"