Emeric Vigier | 2f62582 | 2012-08-06 11:09:52 -0400 | [diff] [blame] | 1 | %{!?release: %define release 0} |
| 2 | %{!?version: %define version @VERSION@} |
| 3 | |
| 4 | %define _libname libcommoncpp2-@LIB_VERSION@-@LIB_MAJOR@ |
| 5 | %define _devname libcommoncpp2-devel |
| 6 | |
| 7 | Name: commoncpp2 |
| 8 | Summary: "commoncpp2" - A GNU package for creating portable C++ programs |
| 9 | Version: %{version} |
| 10 | Release: %{release}%{?dist} |
| 11 | License: RGPL v2 or later |
| 12 | Group: Development/Libraries |
| 13 | URL: http://www.gnu.org/software/commoncpp/commoncpp.html |
| 14 | Source0: ftp://ftp.gnu.org/gnu/commoncpp/commoncpp2-%{PACKAGE_VERSION}.tar.gz |
| 15 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root |
| 16 | Requires: gnutls |
| 17 | Requires: zlib |
| 18 | Requires: libstdc++ |
| 19 | Prereq: /sbin/install-info |
| 20 | BuildRequires: gnutls-devel |
| 21 | BuildRequires: zlib-devel |
| 22 | BuildRequires: libstdc++-devel |
| 23 | BuildRequires: doxygen |
| 24 | BuildRequires: info |
| 25 | |
| 26 | %description |
| 27 | GNU Common C++ offers portable abstraction of system services such as |
| 28 | threads and sockets. GNU Common C++ also provides a threadsafe class |
| 29 | framework for strings, config file and XML parsing, and object |
| 30 | serialization. |
| 31 | |
| 32 | %package -n %{_libname} |
| 33 | Group: System/Libraries |
| 34 | Summary: Runtime libraries for GNU Common C++ threading and sockets |
| 35 | Provides: %{name} = %{version}-%{release} |
| 36 | |
| 37 | %package -n %{_devname} |
| 38 | Requires: %{_libname} = %{version}-%{release} |
| 39 | Requires: libxml2-devel |
| 40 | Requires: zlib-devel |
| 41 | Requires: libstdc++-devel |
| 42 | Requires(post,postun): info |
| 43 | Group: Development/Libraries |
| 44 | Summary: Headers and static link library for commoncpp2 |
| 45 | Provides: %{name}-devel = %{version}-%{release} |
| 46 | |
| 47 | %package doc |
| 48 | Requires: commoncpp2 = %{version} |
| 49 | Summary: Class documentation for GNU Common C++ |
| 50 | Group: Documentation |
| 51 | |
| 52 | %description -n %{_libname} |
| 53 | This package contains the runtime library needed by applications that use |
| 54 | GNU Common C++. |
| 55 | |
| 56 | %description -n %{_devname} |
| 57 | This package provides the header files, link libraries and documentation for |
| 58 | building GNU Common C++ applications. |
| 59 | |
| 60 | %description doc |
| 61 | This includes doxygen generated class references for the GNU Common C++ |
| 62 | library. |
| 63 | |
| 64 | %prep |
| 65 | %setup |
| 66 | %build |
| 67 | %configure |
| 68 | %{__make} %{?_smp_mflags} CXXFLAGS="$RPM_OPT_FLAGS" |
| 69 | |
| 70 | %install |
| 71 | |
| 72 | %{__mkdir} -p %{buildroot}/%{_mandir}/man3 |
| 73 | %makeinstall |
| 74 | %{__strip} %{buildroot}/%{_libdir}/lib*.so.*.* |
| 75 | |
| 76 | |
| 77 | %clean |
| 78 | %{__rm} -fr %{buildroot} |
| 79 | |
| 80 | %files -n %{_libname} |
| 81 | %defattr(-,root,root,-) |
| 82 | %doc AUTHORS COPYING COPYING.addendum NEWS README TODO ChangeLog |
| 83 | %{_libdir}/*.so.* |
| 84 | |
| 85 | %files -n %{_devname} |
| 86 | %defattr(-,root,root,-) |
| 87 | %doc doc/html/*.html doc/html/*.*g* |
| 88 | %{_libdir}/*.a |
| 89 | %{_libdir}/*.so |
| 90 | %{_libdir}/*.la |
| 91 | %dir %{_includedir}/cc++ |
| 92 | %{_includedir}/cc++/*.h |
| 93 | %{_bindir}/* |
| 94 | %{_infodir}/commoncpp2.info* |
| 95 | %{_datadir}/aclocal/*.m4 |
| 96 | %{_libdir}/pkgconfig/*.pc |
| 97 | |
| 98 | %files doc |
| 99 | %defattr(-,root,root,-) |
| 100 | %doc doc/html/* |
| 101 | |
| 102 | %post -n %{_libname} -p /sbin/ldconfig |
| 103 | |
| 104 | %postun -n %{_libname} -p /sbin/ldconfig |
| 105 | |
| 106 | |