#!/usr/bin/make -f # # $Id$ # # rules file for creating debian packages # include /usr/share/cdbs/1/rules/debhelper.mk DEB_DH_ALWAYS_EXCLUDE = .svn:debian/tmp srcname = fancymodbus libpackage = libfancymodbus1 devpackage = libfancymodbus1-dev toolpackage = fancymodbus-tool simulatorpackage = fancymodbus-simulator builddir = $(shell /bin/pwd)/build/unix/release PKGROOT=$(shell pwd)/debian INSTALL_PROGRAM = install DEB_INSTALL_DOCS_ALL := doc/LICENSE.txt doc/ReadMe.txt common-build-arch:: cd $(builddir) && $(MAKE) touch common-build-arch clean:: cd $(builddir) && $(MAKE) clean rm -rf debian/*.subvars debian/*.log rm -rf debian/$(libpackage) debian/$(devpackage) debian/$(toolpackage) debian/$(simulatorpackage) rm -f common-build-arch rm -f common-install-arch common-install-arch:: rm -rf $(PKGROOT)/$(libpackage) mkdir -p $(PKGROOT)/$(libpackage) rm -rf $(PKGROOT)/$(devpackage) mkdir -p $(PKGROOT)/$(devpackage) rm -rf $(PKGROOT)/$(toolpackage) mkdir -p $(PKGROOT)/$(toolpackage) rm -rf $(PKGROOT)/$(simulatorpackage) mkdir -p $(PKGROOT)/$(simulatorpackage) cd $(builddir)/modules/libfancymodbus && $(MAKE) install-bin DESTDIR=$(PKGROOT)/$(libpackage) cd $(builddir)/modules/libfancymodbus && $(MAKE) install-dev DESTDIR=$(PKGROOT)/$(devpackage) cd $(builddir)/programs/fancymodbus-tool && $(MAKE) install-bin DESTDIR=$(PKGROOT)/$(toolpackage) cd $(builddir)/programs/fancymodbus-simulator && $(MAKE) install-bin DESTDIR=$(PKGROOT)/$(simulatorpackage) touch common-install-arch