qt4.spec 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. ##
  2. ## qt4.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2005 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ## Copyright (c) 2000-2005 Ralf S. Engelschall <http://engelschall.com/>
  5. ##
  6. ## Permission to use, copy, modify, and distribute this software for
  7. ## any purpose with or without fee is hereby granted, provided that
  8. ## the above copyright notice and this permission notice appear in all
  9. ## copies.
  10. ##
  11. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  12. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  13. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  14. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  15. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  16. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  17. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  18. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  19. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  20. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  21. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  22. ## SUCH DAMAGE.
  23. ##
  24. # package information
  25. Name: qt4
  26. Summary: The Qt Toolkit
  27. URL: http://www.trolltech.com/products/qt/x11.html
  28. Vendor: TrollTech AS
  29. Packager: OpenPKG
  30. Distribution: OpenPKG
  31. Class: EVAL
  32. Group: XWindow
  33. License: GPL/QPL
  34. Version: 4.0.1
  35. Release: 20051009
  36. # list of sources
  37. Source0: ftp://ftp.trolltech.com/pub/qt/source/qt-x11-opensource-src-%{version}.tar.gz
  38. # build information
  39. Prefix: %{l_prefix}
  40. BuildRoot: %{l_buildroot}
  41. BuildPreReq: OpenPKG, openpkg >= 20040130, gcc
  42. PreReq: OpenPKG, openpkg >= 20040130
  43. BuildPreReq: X11
  44. PreReq: X11
  45. AutoReq: no
  46. AutoReqProv: no
  47. %description
  48. Qt is a comprehensive C++ application development framework. It
  49. includes class libraries and tools for cross-platform development
  50. and the creation of graphical user interfaces (GUI). Its API
  51. architecture is designed to reduce complexity and increase
  52. reliability through a signal and slot mechanism, which is similar to
  53. templates in C++, but with influences from component technology.
  54. %track
  55. prog qt4 = {
  56. version = %{version}
  57. url = ftp://ftp.trolltech.com/pub/qt/source/
  58. regex = qt-x11-opensource-src-(\d+\.\d+\.\d+)\.tar\.(gz|bz2)
  59. }
  60. %prep
  61. %setup -q -n qt-x11-opensource-src-%{version}
  62. # avoid dependencies external to OpenPKG instance
  63. %{l_shtool} subst \
  64. -e 's;[ \t]*/usr/local/include;;g' \
  65. -e 's;[ \t]*/usr/local/lib;;g' \
  66. mkspecs/*/qmake.conf
  67. %build
  68. # configure components
  69. options=""
  70. case "%{l_platform -t}" in
  71. *-freebsd* ) options="-platform freebsd-g++" ;;
  72. *-linux* ) options="-platform linux-g++" ;;
  73. *-sunos* ) options="-platform solaris-g++" ;;
  74. esac
  75. export CC="%{l_cc}"
  76. export CXX="%{l_cxx}"
  77. export CFLAGS="%{l_cflags -O}"
  78. export CXXFLAGS="%{l_cxxflags -O}"
  79. echo "yes" | ./configure $options \
  80. -prefix %{l_prefix} \
  81. -datadir %{l_prefix}/share/qt \
  82. -headerdir %{l_prefix}/include/qt \
  83. -docdir %{l_prefix}/share/qt/doc \
  84. -translationdir %{l_prefix}/share/qt/translations \
  85. -plugindir %{l_prefix}/libexec/qt \
  86. -sysconfdir %{l_prefix}/etc/qt \
  87. -release -static \
  88. -stl -qt-zlib -qt-libpng -qt-libjpeg -qt-gif \
  89. -I$QTDIR/include %{l_cppflags} -I`%{l_rc} --query x11_incdir` \
  90. -L$QTDIR/lib %{l_ldflags} -L`%{l_rc} --query x11_libdir`
  91. # make components
  92. %{l_make} %{l_mflags -O} #\ MAKE="%{l_make} %{l_mflags -O}"
  93. %install
  94. rm -rf $RPM_BUILD_ROOT
  95. # install components
  96. %{l_make} %{l_mflags} install INSTALL_ROOT=$RPM_BUILD_ROOT
  97. # post-adjust installation
  98. %{l_shtool} mkdir -f -p -m 755 \
  99. $RPM_BUILD_ROOT%{l_prefix}/lib/pkgconfig
  100. mv $RPM_BUILD_ROOT%{l_prefix}/lib/*.pc \
  101. $RPM_BUILD_ROOT%{l_prefix}/lib/pkgconfig/
  102. # strip down installation
  103. rm -rf $RPM_BUILD_ROOT%{l_prefix}/demos
  104. rm -rf $RPM_BUILD_ROOT%{l_prefix}/examples
  105. rm -rf $RPM_BUILD_ROOT%{l_prefix}/libexec/qt
  106. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  107. # determine installation files
  108. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  109. %{l_files_std} \
  110. '%not %dir %{l_prefix}/lib/pkgconfig' \
  111. '%doc %{l_prefix}/share/qt/doc/html/*'
  112. %files -f files
  113. %clean
  114. rm -rf $RPM_BUILD_ROOT