Commit a335764a authored by Bas Zoetekouw's avatar Bas Zoetekouw

Let dpkg figure out package names and version numbers

parent fead4838
......@@ -12,6 +12,7 @@ blktrace (1.2.0-1) UNRELEASED; urgency=medium
+ Fix build/host confusion.
* Make build reproducible
* Fix typo in README.Debian
* Don't parse changelog during build
-- Bas Zoetekouw <bas@debian.org> Sat, 19 May 2018 21:49:22 +0200
......
......@@ -3,13 +3,10 @@
#export DH_VERBOSE=1
include /usr/share/dpkg/architecture.mk
include /usr/share/dpkg/pkg-info.mk
CFLAGS += -Wall -Wextra -Wno-shadow -g
PKGNAME :=$(word 2,$(shell dpkg-parsechangelog | grep ^Source ) )
FULLVERSION:=$(word 2,$(shell dpkg-parsechangelog | grep ^Version ) )
UPSTREAMVER:=$(shell echo $(FULLVERSION) | sed 's/-[0-9.]\+$$//' | sed 's/^0~//' )
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
# make sure TeX/dvipdfm generates reproducable builds
......@@ -23,9 +20,9 @@ ifeq ($(DEB_HOST_ARCH_OS),linux)
# Building for a Linux-type OS, everything's fine
#
# variables are:
# PKGNAME $(PKGNAME)
# FULLVERSION $(FULLVERSION)
# UPSTREAMVER $(UPSTREAMVER)
# Package name $(DEB_SOURCE)
# Full version $(FULLVERSION)
# Upstream version $(DEB_VERSION_UPSTREAM)
else
####################################################
## Oops, it seems you are trying to build blkutils
......@@ -41,15 +38,15 @@ override_dh_auto_install:
$(MAKE) install \
prefix=/usr \
mandir=\$${prefix}/share/man \
DESTDIR=$(CURDIR)/debian/$(PKGNAME)
DESTDIR=$(CURDIR)/debian/$(DEB_SOURCE)
# move admin-only stuff to /usr/sbin
cd $(CURDIR)/debian/$(PKGNAME) && \
cd $(CURDIR)/debian/$(DEB_SOURCE) && \
mv usr/bin/btrace usr/sbin/ && \
mv usr/bin/blktrace usr/sbin/ && \
mv usr/bin/btreplay usr/sbin/ && \
mv usr/bin/btrecord usr/sbin/
# fix name of bno_plot
cd $(CURDIR)/debian/$(PKGNAME) && \
cd $(CURDIR)/debian/$(DEB_SOURCE) && \
mv usr/bin/bno_plot.py usr/bin/bno_plot
override_dh_installinit:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment