1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167
|
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# This is the debhelper compatability version to use.
export DH_COMPAT=3
export QTDIR=$(shell pwd)
old_libpath := $(LD_LIBRARY_PATH)
export LD_LIBRARY_PATH = $(QTDIR)/lib:$(old_libpath)
export YACC="byacc -d"
p = $(shell pwd)/debian
p_doc = $(p)/qt-doc
p_doc_designer = $(p)/qt-designer-doc
tmp = $(shell pwd)/debian/build-tmp
install_tmp = $(shell pwd)/debian/install-tmp
configopts = -xft -gif -system-jpeg -system-libmng -system-libpng -system-zlib
build: build-stamp
build-stamp:
dh_testdir
### Building Shared Non-GL Version ###
-cp debian/configs/x86-shared configs/linux-x86-g++-shared
-cp debian/configs/shared configs/linux-g++-shared
-cp debian/configs/alpha-shared configs/linux-alpha-g++-shared
./configure -shared $(configopts) -no-opengl -thread
-make sub-tools
-make -C tools/designer/tools/createcw
install -d $(tmp)/usr
find lib bin | cpio -pmdv $(tmp)/usr
./configure -shared $(configopts) -opengl -thread -static
-make sub-src
find lib -name "*.a" | cpio -pmdv $(tmp)/usr
dh_testdir
### Building Shared GL Version ###
-rm `find ./ -name "moc_*"`
-$(MAKE) clean
-rm lib/* bin/moc include/* bin/uic bin/designer \
bin/mergetr bin/msg2qm bin/makeqpf bin/qembed bin/qconfig bin/qvfb
-cp debian/configs/gl-x86-shared configs/linux-x86-g++-shared
-cp debian/configs/gl-shared configs/linux-g++-shared
-cp debian/configs/gl-alpha-shared configs/linux-alpha-g++-shared
./configure -shared $(configopts) -opengl
make sub-src
find lib -name "libqt-gl.*" | cpio -pmdv $(tmp)/usr
touch build-stamp
build-clean:
dh_testdir
-rm `find ./ -name "moc_*"`
-$(MAKE) clean
-chmod -R u+w *
-find tools tutorial extensions -name Makefile | while read p; do \
$(MAKE) -C `dirname $$p` clean; \
done
-find tools examples tutorial -type f -perm +100 \
| xargs --no-run-if-empty rm -f
-rm -f `find ./ -name "*.moc"`
-rm -f lib/* include/* src/moc/moc bin/moc bin/uic bin/designer \
bin/mergetr bin/msg2qm bin/makeqpf bin/qembed bin/qconfig bin/qvfb \
bin/createcw
-rm -f examples/guithreads/main.o examples/semaphores/main.o
clean: build-clean
dh_testdir
-rm -f build-stamp
-rm -rf debian/build-tmp
-rm -rf debian/install-tmp
dh_clean
install:
dh_testdir
-rm -rf $(install_tmp)
cd $(tmp) && find usr -path \*/CVS -prune -o -print \
| cpio -pmd $(install_tmp)/
# Build architecture-independent files here.
binary-indep:
dh_testdir
dh_testroot
dh_clean -i
dh_installdirs -i
find doc examples tutorial -path \*/CVS -prune -o -print \
| cpio -pmd $(p_doc)/usr/share/doc/qt-doc/
-$(MAKE) -C $(p_doc)/usr/share/doc/qt-doc/examples clean
-$(MAKE) -C $(p_doc)/usr/share/doc/qt-doc/tutorial clean
(cd $(p_doc)/usr/share/doc/qt-doc && tar -czvf examples.tgz examples)
rm -rf $(p_doc)/usr/share/doc/qt-doc/examples
(cd $(p_doc)/usr/share/doc/qt-doc && tar -czvf tutorial.tgz tutorial)
rm -rf $(p_doc)/usr/share/doc/qt-doc/tutorial
-rm -f `find $(p_doc)/usr/share/doc/qt-doc/ -name "*.o"`
find $(p_doc) -type f -perm +0100 | xargs --no-run-if-empty rm -f
cd $(p_doc)/usr/share/doc/libqt2 \
&& ln -s ../qt-doc/doc .
cd $(p_doc)/usr/share/doc/libqt2-mt \
&& ln -s ../qt-doc/doc .
mv $(p_doc)/usr/share/doc/qt-doc/doc/html/designer* \
$(p_doc_designer)/usr/share/doc/qt-doc/doc/html/
dh_installdocs -i
mv $(p_doc)/usr/share/doc/qt-doc/doc/man/man3 $(p_doc)/usr/share/man/
-rm -rf $(p_doc)/usr/share/doc/qt-doc/doc/man
dh_installchangelogs -i changes-2.3.1
cp debian/README.Debian $(p_doc)/usr/share/doc/qt-doc/
cp debian/trollstyle.css $(p_doc)/usr/share/doc/qt-doc/doc/html/
dh_compress -i -X.html -X.gif -X.jpg -X.png
dh_link -i
dh_fixperms -i
find $(p_doc)/usr/share/doc -type f | xargs chmod 644
dh_installdeb -i
dh_perl -i
dh_shlibdeps -i
dh_gencontrol -i
dh_md5sums -i
dh_builddeb -i
binary-arch: build install
dh_testdir
dh_testroot
dh_clean -a
dh_installdirs -a
install -d $(install_tmp)/usr/share/qt/tools/designer/templates/
install -d $(install_tmp)/usr/share/applnk/Development/
install -d $(install_tmp)/usr/include/qt/
install -d $(install_tmp)/usr/share/man/man1/
install -d $(install_tmp)/usr/share/lintian/overrides
cp debian/libqt-dev.override $(install_tmp)/usr/share/lintian/overrides/libqt-dev
cp tools/designer/templates/*.ui $(install_tmp)/usr/share/qt/tools/designer/templates/
cp debian/designer.desktop $(install_tmp)/usr/share/applnk/Development/
mv $(tmp)/usr/bin/designer $(install_tmp)/usr/bin/qt-designer-real
cp debian/designer.sh $(install_tmp)/usr/bin/designer
-cp debian/*.1 $(install_tmp)/usr/share/man/man1/
-cp `find include/ -name "*.h" ` $(install_tmp)/usr/include/qt/
-cp src/moc/moc.1 $(install_tmp)/usr/share/man/man1/
-cp tools/designer/uic/uic.1 $(install_tmp)/usr/share/man/man1/
dh_movefiles -plibqt2 --sourcedir=debian/install-tmp
dh_movefiles -plibqt2-mt --sourcedir=debian/install-tmp
dh_movefiles -plibqt2-gl --sourcedir=debian/install-tmp
dh_movefiles -plibqt-dev --sourcedir=debian/install-tmp
dh_movefiles -plibqt-mt-dev --sourcedir=debian/install-tmp
dh_movefiles -plibqt-gl-dev --sourcedir=debian/install-tmp
dh_movefiles -plibqutil1 --sourcedir=debian/install-tmp
dh_movefiles -pqt-designer --sourcedir=debian/install-tmp
dh_movefiles -puic --sourcedir=debian/install-tmp
dh_installdocs -a
dh_installmenu -a
dh_undocumented
dh_installchangelogs -a changes-2.3.1
dh_link -a
dh_strip -a
dh_compress -a
dh_fixperms -a
chmod 755 debian/qt-designer/usr/bin/designer
dh_makeshlibs -a -V
dh_installdeb -a
dh_perl -a
dh_shlibdeps -a -l`pwd`/debian/libqt2/usr/lib:`pwd`/debian/libqutil1/usr/lib:`pwd`/debian/libqt2-mt/usr/lib:`pwd`/debian/libqt2-gl/usr/lib
dh_gencontrol
dh_md5sums -a
dh_builddeb -a
binary: binary-indep binary-arch
.PHONY: clean binary-indep binary-arch binary
|