#!/usr/bin/make -f include /usr/share/cdbs/1/rules/debhelper.mk # # srcdir contains the unpacked qt sources, which are configured by # # the configure.sh script in the toplevel directory. # srcdir=qt-win-opensource-src-4.5.2 qmkspecdir=/usr/share/qt4/mkspecs package = mingw-w32-qt4 mkspecname = mingw-w32-cross target=i686-pc-mingw32 docdir = debian/$(package)/usr/share/doc/$(package) BASEDIR = $(shell /bin/pwd) DESTDIR = $(BASEDIR)/debian/$(package) docpackage = mingw-w32-qt4-doc examplespackage = mingw-w32-qt4-examples demospackage = mingw-w32-qt4-demos DEB_INSTALL_DOCS_ALL := $(srcdir)/LICENSE.LGPL $(srcdir)/README $(srcdir)/LGPL_EXCEPTION.txt $(srcdir)/LICENSE.GPL3 DEB_SHLIBDEPS_INCLUDE := DEB_DH_ALWAYS_EXCLUDE := .svn # do not strip anything. # call 'strip' on a mingw lib*.a file causes the ranlib information to # be discarded rendering the libraries useless. DEB_DH_STRIP_ARGS := -Xlib INSTALL_PROGRAM = install common-build-arch:: rm -f $(srcdir)/mkspecs/mingw-w32-cross cd $(srcdir)/mkspecs && ln -s /usr/share/qt4/mkspecs/mingw-w32-cross . sed -e s,@builddir@,$(BASEDIR)/$(srcdir),g -e s,@sourcedir@,$(BASEDIR)/$(srcdir),g < $(srcdir)/qmake.cache.in > $(srcdir)/.qmake.cache cd $(srcdir) && qmake-qt4 -win32 -recursive *.pro cd $(srcdir) && make touch common-build-arch clean:: rm -f compile common-build-arch common-install-arch rm -rf *~ debian/$(package) debian/*~ debian/files* debian/substvars debian/compat rm -rf debian/$(docpackage) debian/$(examplespackage) debian/$(demospackage) cd $(srcdir) && make distclean || /bin/true rm -f $(srcdir)/.qmake.cache rm -f $(srcdir)/mkspecs/mingw-w32-cross common-install-arch:: rm -rf debian/$(package) debian/$(docpackage) debian/$(examplespackage) debian/$(demospackage) cd $(srcdir) && make INSTALL_ROOT=$(DESTDIR) install mkdir -p debian/$(package)/usr/$(target) cd debian/$(package)/usr && mv bin include lib share $(target) cd debian/$(package)/usr/$(target)/lib && for file in *.dll; do cmp -s $$file ../bin/$$file && rm $$file && ln -s ../bin/$$file $$file; done mkdir -p debian/$(docpackage)/usr/$(target)/share/qt4 mv debian/$(package)/usr/$(target)/share/qt4/doc debian/$(docpackage)/usr/$(target)/share/qt4 mkdir -p debian/$(examplespackage)/usr/$(target)/lib/qt4 mv debian/$(package)/usr/$(target)/lib/qt4/examples debian/$(examplespackage)/usr/$(target)/lib/qt4 mkdir -p debian/$(demospackage)/usr/$(target)/lib/qt4 mv debian/$(package)/usr/$(target)/lib/qt4/demos debian/$(demospackage)/usr/$(target)/lib/qt4 touch common-install-arch