File: Makefile

package info (click to toggle)
dpkg-www 2.65
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 192 kB
  • sloc: sh: 1,515; makefile: 30
file content (36 lines) | stat: -rw-r--r-- 809 bytes parent folder | download | duplicates (2)
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
# Makefile

PKGNAME = $(shell dpkg-parsechangelog -SSource)
VERSION = $(shell dpkg-parsechangelog -SVersion)
RELTIME = $(shell dpkg-parsechangelog -STimestamp)
PODDATE = $(shell TZ=UTC0 LC_ALL=C date '+%F' --date="@$(RELTIME)")

POD2MAN = pod2man

MANS = src/dpkg-www.1 src/dpkg-www.8

all: src/dpkg $(MANS)

src/dpkg: src/dpkg-cgi
	# Update program version from changelog
	sed '/^PROG_VERSION=/s/^.*$$/PROG_VERSION=$(VERSION)/' <$< >$@
	chmod 755 $@

%: %.pod
	$(POD2MAN) \
	  --section=$(subst .,,$(suffix $@)) \
	  --name=$(notdir $(basename $@)) \
	  --center="Debian Project" \
	  --date="$(PODDATE)" \
	  --release="$(VERSION)" \
	    $< >$@

clean:
	$(RM) src/dpkg
	$(RM) $(MANS)

dist:
	git archive \
	    --prefix=$(PKGNAME)-$(VERSION)/ \
	    --output=$(PKGNAME)-$(VERSION).tar.xz \
	    $(VERSION)