blob: 3ef960c7cf8c11c1714ea5cc2c97c07a43b2de79 [file] [log] [blame]
Emeric Vigier2f625822012-08-06 11:09:52 -04001%{!?release: %define release 0}
2%{!?version: %define version 1.8.1}
3
4%define _libname libcommoncpp2-1_8-0
5%define _devname libcommoncpp2-devel
6
7Name: commoncpp2
8Summary: "commoncpp2" - A GNU package for creating portable C++ programs
9Version: %{version}
10Release: %{release}%{?dist}
11License: RGPL v2 or later
12Group: Development/Libraries
13URL: http://www.gnu.org/software/commoncpp/commoncpp.html
14Source0: ftp://ftp.gnu.org/gnu/commoncpp/commoncpp2-%{PACKAGE_VERSION}.tar.gz
15BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
16Requires: gnutls
17Requires: zlib
18Requires: libstdc++
19Prereq: /sbin/install-info
20BuildRequires: gnutls-devel
21BuildRequires: zlib-devel
22BuildRequires: libstdc++-devel
23BuildRequires: doxygen
24BuildRequires: info
25
26%description
27GNU Common C++ offers portable abstraction of system services such as
28threads and sockets. GNU Common C++ also provides a threadsafe class
29framework for strings, config file and XML parsing, and object
30serialization.
31
32%package -n %{_libname}
33Group: System/Libraries
34Summary: Runtime libraries for GNU Common C++ threading and sockets
35Provides: %{name} = %{version}-%{release}
36
37%package -n %{_devname}
38Requires: %{_libname} = %{version}-%{release}
39Requires: libxml2-devel
40Requires: zlib-devel
41Requires: libstdc++-devel
42Requires(post,postun): info
43Group: Development/Libraries
44Summary: Headers and static link library for commoncpp2
45Provides: %{name}-devel = %{version}-%{release}
46
47%package doc
48Requires: commoncpp2 = %{version}
49Summary: Class documentation for GNU Common C++
50Group: Documentation
51
52%description -n %{_libname}
53This package contains the runtime library needed by applications that use
54GNU Common C++.
55
56%description -n %{_devname}
57This package provides the header files, link libraries and documentation for
58building GNU Common C++ applications.
59
60%description doc
61This includes doxygen generated class references for the GNU Common C++
62library.
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