File: Makefile

package info (click to toggle)
dpkg-www 2.59
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 192 kB
  • sloc: sh: 1,596; makefile: 16
file content (19 lines) | stat: -rw-r--r-- 537 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Makefile

PKGNAME = $(shell head -1 debian/changelog | sed 's/ .*//')
VERSION	= $(shell head -1 debian/changelog | sed 's/.*(//;s/).*//;s/-.*//')

all:
	# Update program version from changelog
	if ! grep -q "^PROG_VERSION=$(VERSION)$$" src/dpkg; then \
	    sed '/^PROG_VERSION=/s/^.*$$/PROG_VERSION=$(VERSION)/' \
		< src/dpkg > src/dpkg.new; \
	    mv -f src/dpkg.new src/dpkg; \
	    chmod 755 src/dpkg; \
	fi

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