wx.spec 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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.6.1
  35. Release: 20050816
  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, gcc, make
  43. PreReq: OpenPKG, openpkg >= 20040130
  44. BuildPreReq: X11, glib2, glib2::with_threads = yes, gtk2
  45. PreReq: X11, glib2, glib2::with_threads = yes, gtk2
  46. BuildPreReq: zlib, png, tiff, jpeg, libiconv
  47. PreReq: zlib, png, tiff, jpeg, libiconv
  48. AutoReq: no
  49. AutoReqProv: no
  50. %description
  51. wxWidgets is a cross-platform graphical user interface (GUI) library
  52. which gives a single, easy-to-use API for writing GUI applications
  53. on multiple platforms. This package is wxGTK, the Unix/X11/Gtk+
  54. based version of wxWindows.
  55. %track
  56. prog wx = {
  57. version = %{version}
  58. url = http://prdownloads.sourceforge.net/wxwindows/
  59. regex = wxGTK-(\d+\.\d+\.\d+)\.tar\.bz2
  60. }
  61. %prep
  62. %setup -q -n wxGTK-%{version}
  63. %patch -p0
  64. %build
  65. # configure package
  66. CC="%{l_cc}" \
  67. CXX="%{l_cxx}" \
  68. CFLAGS="%{l_cflags -O}" \
  69. CXXFLAGS="%{l_cxxflags -O}" \
  70. CPPFLAGS="-I`pwd`/contrib/include %{l_cppflags tiff}" \
  71. LDFLAGS="%{l_ldflags}" \
  72. LN_S="ln" \
  73. ./configure \
  74. --prefix=%{l_prefix} \
  75. --with-x \
  76. --x-includes=`%{l_rc} --query x11_incdir` \
  77. --x-libraries=`%{l_rc} --query x11_libdir` \
  78. --with-gtk \
  79. --with-gtk-prefix=%{l_prefix} \
  80. --with-gtk-exec-prefix=%{l_prefix} \
  81. --with-libiconv-prefix=%{l_prefix} \
  82. --with-libpng \
  83. --with-libjpeg \
  84. --with-libtiff \
  85. --with-zlib \
  86. --enable-unicode \
  87. --enable-xrc \
  88. --disable-shared
  89. # build package
  90. %{l_make} %{l_mflags -O}
  91. for contrib in stc; do
  92. ( cd contrib/src/$contrib
  93. %{l_make} %{l_mflags -O}
  94. ) || exit $?
  95. done
  96. %install
  97. # install package
  98. rm -rf $RPM_BUILD_ROOT
  99. %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
  100. for contrib in stc; do
  101. ( cd contrib/src/$contrib
  102. %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
  103. ) || exit $?
  104. done
  105. # strip down installation
  106. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/locale
  107. # determine installation files
  108. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  109. %{l_files_std} \
  110. '%not %dir %{l_prefix}/share/aclocal'
  111. %files -f files
  112. %clean
  113. rm -rf $RPM_BUILD_ROOT