qt.spec 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. ##
  2. ## qt.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2002 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2002 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2002 Ralf S. Engelschall <rse@engelschall.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 option, other switch denotes almost all GUI features
  26. %ifndef with_freetype
  27. %define with_freetype no
  28. %endif
  29. %ifndef with_other
  30. %define with_other no
  31. %endif
  32. # package information
  33. Name: qt
  34. Summary: The Qt Toolkit
  35. URL: http://www.trolltech.com/products/qt/x11.html
  36. Vendor: TrollTech AS
  37. Packager: The OpenPKG Project
  38. Distribution: OpenPKG [REL]
  39. Group: X11
  40. License: GPL
  41. Version: 3.0.4
  42. Release: 20020611
  43. # list of sources
  44. Source0: ftp://ftp.trolltech.com/qt/source/qt-x11-free-%{version}.tar.gz
  45. # build information
  46. Prefix: %{l_prefix}
  47. BuildRoot: %{l_buildroot}
  48. BuildPreReq: OpenPKG, openpkg >= 20020206, gcc, X11
  49. PreReq: OpenPKG, openpkg >= 20020206, X11
  50. %if "%{with_freetype}" == "yes"
  51. BuildPreReq: freetype
  52. PreReq: freetype
  53. %endif
  54. AutoReq: no
  55. AutoReqProv: no
  56. # FIXME Do we need PreReq to match BuildPreReq?
  57. %description
  58. Qt is a GUI (graphical user interface) software toolkit which simplifies
  59. the task of writing and maintaining GUIs, and allows the developer to
  60. create prototypes and feature-rich applications quickly. Offering C++
  61. library bindings, Qt enables development in an object-oriented
  62. environment and appeals to developers with portability in mind. Qt's
  63. portable C++ library bindings allow for error-free recompiling on at
  64. least the three major platforms Unix (and Linux), Apple Macintosh, and
  65. Microsoft Windows. Its API architecture is designed to reduce complexity
  66. and increase reliability through a signal and slot mechanism, which is
  67. similar to templates in C++, but with influences from component
  68. technology.
  69. %prep
  70. %setup -q -n qt-x11-free-%{version}
  71. %build
  72. QTDIR=`pwd`; export QTDIR
  73. PATH="%{l_prefix}/bin:$PATH"; export PATH
  74. case "%{l_target}" in
  75. *-freebsd* )
  76. oscomp="freebsd-g++"
  77. ;;
  78. *-linux* )
  79. oscomp="linux-g++"
  80. ;;
  81. *-solaris* )
  82. oscomp="solaris-g++"
  83. ;;
  84. esac
  85. echo "yes" | ./configure \
  86. -prefix %{l_prefix} -release \
  87. -static -qt-gif -qt-zlib \
  88. -platform $oscomp -thread -stl \
  89. -qt-libpng -qt-libjpeg -qt-libmng \
  90. -no-nas-sound -no-tablet -no-xkb \
  91. %if "%{with_freetype}" == "yes"
  92. -xft \
  93. %else
  94. -no-xft \
  95. %endif
  96. %if "%{with_other}" == "yes"
  97. -sm -xinerama -xrender \
  98. %else
  99. -no-sm -no-xinerama -no-xrender \
  100. %endif
  101. -I%{l_prefix}/include \
  102. -L%{l_prefix}/lib \
  103. -R%{l_prefix}/lib
  104. %{l_make} %{l_mflags -O} \
  105. MAKE="%{l_make} %{l_mflags -O}" \
  106. symlinks src-moc sub-src sub-tools
  107. %install
  108. rm -rf $RPM_BUILD_ROOT
  109. %{l_shtool} mkdir -f -p -m 755 \
  110. $RPM_BUILD_ROOT%{l_prefix}/bin \
  111. $RPM_BUILD_ROOT%{l_prefix}/lib \
  112. $RPM_BUILD_ROOT%{l_prefix}/include/qt \
  113. $RPM_BUILD_ROOT%{l_prefix}/include/qt/private \
  114. $RPM_BUILD_ROOT%{l_prefix}/man/man3
  115. %{l_shtool} install -c -s -m 755 \
  116. bin/designer bin/moc bin/uic \
  117. $RPM_BUILD_ROOT%{l_prefix}/bin/
  118. # FIXME Extreme hack
  119. touch include/qt_windows.h
  120. %{l_shtool} install -c -m 644 \
  121. include/* $RPM_BUILD_ROOT%{l_prefix}/include/qt/
  122. # FIXME This is a kludge, too
  123. rm $RPM_BUILD_ROOT%{l_prefix}/include/qt/qt_windows.h
  124. # FIXME This line should be integrated into the last shtool install
  125. %{l_shtool} install -c -m 644 \
  126. include/private/* $RPM_BUILD_ROOT%{l_prefix}/include/qt/private/
  127. ( cd lib && tar cf - * ) |\
  128. ( cd $RPM_BUILD_ROOT%{l_prefix}/lib && tar xf - )
  129. ( cd doc/man/man3
  130. for man in *.3qt; do
  131. mv $man `echo $man | sed -e 's;\.3qt$;.3;'`
  132. done
  133. %{l_shtool} install -c -m 644 \
  134. *.3 $RPM_BUILD_ROOT%{l_prefix}/man/man3/
  135. )
  136. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  137. %files -f files
  138. %clean
  139. rm -rf $RPM_BUILD_ROOT