#!/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-commercial-3.3.4 qmkspecdir=/usr/share/qt3/mkspecs package = mingw-5-w32-qt3 mkspecname = win32-mingw-w32-cross target=i686-w64-mingw32 docdir = debian/$(package)/usr/share/doc/$(package) BASEDIR = $(shell /bin/pwd) DESTDIR = $(BASEDIR)/debian/$(package) docpackage = mingw-5-w32-qt3-doc examplespackage = mingw-5-w32-qt3-examples demospackage = mingw-5-w32-qt3-demos DEB_INSTALL_DOCS_ALL := $(srcdir)/LICENSE $(srcdir)/README 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/$(mkspecname) rm -rf debian/tmp mkdir -p debian/tmp cd $(srcdir)/mkspecs && ln -s /usr/share/qt3/mkspecs/$(mkspecname) . sed -e s,@builddir@,$(BASEDIR)/$(srcdir),g -e s,@sourcedir@,$(BASEDIR)/$(srcdir),g -e s,@targetdir@,$(BASEDIR)/debian/tmp,g < $(srcdir)/qmake.cache.in > $(srcdir)/.qmake.cache cd $(srcdir)/src && qmake-qt3 QMAKE_INCDIR=$(BASEDIR)/$(srcdir)/include QMAKE_LIBDIR_QT=$(BASEDIR)/debian/tmp/lib -win32 qt.pro cd $(srcdir)/src && qmake-qt3 QMAKE_INCDIR=$(BASEDIR)/$(srcdir)/include QMAKE_LIBDIR_QT=$(BASEDIR)/debian/tmp/lib -win32 -o Makefile.qtmain qtmain.pro cd $(srcdir)/plugins/src && qmake-qt3 QMAKE_INCDIR=$(BASEDIR)/$(srcdir)/include QMAKE_LIBDIR_QT=$(BASEDIR)/debian/tmp/lib -win32 src.pro cd $(srcdir)/tools && qmake-qt3 QMAKE_INCDIR=$(BASEDIR)/$(srcdir)/include QMAKE_LIBDIR_QT=$(BASEDIR)/debian/tmp/lib -win32 tools.pro find $(srcdir)/src -name 'Makefile*' -exec $(BASEDIR)/fix_mk.sh {} \; find $(srcdir)/plugins/src -name 'Makefile*' -exec $(BASEDIR)/fix_mk.sh {} \; find $(srcdir)/tools -name 'Makefile*' -exec $(BASEDIR)/fix_mk.sh {} \; cd $(srcdir)/src && make cd debian/tmp/lib && ln -s libqt-mt.a libqt-mt334.a cd $(srcdir)/src && make -f Makefile.qtmain cd debian/tmp/lib && mv libqtmain.a libqtmain3.a cd debian/tmp/lib && ln -s libqtmain3.a libqtmain.a cd $(srcdir)/plugins/src && make cd $(srcdir)/tools && make touch common-build-arch clean:: rm -f compile common-build-arch common-install-arch rm -rf *~ debian/$(package) debian/tmp debian/*~ debian/files* debian/substvars debian/compat rm -rf debian/$(docpackage) debian/$(examplespackage) debian/$(demospackage) cd $(srcdir)/src && make distclean || /bin/true cd $(srcdir)/src && make -f Makefile.qtmain distclean || /bin/true cd $(srcdir)/plugins/src && make distclean || /bin/true cd $(srcdir)/tools && make distclean || /bin/true rm -f $(srcdir)/src/Makefile $(srcdir)/src/Makefile.qtmain rm -f $(srcdir)/plugins/src/Makefile rm -f $(srcdir)/.qmake.cache rm -f $(srcdir)/mkspecs/$(mkspecname) # # All the stuff below is FIXME. # Qt3 does not own a consistent 'make install' feature, so install the stuff # manually. # # libqtmain.a is also a libraray of qt4, so rename this library to libqtmain3.a # common-install-arch:: rm -rf debian/$(package) debian/$(docpackage) debian/$(examplespackage) debian/$(demospackage) mkdir -p debian/$(package)/usr/$(target) cd debian/tmp && cp -pr bin lib $(DESTDIR)/usr/$(target) rm -f debian/$(package)/usr/$(target)/lib/*.dll rm -f debian/$(package)/usr/$(target)/lib/libqtmain.a mkdir -p debian/$(package)/usr/$(target)/include/qt3/private cp -p $(srcdir)/include/q*.h debian/$(package)/usr/$(target)/include/qt3 cp -p $(srcdir)/include/private/q*.h debian/$(package)/usr/$(target)/include/qt3/private mkdir -p debian/$(package)/usr/$(target)/lib/qt3/plugins (cd $(srcdir)/plugins && tar cf - `find . -name *.dll`) | (cd debian/$(package)/usr/$(target)/lib/qt3/plugins && tar xf - ) mkdir -p debian/$(package)/usr/$(target)/share/qt3 cp -pr $(srcdir)/translations debian/$(package)/usr/$(target)/share/qt3/ # mkdir -p debian/$(docpackage)/usr/$(target)/share/qt3 # mv debian/$(package)/usr/$(target)/share/qt3/doc debian/$(docpackage)/usr/$(target)/share/qt3 # mkdir -p debian/$(examplespackage)/usr/$(target)/lib/qt3 # mv debian/$(package)/usr/$(target)/lib/qt3/examples debian/$(examplespackage)/usr/$(target)/lib/qt3 # mkdir -p debian/$(demospackage)/usr/$(target)/lib/qt3 # mv debian/$(package)/usr/$(target)/lib/qt3/demos debian/$(demospackage)/usr/$(target)/lib/qt3 # TODO exe in lib/qt3/bin, ln in bin/ rm -rf debain/$(package)-tools mkdir -p debian/$(package)-tools/usr/$(target)/lib/qt3/bin cp -p $(srcdir)/bin/assistant.exe debian/$(package)-tools/usr/$(target)/lib/qt3/bin/ cp -p $(srcdir)/bin/designer.exe debian/$(package)-tools/usr/$(target)/lib/qt3/bin/ cp -p $(srcdir)/bin/linguist.exe debian/$(package)-tools/usr/$(target)/lib/qt3/bin/ cp -p $(srcdir)/bin/lrelease.exe debian/$(package)-tools/usr/$(target)/lib/qt3/bin/ cp -p $(srcdir)/bin/lupdate.exe debian/$(package)-tools/usr/$(target)/lib/qt3/bin/ mkdir -p debian/$(package)-tools/usr/$(target)/bin ( cd debian/$(package)-tools/usr/$(target)/bin && rm -f *-qt3.exe ) ( cd debian/$(package)-tools/usr/$(target)/bin && ln -s ../lib/qt3/bin/assistant.exe assistant-qt3.exe ) ( cd debian/$(package)-tools/usr/$(target)/bin && ln -s ../lib/qt3/bin/designer.exe designer-qt3.exe ) ( cd debian/$(package)-tools/usr/$(target)/bin && ln -s ../lib/qt3/bin/linguist.exe linguist-qt3.exe ) ( cd debian/$(package)-tools/usr/$(target)/bin && ln -s ../lib/qt3/bin/lrelease.exe lrelease-qt3.exe ) ( cd debian/$(package)-tools/usr/$(target)/bin && ln -s ../lib/qt3/bin/lupdate.exe lupdate-qt3.exe ) ( cd debian/$(package)-tools/usr/$(target)/lib/qt3/bin && ln -s ../../../bin/qt-mt334.dll . ) ( cd debian/$(package)-tools/usr/$(target)/lib/qt3/bin && ln -s ../../../bin/libgcc_s_sjlj-1.dll . ) ( cd debian/$(package)-tools/usr/$(target)/lib/qt3/bin && ln -s ../../../bin/libpng12-0.dll . ) # ( cd debian/$(package)-tools/usr/$(target)/lib/qt3/bin && ln -s ../../../bin/libeay32.dll . ) # ( cd debian/$(package)-tools/usr/$(target)/lib/qt3/bin && ln -s ../../../bin/libssl32.dll . ) # ( cd debian/$(package)-tools/usr/$(target)/lib/qt3/bin && ln -s ../../../bin/zlib1.dll . ) mkdir -p debian/$(package)-tools/usr/$(target)/share/qt3/translations cp $(srcdir)/tools/assistant/*.ts debian/$(package)-tools/usr/$(target)/share/qt3/translations/ cp $(srcdir)/tools/designer/designer/*.ts debian/$(package)-tools/usr/$(target)/share/qt3/translations/ cp $(srcdir)/tools/linguist/linguist/*.ts debian/$(package)-tools/usr/$(target)/share/qt3/translations/ cp translations/linguist_*.ts debian/$(package)-tools/usr/$(target)/share/qt3/translations/ find debian/$(package)-tools/usr/$(target)/share/qt3/translations -name '*.ts' -exec lrelease-qt3 {} \; cp -pr $(srcdir)/tools/linguist/phrasebooks debian/$(package)-tools/usr/$(target)/share/qt3/ touch common-install-arch