#!/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 package32 = mingw-8-w32-pba-hellolib-portable devpackage32 = mingw-8-w32-pba-hellolib-portable-dev builddir32 = build/win32/release arch32=i686-w64-mingw32 package64 = mingw-8-w64-pba-hellolib-portable devpackage64 = mingw-8-w64-pba-hellolib-portable-dev builddir64 = build/win64/release arch64=x86_64-w64-mingw32 PKGROOT=$(shell pwd)/debian # see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=930492 w32pcdir = /usr/i686-w64-mingw32/lib/pkgconfig w64pcdir = /usr/x86_64-w64-mingw32/lib/pkgconfig %: 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 = INSTALL_PROGRAM = install DEB_INSTALL_DOCS_ALL := doc/LICENSE.txt doc/ReadMe.txt build-indep:: cd $(builddir32) && PKG_CONFIG_LIBDIR=$(w32pcdir) $(MAKE) arch=$(arch32) cd $(builddir64) && PKG_CONFIG_LIBDIR=$(w64pcdir) $(MAKE) arch=$(arch64) touch build-indep clean:: rm -f install-indep build-indep cd $(builddir32) && PKG_CONFIG_LIBDIR=$(w32pcdir) $(MAKE) arch=$(arch32) clean cd $(builddir64) && PKG_CONFIG_LIBDIR=$(w64pcdir) $(MAKE) arch=$(arch64) clean rm -f build-indep rm -f install-indep install-indep:: rm -rf debian/$(package64) debian/$(devpackage64) cd $(builddir64) && PKG_CONFIG_LIBDIR=$(w64pcdir) $(MAKE) install-bin arch=$(arch64) DESTDIR=$(PKGROOT)/$(package64) cd $(builddir64) && PKG_CONFIG_LIBDIR=$(w64pcdir) $(MAKE) install-dev arch=$(arch64) DESTDIR=$(PKGROOT)/$(devpackage64) rm -rf debian/$(package32) debian/$(devpackage32) cd $(builddir32) && PKG_CONFIG_LIBDIR=$(w32pcdir) $(MAKE) install-bin arch=$(arch32) DESTDIR=$(PKGROOT)/$(package32) cd $(builddir32) && PKG_CONFIG_LIBDIR=$(w32pcdir) $(MAKE) install-dev arch=$(arch32) DESTDIR=$(PKGROOT)/$(devpackage32) touch install-indep