Commit 4af89953 authored by Dmitry Smirnov's avatar Dmitry Smirnov

debhelper & compat to version 9; standards to 3.9.4

parent 5da87a20
doc/blktrace.pdf
btt/doc/btt.pdf
btreplay/doc/btreplay.pdf
......@@ -3,17 +3,17 @@ Section: utils
Priority: extra
Maintainer: Bas Zoetekouw <bas@debian.org>
Build-Depends:
debhelper (>=5),
debhelper (>= 9),
ghostscript,
libaio-dev,
texlive-latex-base,
texlive-latex-extra
Standards-Version: 3.8.2
Standards-Version: 3.9.4
Homepage: http://brick.kernel.dk/snaps/
Package: blktrace
Architecture: any
Depends:
Depends: ${misc:Depends},
${shlibs:Depends},
python,
lsb-base
......
......@@ -2,46 +2,25 @@
#export DH_VERBOSE=1
# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE )
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE )
DEB_BUILD_ARCH_OS ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS )
ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH )
#DEB_BUILD_ARCH_OS ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS )
CFLAGS = -Wall -Wextra -Wno-shadow -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
export CFLAGS
TOPDIR:=$(shell pwd)
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~//' )
BUILDDIR :=build/
%:
dh $@
checklinux: check-stamp
check-stamp:
override_dh_auto_build:
ifeq ($(DEB_BUILD_ARCH_OS),linux)
# Building for a Linux-type OS, everything's fine
#
# variables are:
# TOPDIR $(TOPDIR)
# PKGNAME $(PKGNAME)
# FULLVERSION $(FULLVERSION)
# UPSTREAMVER $(UPSTREAMVER)
# SRCARCHIVE $(SRCARCHIVE)
# UNPACKDIR $(UNPACKDIR)
# BUILDDIRBASE $(BUILDDIRBASE)
# BUILDDIR $(BUILDDIR)
touch check-stamp
else
####################################################
## Oops, it seems you are trying to build blkutils
......@@ -51,94 +30,26 @@ else
####################################################
false
endif
$(MAKE) CFLAGS="$(CFLAGS)" all docs
# not really unpack, but just links everything in build/
unpack: $(BUILDDIR)/COPYING
$(BUILDDIR)/COPYING:
# unpack
[ -d "$(BUILDDIR)" ] || mkdir "$(BUILDDIR)"
/bin/sh debian/lndir.sh . $(BUILDDIR)
rm -r $(BUILDDIR)/build
rm -r $(BUILDDIR)/debian
build: build-stamp
build-stamp: check-stamp $(BUILDDIR)/COPYING
# VERSION=$(VERSION)
dh_testdir
# build
cd $(BUILDDIR) && make CFLAGS="$(CFLAGS)" all docs
touch build-stamp
clean:
dh_testdir
-rm -rf $(BUILDDIR)
-rm -f *-stamp
dh_clean
install: build-stamp install-stamp
install-stamp:
dh_testdir
dh_clean -k
dh_installdirs
cd $(BUILDDIR) && \
override_dh_auto_install:
$(MAKE) install \
prefix=/usr \
mandir=\$${prefix}/share/man \
DESTDIR=$(TOPDIR)/debian/$(PKGNAME)
# install the docs
install -m0644 $(BUILDDIR)/doc/blktrace.pdf \
$(TOPDIR)/debian/$(PKGNAME)/usr/share/doc/blktrace
install -m0644 $(BUILDDIR)/btt/doc/btt.pdf \
$(TOPDIR)/debian/$(PKGNAME)/usr/share/doc/blktrace
install -m0644 $(BUILDDIR)/btreplay/doc/btreplay.pdf \
$(TOPDIR)/debian/$(PKGNAME)/usr/share/doc/blktrace
# install an upstream changelog
# ! We're not built from a git snapsht atm !
#git log > $(TOPDIR)/debian/$(PKGNAME)/usr/share/doc/blktrace/changelog
#chmod 644 $(TOPDIR)/debian/$(PKGNAME)/usr/share/doc/blktrace/changelog
DESTDIR=$(CURDIR)/debian/$(PKGNAME)
# move admin-only stuff to /usr/sbin
cd $(TOPDIR)/debian/$(PKGNAME) && \
cd $(CURDIR)/debian/$(PKGNAME) && \
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 $(TOPDIR)/debian/$(PKGNAME) && \
cd $(CURDIR)/debian/$(PKGNAME) && \
mv usr/bin/bno_plot.py usr/bin/bno_plot
touch install-stamp
# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
override_dh_installinit:
dh_installinit --name=mountdebugfs --no-restart-on-upgrade \
--update-rcd-params="start 90 S . stop 21 0 6 ."
dh_link
dh_strip
dh_compress -X.pdf
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install unpack checklinux
override_dh_compress:
dh_compress -X.pdf
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