#!/usr/bin/make -f # # $Id$ # # rules file for creating debian packages # DEB_UPSTREAM_VERSION ?= $(shell dpkg-parsechangelog | sed -rne 's/^Version: ([0-9.]+)[-+].*$$/\1/p') DEB_DH_ALWAYS_EXCLUDE := .svn:debian-arch:debian-mingw builddir64 = build/win64/release arch64=x86_64-w64-mingw32 commonpackage64 = mingw-9-w64-fancylogd-common commondevpackage64 = mingw-9-w64-fancylogd-common-dev clientpackage64 = mingw-9-w64-fancylogd-client clientdevpackage64 = mingw-9-w64-fancylogd-client-dev daemonpackage64 = mingw-9-w64-fancylogd # see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=930492 w64pcdir = /usr/x86_64-w64-mingw32/lib/pkgconfig PKGROOT=$(shell pwd)/debian %: dh $@ # do not strip anything. # call 'strip' on a mingw lib*.a file causes the ranlib information to # be discarded rendering the libraries useless. override_dh_strip: override_dh_shlibdeps: export DEB_CFLAGS_MAINT_SET = -O2 -Wall export DEB_CXXFLAGS_MAINT_SET = -O2 -Wall export DEB_LDFLAGS_MAINT_SET = #build-indep: common-build-indep #install-indep: common-install-indep INSTALL_PROGRAM = install DEB_INSTALL_DOCS_ALL := doc/LICENSE.txt doc/ReadMe.txt build-indep:: cd $(builddir64) && PKG_CONFIG_LIBDIR=$(w64pcdir) $(MAKE) arch=$(arch64) touch build-indep clean:: rm -f install-indep build-indep cd $(builddir64) && PKG_CONFIG_LIBDIR=$(w64pcdir) $(MAKE) arch=$(arch64) clean rm -f build-indep rm -f install-indep install-indep:: rm -rf debian/$(commonpackage64) rm -rf debian/$(commondevpackage64) rm -rf debian/$(clientpackage64) rm -rf debian/$(clientdevpackage64) rm -rf debian/$(daemonpackage64) cd $(builddir64)/modules/fancylogd-common && PKG_CONFIG_LIBDIR=$(w64pcdir) $(MAKE) install-bin arch=$(arch64) DESTDIR=$(PKGROOT)/$(commonpackage64) cd $(builddir64)/modules/fancylogd-common && PKG_CONFIG_LIBDIR=$(w64pcdir) $(MAKE) install-dev arch=$(arch64) DESTDIR=$(PKGROOT)/$(commondevpackage64) cd $(builddir64)/modules/fancylogd-client && PKG_CONFIG_LIBDIR=$(w64pcdir) $(MAKE) install-bin arch=$(arch64) DESTDIR=$(PKGROOT)/$(clientpackage64) cd $(builddir64)/modules/fancylogd-client && PKG_CONFIG_LIBDIR=$(w64pcdir) $(MAKE) install-dev arch=$(arch64) DESTDIR=$(PKGROOT)/$(clientdevpackage64) cd $(builddir64)/programs/fancylogd && PKG_CONFIG_LIBDIR=$(w64pcdir) $(MAKE) install-bin arch=$(arch64) DESTDIR=$(PKGROOT)/$(daemonpackage64) touch install-indep