Trinity Desktop Environment Packaging
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

497 lines
20KB

  1. #!/usr/bin/make -f
  2. # build variables
  3. export QTDIR=$(shell pwd)
  4. # re-set $(LD_LIBRARY_PATH)
  5. OLD_LD_LIBRARY_PATH := $(LD_LIBRARY_PATH)
  6. export LD_LIBRARY_PATH=$(QTDIR)/lib:$(OLD_LD_LIBRARY_PATH)
  7. # fix path
  8. OLD_PATH := $(PATH)
  9. export PATH=$(QTDIR)/bin:$(OLD_PATH)
  10. DEB_DH_BUILDDEB_ARGS += -- -Z$(shell dpkg-deb --help | grep -q ":.* xz[,.]" \
  11. && echo xz || echo bzip2)
  12. DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
  13. DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
  14. DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
  15. ifeq ($(DEB_HOST_ARCH_OS),hurd)
  16. PLATFORM_ARG = hurd-g++
  17. else #hurd
  18. ifeq ($(DEB_HOST_ARCH),sparc)
  19. PLATFORM_ARG = linux-g++-sparc
  20. else #sparc
  21. PLATFORM_ARG = linux-g++
  22. endif #sparc
  23. endif #hurd
  24. # quilt stuff
  25. #include /usr/share/cdbs/1/rules/patchsys-quilt.mk
  26. # build variables (directorys)
  27. DEBIAN = $(shell pwd)/debian
  28. P_LIBS = $(DEBIAN)/libqt3-mt
  29. P_DOC = $(DEBIAN)/qt3-doc
  30. P_APPSDEV = $(DEBIAN)/qt3-apps-dev
  31. P_HEADERS = $(DEBIAN)/libqt3-headers
  32. P_QTMTDEV = $(DEBIAN)/libqt3-mt-dev
  33. TMP_INSTALL = $(DEBIAN)/tmp-install
  34. CONFIGURE_OPTS = \
  35. -prefix "/usr" \
  36. -sysconfdir "/etc/qt3" \
  37. -datadir "/usr/share/qt3" \
  38. -headerdir "/usr/include/qt3" \
  39. -docdir "/usr/share/qt3/doc" \
  40. -libdir "/usr/lib/$(DEB_HOST_MULTIARCH)" \
  41. -plugindir "/usr/lib/$(DEB_HOST_MULTIARCH)/qt3/plugins" \
  42. -translationdir "/usr/share/qt3/translations" \
  43. \
  44. -thread \
  45. -shared \
  46. -fast \
  47. -no-exceptions \
  48. -platform $(PLATFORM_ARG) \
  49. \
  50. -nis \
  51. -no-pch \
  52. -cups \
  53. -stl \
  54. -ipv6 \
  55. \
  56. -sm \
  57. -xshape \
  58. -xinerama \
  59. -xcursor \
  60. -xrandr \
  61. -xrender \
  62. -xft \
  63. -tablet \
  64. -xkb \
  65. \
  66. -system-zlib \
  67. -system-libpng \
  68. -system-libmng \
  69. -system-libjpeg \
  70. -system-nas-sound \
  71. \
  72. -enable-opengl \
  73. -dlopen-opengl \
  74. \
  75. -qt-gif \
  76. -qt-imgfmt-png \
  77. -qt-imgfmt-jpeg \
  78. -plugin-imgfmt-mng \
  79. \
  80. -plugin-sql-odbc \
  81. -plugin-sql-psql \
  82. -plugin-sql-mysql \
  83. -plugin-sql-ibase \
  84. -plugin-sql-sqlite \
  85. -plugin-sql-sqlite3 \
  86. \
  87. -I/usr/include/mysql \
  88. -I/usr/include/freetype2 \
  89. -I`pg_config --includedir` \
  90. -I`pg_config --includedir-server` \
  91. -L/usr/lib/$(DEB_HOST_MULTIARCH)\
  92. \
  93. -lfontconfig \
  94. -inputmethod \
  95. -glibmainloop \
  96. # End of CONFIGURE_OPTS
  97. interbase_archs := i386 amd64 sparc powerpc
  98. ifneq ($(DEB_HOST_ARCH_CPU),$(findstring $(DEB_HOST_ARCH_CPU),$(interbase_archs)))
  99. CONFIGURE_OPTS += -no-sql-ibase
  100. IBASE = -Nlibqt3-mt-ibase
  101. else
  102. IBASE =
  103. endif
  104. ifeq ($(DEB_HOST_ARCH_OS),hurd)
  105. CONFIGURE_OPTS += -no-sql-ibase
  106. IBASE = -Nlibqt3-mt-ibase
  107. endif
  108. ifeq ($(DEB_HOST_ARCH),arm)
  109. CONFIGURE_OPTS += -DQT_QLOCALE_USES_FCVT
  110. endif
  111. post-patches::
  112. dh_testdir
  113. build build-arch: libqt-thread-stamp
  114. build-indep:
  115. touch build-stamp
  116. libqt-thread-stamp: post-patches
  117. @echo "QTDIR is ${QTDIR}"
  118. dh_testdir
  119. echo yes | ./configure $(CONFIGURE_OPTS)
  120. rm -rf include/qinputcontext.h include/qinputcontextfactory.h include/qinputcontextplugin.h
  121. ln -s ../src/kernel/qinputcontext.h include/qinputcontext.h
  122. ln -s ../src/inputmethod/qinputcontextfactory.h include/qinputcontextfactory.h
  123. ln -s ../src/inputmethod/qinputcontextplugin.h include/qinputcontextplugin.h
  124. # proceed
  125. $(MAKE) sub-src sub-plugins sub-tools
  126. $(MAKE) -C src INSTALL_ROOT=$(TMP_INSTALL) install_target
  127. $(MAKE) INSTALL_ROOT=$(TMP_INSTALL) install
  128. $(MAKE) INSTALL_ROOT=$(TMP_INSTALL) plugins-install
  129. # archives get accidentally stripped by make install. Copy over unstripped ones for now.
  130. -cp lib/lib*.a $(TMP_INSTALL)/usr/lib/
  131. cp bin/qtrename140 $(TMP_INSTALL)/usr/bin/
  132. cp bin/findtr $(TMP_INSTALL)/usr/bin/
  133. # build conv2ui
  134. cd tools/designer/tools/conv2ui && $(MAKE)
  135. cp bin/conv2ui $(TMP_INSTALL)/usr/bin/conv2ui
  136. # build qvfb
  137. cd tools/qvfb/ && $(MAKE)
  138. cp tools/qvfb/qvfb $(TMP_INSTALL)/usr/bin/qvfb
  139. # install qmake.cache file
  140. install -d $(P_QTMTDEV)/usr/share/qt3/
  141. cat .qmake.cache | sed "s#$(QTDIR)#/usr/share/qt3#g" > $(P_QTMTDEV)/usr/share/qt3/.qmake.cache
  142. # install qconfig.h for the mt
  143. install -m 644 -D include/qconfig.h $(P_QTMTDEV)/usr/include/qt3/qconfig.h
  144. install -m 644 -D include/qmodules.h $(P_QTMTDEV)/usr/include/qt3/qmodules.h
  145. install -m 644 -D include/qinputcontext.h $(P_HEADERS)/usr/include/qt3/qinputcontext.h
  146. install -m 644 -D include/qinputcontextfactory.h $(P_HEADERS)/usr/include/qt3/qinputcontextfactory.h
  147. install -m 644 -D include/qinputcontextplugin.h $(P_HEADERS)/usr/include/qt3/qinputcontextplugin.h
  148. touch libqt-thread-stamp
  149. clean::
  150. dh_testdir
  151. -rm -rf debian/patched
  152. -rm -rf build-stamp libqt-thread-stamp
  153. -chmod -R u+w *
  154. -chmod a-x doc/html/layout?.png
  155. if [ -f "src/Makefile" ]; then \
  156. $(MAKE) -C src clean; $(MAKE) -C plugins/src distclean; $(MAKE) -C tools distclean; \
  157. $(MAKE) -C tools/makeqpf distclean; $(MAKE) -C tools/qconfig distclean; $(MAKE) -C tools/qvfb distclean; \
  158. $(MAKE) -C tools/msg2qm distclean; $(MAKE) -C tools/mergetr distclean; $(MAKE) -C tools/qembed distclean; \
  159. $(MAKE) -C tools/designer/tools/conv2ui distclean; $(MAKE) -C tools/designer/tools/createcw distclean; \
  160. $(MAKE) -C tools/designer/plugins/glade distclean; $(MAKE) -C tools/designer/plugins/qglwidget distclean; \
  161. $(MAKE) -C config.tests/unix/largefile distclean; $(MAKE) -C qmake distclean; \
  162. fi
  163. -rm -rf .qmake.cache src/.qmake.internal.cache tools/designer/designer/.qmake.internal.cache qmake/GNUmakefile \
  164. config.status bin/moc bin/qmake src/moc/*.o mkspecs/default lib/lib* `pwd`/debian/doc $(TMP_INSTALL) \
  165. src/tools/qconfig.cpp include/qconfig.h include/qmodules.h plugins/accessibleqtwidgets.prl \
  166. config.tests/unix/ipv6/ipv6test config.tests/unix/ipv6/ipv6test.o config.tests/unix/ptrsize/ptrsizetest.o \
  167. config.tests/unix/ptrsize/ptrsizetest config.tests/unix/endian/endiantest.o \
  168. config.tests/unix/endian/endiantest lib/qt-mt.pc extensions/nsplugin/examples/trivial/libtrivial.prl \
  169. extensions/nsplugin/examples/grapher/libgrapher.prl bin/designer
  170. rm -f qmake/*o
  171. rm -rf include/qinputcontext.h include/qinputcontextfactory.h include/qinputcontextplugin.h
  172. rm -f src/.obj/debug-shared-mt/*o plugins/src/inputmethods/imsw-multi/.obj/debug-shared-mt/*o plugins/inputmethods/*so
  173. rm -f plugins/src/inputmethods/imsw-none/.obj/debug-shared-mt/*o plugins/src/inputmethods/simple/.obj/debug-shared-mt/*o plugins/src/inputmethods/xim/.obj/debug-shared-mt/*o
  174. # delete generated Makefiles but save the toplevel Makefile
  175. -mv Makefile Makefile.save
  176. for a in `find . -name 'Makefile'`; do rm -f "$$a"; done
  177. -mv Makefile.save Makefile
  178. cd examples/ && find . -name '.obj' | xargs rm -rf
  179. # revert multi-arch path in install files
  180. for a in debian/*install debian/*links; do \
  181. [ ! -f $$a.arch ] || \
  182. mv $$a.arch $$a; \
  183. done
  184. dh_clean
  185. install: build
  186. dh_testdir
  187. dh_testroot
  188. dh_clean -i
  189. dh_installdirs
  190. # update multi-arch path in install files
  191. for a in debian/*install debian/*links; do \
  192. [ -d $$a ] || [ -f $$a.arch ] || \
  193. sed -i.arch "s|\$$(DEB_HOST_MULTIARCH)|$(DEB_HOST_MULTIARCH)|g" $$a; \
  194. done
  195. # fix .prl files
  196. for a in $(TMP_INSTALL)/usr/lib/$(DEB_HOST_MULTIARCH)/*prl; do cat "$$a" | sed \
  197. "s#$(QTDIR)#/usr/share/qt3#g" > "$$a".new && mv "$$a".new "$$a"; done
  198. dh_install $(IBASE) --sourcedir=$(TMP_INSTALL)
  199. ## build qt3-doc package
  200. # copy all docs there first
  201. install -d $(P_DOC)/usr/share/qt3/doc/html/
  202. for a in `cd $(TMP_INSTALL)/usr/share/qt3/doc/html/ && find`; do cp $(TMP_INSTALL)/usr/share/qt3/doc/html/"$$a" $(P_DOC)/usr/share/qt3/doc/html/; done
  203. #typo bugfix
  204. sed -i -e 's/reveives/receives/' $(P_DOC)/usr/share/qt3/doc/html/qwidget.html
  205. ## build designer package documentation
  206. # qt3-designer
  207. install -d `pwd`/debian/qt3-designer/usr/share/qt3/doc/html/
  208. for a in `cat doc/html/designer*.html doc/html/designer*.dcf | grep png | sed 's/^.*src=\"\([^\"]+\)\".*$$/\1/' | \
  209. perl -pe 's#<\?p[^>]+>##' | tee outputfile | perl -ne '/<img [^>]*(src=\"[^"]+\")/; print $$1' | \
  210. sed 's/src=//g' | sed 's/"/ /g'`; do cp doc/html/"$$a" `pwd`/debian/qt3-designer/usr/share/qt3/doc/html/ && \
  211. rm -rf $(P_DOC)/usr/share/qt3/doc/html/"$$a" || true; done
  212. rm -rf outputfile `pwd`/debian/qt3-designer/usr/share/qt3/doc/html/logo32.png
  213. rm -rf `pwd`/debian/qt3-doc/usr/share/qt3/doc/html/designer*
  214. ## build linguist package documentation
  215. # qt3-linguist
  216. install -d `pwd`/debian/qt3-linguist/usr/share/qt3/doc/html/
  217. for a in `cat doc/html/linguist*.html doc/html/linguist*.dcf | grep png | sed 's/^.*src=\"\([^\"]+\)\".*$$/\1/' | \
  218. perl -pe 's#<\?p[^>]+>##' | tee outputfile | perl -ne '/<img [^>]*(src=\"[^"]+\")/; print $$1' | \
  219. sed 's/src=//g' | sed 's/"/ /g'`; do cp doc/html/"$$a" `pwd`/debian/qt3-linguist/usr/share/qt3/doc/html/ && \
  220. rm -rf $(P_DOC)/usr/share/qt3/doc/html/"$$a" || true; done
  221. rm -rf outputfile `pwd`/debian/qt3-linguist/usr/share/qt3/doc/html/logo32.png
  222. rm -rf `pwd`/debian/qt3-doc/usr/share/qt3/doc/html/linguist*
  223. ## qt3-assistant
  224. # remove docs from qt3-doc for qt-assistant
  225. rm -rf `pwd`/debian/qt3-doc/usr/share/qt3/doc/html/assistant*
  226. ## all packages
  227. # install the overrides files
  228. #for a in debian/overrides/*; do install -d debian/`echo "$$a" | sed 's/debian\/overrides\///g'`/usr/share/lintian/overrides; done
  229. #for a in debian/overrides/*; do cp "$$a" debian/`echo "$$a" | sed 's/debian\/overrides\///g'`/usr/share/lintian/overrides/`echo "$$a" | sed 's/debian\/overrides\///g'`; done
  230. chmod 644 debian/qt3-dev-tools/usr/share/qt3/mkspecs/aix-g++-64/qplatformdefs.h
  231. chmod 644 debian/qt3-dev-tools/usr/share/qt3/mkspecs/macx-pbuilder/Info.plist.app
  232. binary-indep: build install
  233. # Build architecture-independent files here.
  234. dh_testdir
  235. dh_testroot
  236. dh_installdocs -i -XREADME.Debian
  237. dh_installchangelogs -i changes-3.3.8
  238. dh_installchangelogs -i changes-3.3.8b
  239. find doc/man -path \*/CVS -prune -o -print | cpio -pmd $(P_DOC)/usr/share/qt3/doc/
  240. -rm -f `find $(P_DOC)/usr/share/qt3/doc/ -name "*.o"`
  241. find $(P_DOC) -type f -perm +0100 | xargs --no-run-if-empty rm -f
  242. install -d $(P_DOC)/usr/share/man/man3/
  243. for i in $(P_DOC)/usr/share/qt3/doc/doc/man/man3/* ; do mv $$i $(P_DOC)/usr/share/man/man3/ ; done
  244. -rm -rf $(P_DOC)/usr/share/qt3/doc/doc
  245. # other i18n files
  246. for a in `cd translations/ && find . -name 'qt_*.qm' | sed 's/qt_//' | sed 's/\.qm//' | sed 's/\.\///g'`; do \
  247. install -m644 -D `pwd`/translations/qt_"$$a".qm `pwd`/debian/libqt3-i18n/usr/share/qt3/translations/qt_"$$a".qm; done
  248. # logo32.png
  249. cp `pwd`/doc/html/logo32.png `pwd`/debian/qt3-doc/usr/share/qt3/doc/html/
  250. # remove qmake html docu from qt3-doc
  251. rm -rf `pwd`/debian/qt3-doc/usr/share/qt3/doc/html/qmake*
  252. # create examples package
  253. install -d `pwd`/debian/doc/qt3-examples/tools/designer
  254. install -d `pwd`/debian/doc/qt3-examples/tools/linguist
  255. cp -ax examples `pwd`/debian/doc/qt3-examples
  256. cp -ax tutorial `pwd`/debian/doc/qt3-examples
  257. cp -ax tools/designer/examples `pwd`/debian/doc/qt3-examples/tools/designer/
  258. cp -ax tools/linguist/tutorial `pwd`/debian/doc/qt3-examples/tools/linguist/
  259. for a in `cd $(DEBIAN)/doc/qt3-examples/ && find $(DEBIAN)/doc/qt3-examples/ -name 'tt1'`; do rm -f "$$a"; done
  260. for a in `cd $(DEBIAN)/doc/qt3-examples/ && find $(DEBIAN)/doc/qt3-examples/ -name 'tt2'`; do rm -f "$$a"; done
  261. for a in `cd $(DEBIAN)/doc/qt3-examples/ && find $(DEBIAN)/doc/qt3-examples/ -name 'tt3'`; do rm -f "$$a"; done
  262. for a in `cd $(DEBIAN)/doc/qt3-examples/ && find $(DEBIAN)/doc/qt3-examples/ -name '.moc'`; do rm -rf "$$a"; done
  263. for a in `cd $(DEBIAN)/doc/qt3-examples/ && find $(DEBIAN)/doc/qt3-examples/ -name '.obj'`; do rm -rf "$$a"; done
  264. for a in `cd $(DEBIAN)/doc/qt3-examples/ && find $(DEBIAN)/doc/qt3-examples/ -name 'Makefile'`; do rm -f "$$a"; done
  265. install -D `pwd`/debian/maintain/build-examples.sh `pwd`/debian/doc/qt3-examples/build-examples
  266. chmod 755 `pwd`/debian/doc/qt3-examples/build-examples
  267. cd `pwd`/debian/doc/ && tar cvvfz qt3-examples.tar.gz qt3-examples/
  268. install -D `pwd`/debian/doc/qt3-examples.tar.gz `pwd`/debian/qt3-examples/usr/share/doc/qt3-examples/qt3-examples.tar.gz
  269. # proceed
  270. dh_compress -i -Xhtml/
  271. dh_link -i
  272. dh_fixperms -i
  273. dh_installdeb -i
  274. dh_perl -i
  275. dh_shlibdeps -i
  276. # fix shlibdeps madness
  277. for a in `find debian/ -name '*.substvars'`; do cat "$$a" | sed 's/, xlibs (>> 4.1.0)//g' > "$$a".new && mv "$$a.new" "$$a"; done
  278. dh_gencontrol -i
  279. dh_md5sums -i
  280. dh_builddeb -i $(DEB_DH_BUILDDEB_ARGS)
  281. binary-arch: build install
  282. dh_testdir
  283. dh_testroot
  284. dh_installdirs -a
  285. ## create qt3-apps-dev-package
  286. install -d $(P_APPSDEV)/usr/include/qt3/
  287. cp `pwd`/tools/designer/interfaces/*.h $(P_APPSDEV)/usr/include/qt3/
  288. cp `pwd`/tools/designer/editor/*.h $(P_APPSDEV)/usr/include/qt3/
  289. rm -rf `pwd`/debian/qt3-apps-dev/usr/include/qt3/preferences.ui.h
  290. ## qvfb package
  291. install -m644 -D `pwd`/tools/qvfb/pda.skin `pwd`/debian/qt3-dev-tools-embedded/etc/qt3/qvfb/pda.skin
  292. install -m644 -D `pwd`/tools/qvfb/pda_down.png `pwd`/debian/qt3-dev-tools-embedded/usr/share/qvfb/pda_down.png
  293. install -m644 -D `pwd`/tools/qvfb/pda_up.png `pwd`/debian/qt3-dev-tools-embedded/usr/share/qvfb/pda_up.png
  294. # remove utterly ugle symlink
  295. rm -rf `pwd`/debian/qt3-dev-tools//usr/share/qt3/mkspecs/linux-g++/linux-g++
  296. # language file for linguist
  297. install -d `pwd`/debian/qt3-linguist/usr/share/doc/qt3-linguist/
  298. cp translations/template.ts `pwd`/debian/qt3-linguist/usr/share/doc/qt3-linguist/qt_untranslated.ts
  299. # fix that stupid friggin professional file
  300. perl -pi -e 's{\$$\$$QT_SOURCE_TREE}{$(QTDIR)}' src/qt_professional.pri
  301. ## i18n files for designer, linguist and assistant
  302. (cd `pwd`/tools/designer/designer/ && lrelease designer.pro)
  303. for a in `cd tools/designer/designer/ && find . -name 'designer_*.qm' | sed 's/designer_//' | sed 's/\.qm//' | sed 's/\.\///g'`; do \
  304. install -m644 -D tools/designer/designer/designer_"$$a".qm `pwd`/debian/qt3-designer/usr/share/qt3/translations/designer_"$$a".qm; done
  305. rm -rf `pwd`/tools/designer/designer/*.qm
  306. (cd `pwd`/tools/assistant/ && lrelease assistant.pro)
  307. for a in `cd tools/assistant/ && find . -name 'assistant_*.qm' | sed 's/assistant_//' | sed 's/\.qm//' | sed 's/\.\///g'`; do \
  308. install -m644 -D tools/assistant/assistant_"$$a".qm `pwd`/debian/qt3-assistant/usr/share/qt3/translations/assistant_"$$a".qm; done
  309. rm -rf `pwd`/tools/assistant/*.qm `pwd`/debian/libqt3-i18n/usr/share/qt3/translations/assistant_de.qm
  310. (cd `pwd`/tools/linguist/linguist/ && lrelease linguist.pro)
  311. for a in `cd tools/linguist/linguist/ && find . -name 'linguist_*.qm' | sed 's/linguist_//' | sed 's/\.qm//' | sed 's/\.\///g'`; do \
  312. install -m644 -D tools/linguist/linguist/linguist_"$$a".qm `pwd`/debian/qt3-linguist/usr/share/qt3/translations/linguist_"$$a".qm; done
  313. rm -rf `pwd`/tools/linguist/linguist/*.qm
  314. # desktop lnk files
  315. install -m644 -D debian/maintain/designer-qt3.desktop `pwd`/debian/qt3-designer/usr/share/applications/designer-qt3.desktop
  316. install -m644 -D debian/maintain/linguist-qt3.desktop `pwd`/debian/qt3-linguist/usr/share/applications/linguist-qt3.desktop
  317. install -m644 -D debian/maintain/assistant-qt3.desktop `pwd`/debian/qt3-assistant/usr/share/applications/assistant-qt3.desktop
  318. install -m644 -D debian/maintain/qt3config.desktop `pwd`/debian/qt3-qtconfig/usr/share/applications/qt3config.desktop
  319. # include logo32 for every program
  320. cd `pwd`/debian/qt3-designer/usr/share/qt3/doc/html && for a in `find . -name '*.html'`; \
  321. do cat "$$a" | sed 's/logo32/logo32-designer/g' > "$$a".new && mv "$$a".new "$$a"; done
  322. cd `pwd`/debian/qt3-linguist/usr/share/qt3/doc/html && for a in `find . -name '*.html'`; \
  323. do cat "$$a" | sed 's/logo32/logo32-linguist/g' > "$$a".new && mv "$$a".new "$$a"; done
  324. cd `pwd`/debian/qt3-assistant/usr/share/qt3/doc/html && for a in `find . -name '*.html'`; \
  325. do cat "$$a" | sed 's/logo32/logo32-assistant/g' > "$$a".new && mv "$$a".new "$$a"; done
  326. cd `pwd`/debian/qt3-dev-tools/usr/share/qt3/doc/html && for a in `find . -name '*.html'`; \
  327. do cat "$$a" | sed 's/logo32/logo32-qmake/g' > "$$a".new && mv "$$a".new "$$a"; done
  328. for a in designer linguist assistant; do install -m644 -D `pwd`/doc/html/logo32.png `pwd`/debian/qt3-"$$a"/usr/share/qt3/doc/html/logo32-"$$a".png; done
  329. install -m644 -D `pwd`/doc/html/logo32.png `pwd`/debian/qt3-dev-tools/usr/share/qt3/doc/html/logo32-qmake.png
  330. # fix qmake.conf files
  331. cd `pwd`/debian/qt3-dev-tools/usr/share/qt3/mkspecs/ && for a in *; do cd "$$a" && cat qmake.conf | sed 's/\$$(QTDIR)\/include/\/usr\/share\/qt3\/include/g' | sed 's/\$$(QTDIR)/\/usr\/share\/qt3/g' | \
  332. sed 's/\-I\/usr\/include/&\/qt3/g' >> qmake.conf.new && mv qmake.conf.new qmake.conf && cd ../; done
  333. # build attic package and copy it to libqt3-ompat-headers
  334. cd `pwd`/src/ && tar cvvfz attic.tar.gz attic/
  335. install -D `pwd`/src/attic.tar.gz `pwd`/debian/libqt3-compat-headers/usr/share/doc/libqt3-compat-headers/attic.tar.gz
  336. rm -rf `pwd`/src/attic.tar.gz
  337. # rename some binaries to make qt3/4 installations possible
  338. mv `pwd`/debian/qt3-designer/usr/bin/designer `pwd`/debian/qt3-designer/usr/bin/designer-qt3
  339. mv `pwd`/debian/qt3-dev-tools/usr/bin/uic `pwd`/debian/qt3-dev-tools/usr/bin/uic-qt3
  340. mv `pwd`/debian/qt3-dev-tools/usr/bin/moc `pwd`/debian/qt3-dev-tools/usr/bin/moc-qt3
  341. mv `pwd`/debian/qt3-dev-tools/usr/bin/lupdate `pwd`/debian/qt3-dev-tools/usr/bin/lupdate-qt3
  342. mv `pwd`/debian/qt3-dev-tools/usr/bin/lrelease `pwd`/debian/qt3-dev-tools/usr/bin/lrelease-qt3
  343. mv `pwd`/debian/qt3-dev-tools/usr/bin/qmake `pwd`/debian/qt3-dev-tools/usr/bin/qmake-qt3
  344. mv `pwd`/debian/qt3-qtconfig/usr/bin/qtconfig `pwd`/debian/qt3-qtconfig/usr/bin/qtconfig-qt3
  345. mv `pwd`/debian/qt3-assistant/usr/bin/assistant `pwd`/debian/qt3-assistant/usr/bin/assistant-qt3
  346. mv `pwd`/debian/qt3-linguist/usr/bin/linguist `pwd`/debian/qt3-linguist/usr/bin/linguist-qt3
  347. install -D doc/man/man1/moc.1 `pwd`/debian/qt3-dev-tools/usr/share/man/man1/moc-qt3.1
  348. install -D doc/man/man1/uic.1 `pwd`/debian/qt3-dev-tools/usr/share/man/man1/uic-qt3.1
  349. install -D doc/man/man1/lrelease.1 `pwd`/debian/qt3-dev-tools/usr/share/man/man1/lrelease-qt3.1
  350. install -D doc/man/man1/lupdate.1 `pwd`/debian/qt3-dev-tools/usr/share/man/man1/lupdate-qt3.1
  351. dh_link -pqt3-designer usr/share/qt3/doc/html usr/share/doc/qt3-designer/html
  352. dh_link -pqt3-assistant usr/share/qt3/doc/html usr/share/doc/qt3-assistant/html
  353. dh_link -pqt3-linguist usr/share/qt3/doc/html usr/share/doc/qt3-linguist/html
  354. dh_link -pqt3-dev-tools usr/share/qt3/doc/html usr/share/doc/qt3-dev-tools/html
  355. # copy README.Debian
  356. for a in libqt3-mt-dev libqt3-mt qt3-doc; do install -D `pwd`/debian/README.Debian `pwd`/debian/"$$a"/usr/share/doc/"$$a"/README.Debian; done
  357. # install the qmake binary
  358. rm -rf `pwd`/debian/qt3-dev-tools/usr/bin/qmake
  359. install -D `pwd`/qmake/qmake `pwd`/debian/qt3-dev-tools/usr/bin/qmake-qt3
  360. # Install source for the designer tools, such as createcw.
  361. cp -ra tools/designer/tools debian/qt3-designer/usr/share/qt3/tools
  362. rm -f debian/qt3-designer/usr/share/qt3/tools/createcw/createcw
  363. rm -rf debian/qt3-designer/usr/share/qt3/tools/createcw/.moc
  364. rm -rf debian/qt3-designer/usr/share/qt3/tools/createcw/.obj
  365. rm -f debian/qt3-designer/usr/share/qt3/tools/createcw/Makefile
  366. rm -f debian/qt3-designer/usr/share/qt3/tools/conv2ui/conv2ui
  367. rm -rf debian/qt3-designer/usr/share/qt3/tools/conv2ui/.moc
  368. rm -rf debian/qt3-designer/usr/share/qt3/tools/conv2ui/.obj
  369. rm -f debian/qt3-designer/usr/share/qt3/tools/conv2ui/Makefile
  370. # run remaining debhelper scripts
  371. dh_installdocs -a $(IBASE) -XREADME.Debian
  372. dh_installmenu -a $(IBASE)
  373. dh_installchangelogs -a $(IBASE) changes-3.3.8
  374. dh_installchangelogs -a $(IBASE) changes-3.3.8b
  375. dh_link -a $(IBASE)
  376. dh_strip -a $(IBASE) --dbg-package=qt-x11-free-dbg
  377. dh_compress -a $(IBASE)
  378. dh_fixperms -a $(IBASE)
  379. # run remaining debhelper scripts
  380. dh_makeshlibs -a $(IBASE) -V
  381. dh_installdeb -a $(IBASE)
  382. dh_perl -a $(IBASE)
  383. dh_shlibdeps -a $(IBASE) -l`pwd`/debian/libqt3-mt/usr/lib
  384. # fix shlibdeps madness
  385. for a in `find debian/ -name '*.substvars'`; do cat "$$a" | sed 's/, xlibs (>> 4.1.0)//g' > "$$a".new && mv "$$a.new" "$$a"; done
  386. # fix conffiles file for qt3-dev-tools-embedded
  387. echo "/etc/qt3/qvfb/pda.skin" > `pwd`/debian/qt3-dev-tools-embedded/DEBIAN/conffiles
  388. dh_gencontrol -a $(IBASE)
  389. dh_md5sums -a $(IBASE)
  390. dh_builddeb -a $(IBASE) $(DEB_DH_BUILDDEB_ARGS)
  391. binary: binary-indep binary-arch
  392. .PHONY: build build-arch binary-indep binary-arch binary install clean