File: rules

package info (click to toggle)
wmcoincoin 2.6.5.git%2B42.b85f761c7010-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,056 kB
  • sloc: ansic: 29,495; sh: 380; makefile: 140; sed: 16
file content (46 lines) | stat: -rwxr-xr-x 1,648 bytes parent folder | download
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
#!/usr/bin/make -f

INSTDIR = $(CURDIR)/debian/wmcoincoin/usr
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- --disable-wmccc

execute_after_dh_install:
	mv $(INSTDIR)/bin/wmcoincoin $(INSTDIR)/bin/wmcoincoin_player \
		$(INSTDIR)/libexec/wmcoincoin/
	mv $(INSTDIR)/bin/wmcoincoin-* $(INSTDIR)/share/wmcoincoin
	rm -f $(INSTDIR)/share/wmcoincoin/wmcoincoin.spec
	rm -f $(INSTDIR)/share/wmcoincoin/README
	( cd $(INSTDIR)/share/pixmaps && mv icon.xpm wmcoincoin.xpm )
	( cd $(INSTDIR)/bin && mv wmcoincoin.sh wmcoincoin )

get-orig-source:
	@echo -n "fetching upstream git repository ... "
	@git fetch -q https://github.com/seeschloss/wmcoincoin
	@echo "done"
	@echo -n "determining upstream version number ... "
	$(eval VERSION := $(shell git show FETCH_HEAD:configure.ac | \
		grep AC_INIT | cut -d, -f2 | tr -d ' ' | sed 's/-/./'))
	@echo $(VERSION)
	@echo -n "finding commit of last version bump ... "
	$(eval LAST_BUMP := $(shell git log FETCH_HEAD -1 -GAC_INIT \
		--pretty=%H))
	@echo $(LAST_BUMP)
	@echo -n "determining number of commits since last version bump ... "
	$(eval COMMITS_SINCE_BUMP := $(shell git rev-list \
		$(LAST_BUMP)..FETCH_HEAD --count))
	@echo $(COMMITS_SINCE_BUMP)
	$(eval FULL_VERSION := $(VERSION)$(if $(filter-out 0, \
		$(COMMITS_SINCE_BUMP)),+$(COMMITS_SINCE_BUMP).$(shell \
		git log FETCH_HEAD -1 --pretty=%h)))
	$(eval FILENAME := ../wmcoincoin_$(FULL_VERSION).orig.tar)
	@echo -n "generating $(FILENAME) ... "
	@git archive -o $(FILENAME) FETCH_HEAD
	@echo "done"
	@echo -n "compressing into $(FILENAME).xz ... "
	@xz -fz $(FILENAME)
	@echo "done"