File: rules

package info (click to toggle)
libmojolicious-plugin-mailexception-perl 0.20-1.1
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 84 kB
  • sloc: perl: 244; makefile: 21
file content (26 lines) | stat: -rwxr-xr-x 717 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
#!/usr/bin/make -f

PKG := $(shell dpkg-parsechangelog|grep ^Source|awk '{print $$2}')
MOD := $(shell cat Makefile.PL|grep VERSION_FROM \
    |sed 's/[[:space:]]\+//g'|sed 's/.*lib/lib/'|sed 's/\.pm.*$$/.pm/')
MV := $(shell perl -le \
    "`grep VERSION $(MOD)`; print \$$VERSION")
DV := $(shell dpkg-parsechangelog |grep ^Version \
    |awk '{print $$2}'|sed 's/-[[:digit:]]\+$$//')

tarball: clean
	test "$(MOD) v$(MV)" = "$(MOD) v$(DV)"
	test -d ../$(PKG)-$(MV)
	cd .. && \
	tar --exclude=debian --exclude=.git -czvf \
	$(PKG)_$(MV).orig.tar.gz \
	$(PKG)-$(MV)

override_dh_clean:
	dh_clean
	rm -f Mojolicious-Plugin-MailException-*.tar.gz
%:
	dh $@

override_dh_installchangelogs:
	dh_installchangelogs -XChanges