kde-qt.spec 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. ##
  2. ## kde-qt.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2003 Cable & Wireless <http://www.cw.com/>
  6. ##
  7. ## Permission to use, copy, modify, and distribute this software for
  8. ## any purpose with or without fee is hereby granted, provided that
  9. ## the above copyright notice and this permission notice appear in all
  10. ## copies.
  11. ##
  12. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  13. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  14. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  15. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  16. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  17. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  18. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  19. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  20. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  21. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  22. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  23. ## SUCH DAMAGE.
  24. ##
  25. # package information
  26. Name: kde-qt
  27. Summary: K Desktop Environment (Qt Toolkit)
  28. URL: http://www.kde.org/
  29. Vendor: TrollTech AS
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG [EVAL]
  32. Group: KDE
  33. License: GPL
  34. Version: 3.1.2
  35. Release: 20030818
  36. # list of sources
  37. Source0: ftp://ftp.trolltech.com/pub/qt/source/qt-x11-free-%{version}.tar.bz2
  38. Source1: kde-qt.pc
  39. # build information
  40. Prefix: %{l_prefix}
  41. BuildRoot: %{l_buildroot}
  42. BuildPreReq: OpenPKG, openpkg >= 20030103, X11, pkgconfig, gcc
  43. PreReq: OpenPKG, openpkg >= 20030103, X11, pkgconfig
  44. AutoReq: no
  45. AutoReqProv: no
  46. %description
  47. KDE is a powerful Open Source graphical desktop environment for Unix
  48. workstations. It combines ease of use, contemporary functionality,
  49. and outstanding graphical design with the technological superiority
  50. of the Unix operating system.
  51. This part is the KDE underlying Qt Toolkit.
  52. (The major differences between this package and the standard OpenPKG
  53. Qt package are: shared library version only, threading enabled,
  54. stripped down installation size, slightly older version to fullfill
  55. exactly the requirements of KDE, no build options, etc. So, this
  56. package just is for KDE internal use only.)
  57. %prep
  58. %setup -q -n qt-x11-free-%{version}
  59. # just checking for the definition of POSIX feature test macros
  60. # is a violation of the standard. The macros are allowed to
  61. # have values -1, 0 and >0 and especially a defined value
  62. # of -1 still means "feature not available". It case of
  63. # _POSIX_THREAD_SAFE_FUNCTIONS, SUSv3 says in particular "if this
  64. # symbol has a value other than -1 or 0, it shall have the value
  65. # 200112L".
  66. %{l_shtool} subst \
  67. -e 's/\(defined(_POSIX_THREAD_SAFE_FUNCTIONS)\)/(\1 \&\& _POSIX_THREAD_SAFE_FUNCTIONS-0>0)/g' \
  68. src/dialogs/qfiledialog.cpp src/kernel/qfont_x11.cpp \
  69. src/tools/qdatetime.cpp src/tools/qdir_unix.cpp
  70. %build
  71. # set $HOME to a writable directory for qsettings
  72. # and set QTDIR to just the source tree directory
  73. export HOME=`pwd`
  74. export QTDIR=`pwd`
  75. # determine target platform for building
  76. case "%{l_target}" in
  77. *-freebsd* ) oscomp="freebsd-g++" ;;
  78. *-linux* ) oscomp="linux-g++" ;;
  79. *-solaris* ) oscomp="solaris-g++" ;;
  80. * ) echo "platform %{l_target} not supported" 2>&1; exit 1 ;;
  81. esac
  82. # configure Qt for target platform
  83. l_x11_incdir=`%{l_prefix}/etc/rc --query x11_incdir`
  84. l_x11_libdir=`%{l_prefix}/etc/rc --query x11_libdir`
  85. echo "yes" | ./configure \
  86. -platform $oscomp \
  87. -prefix %{l_prefix} \
  88. -bindir %{l_prefix}/libexec/kde \
  89. -libdir %{l_prefix}/lib/kde \
  90. -headerdir %{l_prefix}/include/kde \
  91. -docdir %{l_prefix}/share/kde/qt/doc \
  92. -datadir %{l_prefix}/share/kde/qt/data \
  93. -release -shared -stl -sm \
  94. -qt-zlib -qt-libpng -qt-libjpeg -qt-libmng -qt-gif \
  95. -no-nis -no-cups -no-nas-sound -no-xinerama \
  96. -xrender -no-xft -no-tablet -no-xkb \
  97. -disable-opengl -disable-sql \
  98. -no-exceptions -thread \
  99. %{l_cppflags} %{l_ldflags} \
  100. -I${l_x11_incdir} -L${l_x11_incdir} \
  101. -R%{l_prefix}/lib/kde
  102. # build Qt (but without additional tools, the tutorial and the examples)
  103. %{l_make} %{l_mflags -O} \
  104. MAKE="%{l_make} %{l_mflags -O}" \
  105. symlinks src-qmake src-moc sub-src
  106. ( cd tools/designer
  107. %{l_make} %{l_mflags -O} \
  108. MAKE="%{l_make} %{l_mflags -O}" \
  109. sub-uic
  110. ) || exit $?
  111. %install
  112. rm -rf $RPM_BUILD_ROOT
  113. # create directory structure
  114. %{l_shtool} mkdir -f -p -m 755 \
  115. $RPM_BUILD_ROOT%{l_prefix}/libexec/kde \
  116. $RPM_BUILD_ROOT%{l_prefix}/include/kde/qt/private \
  117. $RPM_BUILD_ROOT%{l_prefix}/lib/kde \
  118. $RPM_BUILD_ROOT%{l_prefix}/lib/pkgconfig
  119. # install tools
  120. %{l_shtool} install -c -s -m 755 \
  121. bin/moc bin/uic \
  122. $RPM_BUILD_ROOT%{l_prefix}/libexec/kde/
  123. # install library
  124. %{l_shtool} install -c -m 755 \
  125. lib/libqt-mt.so.%{version} \
  126. $RPM_BUILD_ROOT%{l_prefix}/lib/kde/
  127. %{l_shtool} mkln -s \
  128. $RPM_BUILD_ROOT%{l_prefix}/lib/kde/libqt-mt.so.%{version} \
  129. $RPM_BUILD_ROOT%{l_prefix}/lib/kde/libqt-mt.so.`echo %{version} | sed -e 's;\.[0-9]$;;'`
  130. %{l_shtool} mkln -s \
  131. $RPM_BUILD_ROOT%{l_prefix}/lib/kde/libqt-mt.so.%{version} \
  132. $RPM_BUILD_ROOT%{l_prefix}/lib/kde/libqt-mt.so.`echo %{version} | sed -e 's;\.[0-9]\.[0-9]$;;'`
  133. %{l_shtool} mkln -s \
  134. $RPM_BUILD_ROOT%{l_prefix}/lib/kde/libqt-mt.so.%{version} \
  135. $RPM_BUILD_ROOT%{l_prefix}/lib/kde/libqt-mt.so
  136. # install headers
  137. ( cd include
  138. # (do not pick up symlinks to non-existing files)
  139. rm -f qxtwidget.h qmotif.h qmotifdialog.h qmotifwidget.h
  140. ) || exit $?
  141. %{l_shtool} install -c -m 644 \
  142. include/*.h \
  143. $RPM_BUILD_ROOT%{l_prefix}/include/kde/qt/
  144. %{l_shtool} install -c -m 644 \
  145. include/private/*.h \
  146. $RPM_BUILD_ROOT%{l_prefix}/include/kde/qt/private/
  147. # install pkg-config specification
  148. l_x11_incdir=`%{l_prefix}/etc/rc --query x11_incdir`
  149. l_x11_libdir=`%{l_prefix}/etc/rc --query x11_libdir`
  150. %{l_shtool} install -c -m 644 \
  151. %{l_value -s l_prefix} \
  152. -e "s;@l_version@;%{version};g" \
  153. -e "s;@l_x11_incdir@;${l_x11_incdir};g" \
  154. -e "s;@l_x11_libdir@;${l_x11_libdir};g" \
  155. %{SOURCE kde-qt.pc} \
  156. $RPM_BUILD_ROOT%{l_prefix}/lib/pkgconfig
  157. # determine installation files
  158. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  159. %{l_files_std} \
  160. '%not %dir %{l_prefix}/lib/pkgconfig'
  161. %files -f files
  162. %clean
  163. rm -rf $RPM_BUILD_ROOT