hwraid/packaging/debian/lsiutil/rules

52 lines
1.3 KiB
Makefile
Executable File

#!/usr/bin/make -f
DESTDIR = $(CURDIR)/debian/lsiutil
# Get version from changelog as well as lsb_release
# to compute unique build version (useful for repo mirroring systems doing file pooling)
PKG_VERSION := $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f2 -d' ')
DIST_NAME := $(shell lsb_release -si)
DIST_RELEASE := $(shell lsb_release -sc)
DIST_VERSION := $(shell lsb_release -sr)
PKG_VERSION_TAG := $(PKG_VERSION)+$(DIST_NAME).$(DIST_RELEASE).$(DIST_VERSION)
SUBSTVARS_BINARY_VERSION := -Vbinary:Version="$(PKG_VERSION_TAG)"
SUBSTVARS_SOURCE_VERSION := -Vsource:Version="$(PKG_VERSION_TAG)"
debian/user_guide.pdf:
uudecode -o $@ $@.uu
build: debian/user_guide.pdf
clean:
dh_testdir
dh_testroot
dh_clean
rm -f debian/user_guide.pdf
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
$(CC) lsiutil.c -o $(DESTDIR)/usr/sbin/lsiutil
binary-indep: build install
binary-arch: build install
dh_testdir
dh_testroot
dh_installchangelogs debian/changes.txt
dh_installdocs
dh_link
dh_strip
dh_compress -Xusr/share/doc/lsiutil/user_guide.pdf
dh_fixperms
dh_makeshlibs
dh_installdeb
dh_shlibdeps
dh_gencontrol -- -v"$(PKG_VERSION_TAG)" $(SUBSTVARS_BINARY_VERSION) $(SUBSTVARS_SOURCE_VERSION)
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install