File: rules.eperl

package info (click to toggle)
statnews 2.5
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 120 kB
  • ctags: 20
  • sloc: perl: 247; makefile: 79
file content (56 lines) | stat: -rw-r--r-- 1,141 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
47
48
49
50
51
52
53
54
55
56
<::>//
#! /usr/bin/make -f
#
# rules for the Debian <:=$PACKAGE:> package.
#
<:
  open (my $copyright, "< COPYRIGHT");
  while (<$copyright>) {print '#'.(/^$/?"\n":" $_")};
  close $copyright;
:>//

EPERL_SRC := $(wildcard debian/*.eperl)
EPERL_OBJ := $(EPERL_SRC:%.eperl=%)

.PHONY: eperl
eperl: $(EPERL_OBJ)
	echo $(filter-out debian/copyright debian/rules, $(EPERL_OBJ)) \
		debian/clean > debian/clean

<:# Eperl is simply great: thanks, Ralf! :>//
%:: %.eperl
	eperl -P -o $@ $<

.PHONY: build
build: eperl
	dh $@

%:
	dh $@

.PHONY: override_dh_auto_install
override_dh_auto_install:
	dh_auto_install -- prefix=/usr

.PHONY: snapshot
snapshot:
	git-dch --snapshot --auto --ignore-branch
	git-buildpackage --git-ignore-new -rfakeroot -tc -i -us -uc

.PHONY: release
release:
	git-dch --release
	git add debian/changelog
	git commit
	git-buildpackage -rfakeroot -tc -i
	V=$$(dpkg-parsechangelog|egrep '^Version: '|cut -d ' ' -f 2); \
	git tag -s -m "Debian release $${V}" debian/$${V}
<:
# local variables:
# mode: makefile
# ispell-local-dictionary: "american"
# ispell-check-comments: exclusive
# end:
#
# LocalWords:  Eperl Ralf
:>//