wx.spec 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. ##
  2. ## wx.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: wx
  26. Summary: Cross-Platform GUI Library
  27. URL: http://www.wxwidgets.org/
  28. Vendor: wxWidgets Team
  29. Packager: OpenPKG
  30. Distribution: OpenPKG
  31. Class: EVAL
  32. Group: XWindow
  33. License: LGPL
  34. Version: 2.5.5
  35. Release: 20050404
  36. # list of sources
  37. Source0: http://osdn.dl.sourceforge.net/sourceforge/wxwindows/wxGTK-%{version}.tar.bz2
  38. Patch0: wx.patch
  39. # build information
  40. Prefix: %{l_prefix}
  41. BuildRoot: %{l_buildroot}
  42. BuildPreReq: OpenPKG, openpkg >= 20040130, X11, glib, glib::with_threads = yes, gtk, zlib, png, tiff, jpeg, libiconv, gcc, make
  43. PreReq: OpenPKG, openpkg >= 20040130, X11, glib, glib::with_threads = yes, gtk, zlib, png, tiff, jpeg, libiconv
  44. AutoReq: no
  45. AutoReqProv: no
  46. %description
  47. wxWidgets is a cross-platform graphical user interface (GUI) library
  48. which gives a single, easy-to-use API for writing GUI applications
  49. on multiple platforms. This package is wxGTK, the Unix/X11/Gtk+
  50. based version of wxWindows.
  51. %track
  52. prog wx = {
  53. version = %{version}
  54. url = http://prdownloads.sourceforge.net/wxwindows/
  55. regex = wxGTK-(\d+\.\d+\.\d+)\.tar\.bz2
  56. }
  57. %prep
  58. %setup -q -n wxGTK-%{version}
  59. %patch -p0
  60. %build
  61. # configure package
  62. CC="%{l_cc}" \
  63. CXX="%{l_cxx}" \
  64. CFLAGS="%{l_cflags -O}" \
  65. CXXFLAGS="%{l_cxxflags -O}" \
  66. CPPFLAGS="-I`pwd`/contrib/include %{l_cppflags tiff}" \
  67. LDFLAGS="%{l_ldflags}" \
  68. LN_S="ln" \
  69. ./configure \
  70. --prefix=%{l_prefix} \
  71. --with-x \
  72. --x-includes=`%{l_rc} --query x11_incdir` \
  73. --x-libraries=`%{l_rc} --query x11_libdir` \
  74. --with-gtk \
  75. --with-gtk-prefix=%{l_prefix} \
  76. --with-gtk-exec-prefix=%{l_prefix} \
  77. --with-libiconv-prefix=%{l_prefix} \
  78. --with-libpng \
  79. --with-libjpeg \
  80. --with-libtiff \
  81. --with-zlib \
  82. --enable-xrc \
  83. --disable-shared
  84. # build package
  85. %{l_make} %{l_mflags -O}
  86. for contrib in stc; do
  87. ( cd contrib/src/$contrib
  88. %{l_make} %{l_mflags -O}
  89. ) || exit $?
  90. done
  91. %install
  92. # install package
  93. rm -rf $RPM_BUILD_ROOT
  94. %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
  95. for contrib in stc; do
  96. ( cd contrib/src/$contrib
  97. %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
  98. ) || exit $?
  99. done
  100. # strip down installation
  101. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/locale
  102. # determine installation files
  103. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  104. %{l_files_std} \
  105. '%not %dir %{l_prefix}/share/aclocal'
  106. %files -f files
  107. %clean
  108. rm -rf $RPM_BUILD_ROOT