glib2.spec 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. ##
  2. ## glib.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2003 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2003 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 version
  26. %define V_glib2_major 2.2
  27. %define V_glib2_minor 2
  28. # package information
  29. Name: glib2
  30. Summary: The Gtk Utility Library
  31. URL: http://www.gtk.org/
  32. Vendor: The Gtk Project
  33. Packager: The OpenPKG Project
  34. Distribution: OpenPKG [PLUS]
  35. Group: Algorithm
  36. License: GPL
  37. Version: %{V_glib2_major}.%{V_glib2_minor}
  38. Release: 20030614
  39. # package options
  40. %option with_threads no
  41. # list of sources
  42. Source0: ftp://ftp.gtk.org/pub/gtk/v%{V_glib2_major}/glib-%{version}.tar.gz
  43. # build information
  44. Prefix: %{l_prefix}
  45. BuildRoot: %{l_buildroot}
  46. BuildPreReq: OpenPKG, openpkg >= 20020206, make
  47. BuildPreReq: gettext, libiconv, pkgconfig >= 0.14.0
  48. PreReq: OpenPKG, openpkg >= 20020206
  49. PreReq: gettext, libiconv, pkgconfig >= 0.14.0
  50. AutoReq: no
  51. AutoReqProv: no
  52. %description
  53. GLib is the low-level core library that forms the basis of Gtk+. It
  54. provides data structure handling for C, portability wrappers, and
  55. interfaces for such runtime functionality as an event loop, threads,
  56. dynamic loading, and an object system.
  57. %prep
  58. %setup -q -n glib-%{version}
  59. %{l_shtool} subst \
  60. -e 's;\$export_dynamic_flag_spec;;g' \
  61. -e 's;eval echo \\\\;eval echo ;' \
  62. configure
  63. %{l_shtool} subst \
  64. -e 's;/glib-2\.0;/glib2;g' \
  65. -e 's;lib\(g[a-z]*\)-2\.0;lib\12;g' \
  66. Makefile.in \
  67. */Makefile.in \
  68. m4macros/glib-2.0.m4
  69. %{l_shtool} subst \
  70. -e 's;/glib-2\.0;/glib2;g' \
  71. -e 's;-l\(g[a-z]*\)-2\.0;-l\12;g' \
  72. *-2.0.pc.in
  73. %build
  74. CC="%{l_cc}" \
  75. CFLAGS="%{l_cflags -O}" \
  76. CPPFLAGS="%{l_cppflags}" \
  77. LDFLAGS="%{l_ldflags}" \
  78. ./configure \
  79. --prefix=%{l_prefix} \
  80. --with-libiconv=gnu \
  81. --disable-debug \
  82. --disable-shared \
  83. %if "%{with_threads}" == "yes"
  84. --enable-threads
  85. %else
  86. --disable-threads
  87. %endif
  88. %{l_make} %{l_mflags}
  89. %install
  90. rm -rf $RPM_BUILD_ROOT
  91. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  92. rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
  93. rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/charset.alias
  94. rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/locale
  95. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/glib-2.0
  96. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/gtk-doc
  97. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  98. rm $RPM_BUILD_ROOT%{l_prefix}/lib/*.la
  99. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  100. %{l_files_std} \
  101. '%not %dir %{l_prefix}/share/aclocal' \
  102. '%not %dir %{l_prefix}/lib/pkgconfig'
  103. %files -f files
  104. %clean
  105. rm -rf $RPM_BUILD_ROOT