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.

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