qt.spec 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  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 information
  26. Name: qt
  27. Summary: The Qt Toolkit
  28. URL: http://www.trolltech.com/products/qt/x11.html
  29. Vendor: TrollTech AS
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG [REL]
  32. Group: X11
  33. License: GPL
  34. Version: 3.0.4
  35. Release: 20020625
  36. # list of sources
  37. Source0: ftp://ftp.trolltech.com/qt/source/qt-x11-free-%{version}.tar.gz
  38. # build information
  39. Prefix: %{l_prefix}
  40. BuildRoot: %{l_buildroot}
  41. BuildPreReq: OpenPKG, openpkg >= 20020206, gcc, X11, freetype
  42. PreReq: OpenPKG, openpkg >= 20020206, X11, freetype
  43. AutoReq: no
  44. AutoReqProv: no
  45. %description
  46. Qt is a GUI (graphical user interface) software toolkit which simplifies
  47. the task of writing and maintaining GUIs, and allows the developer to
  48. create prototypes and feature-rich applications quickly. Offering C++
  49. library bindings, Qt enables development in an object-oriented
  50. environment and appeals to developers with portability in mind. Qt's
  51. portable C++ library bindings allow for error-free recompiling on at
  52. least the three major platforms Unix (and Linux), Apple Macintosh, and
  53. Microsoft Windows. Its API architecture is designed to reduce complexity
  54. and increase reliability through a signal and slot mechanism, which is
  55. similar to templates in C++, but with influences from component
  56. technology.
  57. %prep
  58. %setup -q -n qt-x11-free-%{version}
  59. %build
  60. QTDIR=`pwd`
  61. PATH="$QTDIR/bin:$PATH"
  62. LD_LIBRARY_PATH="$QTDIR/lib:$LD_LIBRARY_PATH"
  63. export QTDIR PATH LD_LIBRARY_PATH
  64. case "%{l_target}" in
  65. *-freebsd* ) oscomp="freebsd-g++" ;;
  66. *-linux* ) oscomp="linux-g++" ;;
  67. *-solaris* ) oscomp="solaris-g++" ;;
  68. * ) echo "platform %{l_target} not supported" 2>&1; exit 1 ;;
  69. esac
  70. echo "yes" | ./configure \
  71. -prefix %{l_prefix} -release \
  72. -static -qt-gif -qt-zlib \
  73. -platform $oscomp -thread -stl \
  74. -qt-libpng -qt-libjpeg -qt-libmng \
  75. -no-nas-sound -no-tablet -no-xkb \
  76. -xft -sm -xinerama -xrender \
  77. -I%{l_prefix}/include \
  78. -L%{l_prefix}/lib \
  79. -R%{l_prefix}/lib \
  80. -L`%{l_prefix}/etc/rc --query x11_libdir` \
  81. -R`%{l_prefix}/etc/rc --query x11_libdir`
  82. %{l_make} %{l_mflags -O} \
  83. MAKE="%{l_make} %{l_mflags -O}" \
  84. symlinks src-qmake src-moc sub-src sub-tools
  85. # FIXME: "-Wl,-rpath,/tmp/qt-x11-free-3.0.4/lib"
  86. # FIXME: "QSettings: error creating /cw/.qt"
  87. # FIXME: "libpng warning: Application was compiled with png.h from libpng-1.2.3"
  88. # "libpng warning: Application is running with png.c from libpng-1.0.12"
  89. %install
  90. rm -rf $RPM_BUILD_ROOT
  91. %{l_shtool} mkdir -f -p -m 755 \
  92. $RPM_BUILD_ROOT%{l_prefix}/bin \
  93. $RPM_BUILD_ROOT%{l_prefix}/lib \
  94. $RPM_BUILD_ROOT%{l_prefix}/include/qt/private \
  95. $RPM_BUILD_ROOT%{l_prefix}/man/man3
  96. %{l_shtool} install -c -s -m 755 \
  97. bin/qmake bin/moc bin/uic \
  98. bin/linguist bin/lrelease bin/lupdate \
  99. bin/assistant bin/qtconfig bin/designer \
  100. $RPM_BUILD_ROOT%{l_prefix}/bin/
  101. # FIXME: The touch should be removed, but for now it remains
  102. # due to a broken symbolic link in the Qt distribution
  103. touch include/qt_windows.h
  104. %{l_shtool} install -c -m 644 \
  105. include/*.h $RPM_BUILD_ROOT%{l_prefix}/include/qt/
  106. %{l_shtool} install -c -m 644 \
  107. include/private/*.h $RPM_BUILD_ROOT%{l_prefix}/include/qt/private/
  108. ( cd lib && tar cf - * ) |\
  109. ( cd $RPM_BUILD_ROOT%{l_prefix}/lib && tar xf - )
  110. ( cd doc/man/man3
  111. for man in *.3qt; do
  112. mv $man `echo $man | sed -e 's;\.3qt$;.3;'`
  113. done
  114. %{l_shtool} install -c -m 644 \
  115. *.3 $RPM_BUILD_ROOT%{l_prefix}/man/man3/
  116. )
  117. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  118. %files -f files
  119. %clean
  120. rm -rf $RPM_BUILD_ROOT