libsigcxx.spec 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. ##
  2. ## libsigcxx.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ##
  5. ## Permission to use, copy, modify, and distribute this software for
  6. ## any purpose with or without fee is hereby granted, provided that
  7. ## the above copyright notice and this permission notice appear in all
  8. ## copies.
  9. ##
  10. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  11. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  12. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  13. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  14. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  15. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  16. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  17. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  18. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  19. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  20. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  21. ## SUCH DAMAGE.
  22. ##
  23. # package version
  24. %define V_libsigcxx 2.2.3
  25. %define V_libsigcxx_major 2.2
  26. # package information
  27. Name: libsigcxx
  28. Summary: Callback Framework Library
  29. URL: http://libsigc.sourceforge.net/
  30. Vendor: Karl Nelson
  31. Packager: OpenPKG Foundation e.V.
  32. Distribution: OpenPKG Community
  33. Class: EVAL
  34. Group: Libraries
  35. License: LGPL
  36. Version: %{V_libsigcxx}
  37. Release: 20081026
  38. # list of sources
  39. Source0: ftp://ftp.gnome.org/pub/GNOME/sources/libsigc++/%{V_libsigcxx_major}/libsigc++-%{version}.tar.bz2
  40. Patch0: libsigcxx.patch
  41. # build information
  42. Prefix: %{l_prefix}
  43. BuildRoot: %{l_buildroot}
  44. BuildPreReq: OpenPKG, openpkg >= 20040130, gcc, make
  45. PreReq: OpenPKG, openpkg >= 20040130
  46. AutoReq: no
  47. AutoReqProv: no
  48. %description
  49. libsigc++ implements a typesafe callback system for standard C++. It
  50. allows the programmer to define signals and to connect those signals
  51. to any member or global callback function, regardless of whether it
  52. is static or virtual. It also contains adaptor classes for connection
  53. of dissimilar callbacks and is easier to use than most other C++
  54. callback libraries.
  55. %track
  56. prog libsigcxx = {
  57. version = %{version}
  58. url = ftp://ftp.gnome.org/pub/GNOME/sources/libsigc++/%{V_libsigcxx_major}/
  59. regex = libsigc\+\+-(__VER__)\.tar\.bz2
  60. }
  61. %prep
  62. %setup -q -n libsigc++-%{version}
  63. %patch -p0
  64. %build
  65. CC="%{l_cc}" \
  66. CXX="%{l_cxx}" \
  67. CFLAGS="%{l_cflags -O}" \
  68. CXXFLAGS="%{l_cxxflags -O}" \
  69. CPPFLAGS="%{l_cppflags}" \
  70. LDFLAGS="%{l_ldflags}" \
  71. ./configure \
  72. --prefix=%{l_prefix} \
  73. --datadir=%{l_prefix}/share/libsigcxx \
  74. --sysconfdir=%{l_prefix}/etc/libsigcxx \
  75. --localstatedir=%{l_prefix}/var/libsigcxx \
  76. --disable-shared
  77. %{l_make} %{l_mflags -O}
  78. %install
  79. rm -rf $RPM_BUILD_ROOT
  80. %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
  81. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share
  82. rm -rf $RPM_BUILD_ROOT%{l_prefix}/include/*/sigc++/macros
  83. rm -rf $RPM_BUILD_ROOT%{l_prefix}/include/*/sigc++/adaptors/macros
  84. rm -rf $RPM_BUILD_ROOT%{l_prefix}/include/*/sigc++/adaptors/lambda/macros
  85. rm -rf $RPM_BUILD_ROOT%{l_prefix}/include/*/sigc++/functors/macros
  86. mv $RPM_BUILD_ROOT%{l_prefix}/include/*/sigc++ \
  87. $RPM_BUILD_ROOT%{l_prefix}/include
  88. rm -rf $RPM_BUILD_ROOT%{l_prefix}/include/sigc++-*
  89. mv $RPM_BUILD_ROOT%{l_prefix}/lib/sigc++-2.0/include/* \
  90. $RPM_BUILD_ROOT%{l_prefix}/include
  91. rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/sigc++-2.0
  92. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  93. %files -f files
  94. %clean
  95. rm -rf $RPM_BUILD_ROOT