File: rules

package info (click to toggle)
libdbix-dr-perl 0.32-1
  • links: PTS
  • area: main
  • in suites: buster
  • size: 184 kB
  • ctags: 70
  • sloc: perl: 1,921; makefile: 22
file content (30 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
27
28
29
30
#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/perl-makemaker.mk

MAIN_MODULE	= lib/DBIx/DR.pm

DEBVERSION = $(shell dpkg-parsechangelog \
	|grep ^Version|awk '{print $$2}'|sed 's/-.*//' )
PERLVERSION = $(shell grep '^our[[:space:]]\+$$VERSION' $(MAIN_MODULE) \
	|head -n 1 \
	|awk '{print $$4}'|sed "s/[';']//g" )

install/libdbix-dr-perl::
	test $(DEBVERSION) = $(PERLVERSION)
	make tardist

clean::
	rm -f Makefile.old	
	rm -fr .pc
	rm -f DBIx-DR-*.tar.gz*

tarball: clean
	cd .. && tar \
		--exclude=debian \
		--exclude=.git \
		--transform='s,^.*?/,libdbix-dr-perl-$(PERLVERSION),S' \
		-czvf libdbix-dr-perl_$(DEBVERSION).orig.tar.gz \
		`basename $(CURDIR)`