File: rules

package info (click to toggle)
citation-style-language-styles 0~20210228.744de6d-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 61,944 kB
  • sloc: ruby: 325; perl: 50; makefile: 18
file content (31 lines) | stat: -rwxr-xr-x 850 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/make -f

include /usr/share/dpkg/pkg-info.mk
HASH=$(shell echo $(DEB_VERSION_UPSTREAM) | sed -e 's/^.*\.//')

PACKAGE = $(shell dh_listpackages)
TMP     = $(CURDIR)/debian/$(PACKAGE)

%:
	dh $@

override_dh_auto_test:
	# there are no tests

override_dh_fixperms:
	dh_fixperms
	chmod -x $(TMP)/usr/share/citation-style-language/styles/*.csl

get-orig-source:
	git clone https://github.com/citation-style-language/styles.git
	# for some reason, with "--prefix=$(DEB_SOURCE)-$(DEB_VERSION_UPSTREAM)/",
	# or any --prefix actually, 4 csl files are renamed and placed outside the
	# subdirectory
	cd styles && \
	git archive --format=tar $(HASH) | \
		xz > ../../$(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM).orig.tar.xz
	rm -rf styles
	# possible alternative: `git deborig $(HASH)' (in devscripts >= 2.17.0)

gen-copyright:
	perl debian/gen-copyright