]> git.pld-linux.org Git - packages/commoncpp2.git/blob - commoncpp2.spec
- fix building with gcc 11, rebuild with openssl 3.0.0, rel 6
[packages/commoncpp2.git] / commoncpp2.spec
1 #
2 # Conditional build:
3 %bcond_without  static_libs     # don't build static library
4 %bcond_with     gnutls          # use GnuTLS instead of OpenSSL [needs update: recent gnutls no longer uses libgcrypt]
5 #
6 Summary:        A GNU package for creating portable C++ programs
7 Summary(pl.UTF-8):      Pakiet GNU do tworzenia przenośnych programów w C++
8 Name:           commoncpp2
9 Version:        1.8.1
10 Release:        6
11 License:        GPL v2+ with runtime exception
12 Group:          Libraries
13 Source0:        http://ftp.gnu.org/gnu/commoncpp/%{name}-%{version}.tar.gz
14 # Source0-md5:  4804b184e609154ba2bc0aa9f61dc6ef
15 Patch0:         %{name}-netfilter.patch
16 Patch1:         %{name}-include.patch
17 Patch2:         %{name}-link.patch
18 Patch3:         %{name}-info.patch
19 Patch4:         openssl.patch
20 URL:            http://www.gnu.org/software/commoncpp/
21 BuildRequires:  autoconf >= 2.50
22 BuildRequires:  automake
23 BuildRequires:  doxygen
24 %{?with_gnutls:BuildRequires:   gnutls-devel}
25 BuildRequires:  libstdc++-devel
26 BuildRequires:  libtool >= 2:1.5
27 BuildRequires:  libxml2-devel
28 %{!?with_gnutls:BuildRequires:  openssl-devel}
29 BuildRequires:  texinfo
30 BuildRequires:  zlib-devel
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %description
34 This is the second major release of GNU Common C++. GNU Common C++ "2"
35 is a GNU package which offers portable "abstraction" of system
36 services such as threads, networks, and sockets. GNU Common C++ "2"
37 also offers individual frameworks generally useful to developing
38 portable C++ applications including a object persistance engine, math
39 libraries, threading, sockets, etc. GNU Common C++ "2" is small, and
40 highly portable. GNU Common C++ "2" will support most Unix operating
41 systems as well as Win32, in addition to GNU/Linux.
42
43 %description -l pl.UTF-8
44 Drugie główne wydanie GNU Common C++. GNU Common C++ oferuje przenośne
45 abstrakcje usług systemowych takich jak wątki, sieci i gniazda.
46 Oferuje także poszczególne szkielety użyteczne do rozwijania
47 przenośnych aplikacji C++ zawierające silnik trwałych obiektów,
48 biblioteki matematyczne, wątków, gniazd itd. GNU Common C++ jest mały
49 i przenośny. Oprócz GNU/Linuksa obsługuje także większość uniksowych
50 systemów operacyjnych oraz Win32.
51
52 %package devel
53 Summary:        Header files for commoncpp2 library
54 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki commoncpp2
55 Group:          Development/Libraries
56 Requires:       %{name} = %{version}-%{release}
57 %{?with_gnutls:Requires:        gnutls-devel}
58 Requires:       libstdc++-devel
59 Requires:       libxml2-devel
60 %{!?with_gnutls:Requires:       openssl-devel}
61 Requires:       zlib-devel
62
63 %description devel
64 Header files for commoncpp2 library.
65
66 %description devel -l pl.UTF-8
67 Pliki nagłówkowe biblioteki commoncpp2.
68
69 %package static
70 Summary:        Static commoncpp2 library
71 Summary(pl.UTF-8):      Statyczna biblioteka commoncpp2
72 Group:          Development/Libraries
73 Requires:       %{name}-devel = %{version}-%{release}
74
75 %description static
76 Static commoncpp2 library.
77
78 %description static -l pl.UTF-8
79 Statyczna biblioteka commoncpp2.
80
81 %prep
82 %setup -q
83 %patch0 -p1
84 %patch1 -p1
85 %patch2 -p1
86 %patch3 -p1
87 %patch4 -p1
88
89 %build
90 %{__libtoolize}
91 %{__aclocal} -I m4
92 %{__autoconf}
93 %{__autoheader}
94 %{__automake}
95 export CXXFLAGS="%{rpmcxxflags} -std=c++11 -fpermissive"
96 %configure \
97         %{!?with_static_libs:--disable-static} \
98         %{?with_gnutls:--with-gnutls} \
99         %{!?with_gnutls:--with-openssl}
100
101 # ensure netfilter is detected
102 grep -q 'HAVE_NAT_NETFILTER 1' config.h || exit 1
103
104 %{__make} -j1
105
106 %install
107 rm -rf $RPM_BUILD_ROOT
108
109 %{__make} install \
110         DESTDIR=$RPM_BUILD_ROOT
111
112 %clean
113 rm -rf $RPM_BUILD_ROOT
114
115 %post   -p /sbin/ldconfig
116 %postun -p /sbin/ldconfig
117
118 %post   devel -p /sbin/postshell
119 -/usr/sbin/fix-info-dir -c %{_infodir}
120
121 %postun devel -p /sbin/postshell
122 -/usr/sbin/fix-info-dir -c %{_infodir}
123
124 %files
125 %defattr(644,root,root,755)
126 %doc AUTHORS COPYING.addendum ChangeLog NEWS README SUPPORT THANKS TODO
127 %attr(755,root,root) %{_libdir}/libccext2-1.8.so.*.*.*
128 %ghost %{_libdir}/libccext2-1.8.so.0
129 %attr(755,root,root) %{_libdir}/libccgnu2-1.8.so.*.*.*
130 %ghost %{_libdir}/libccgnu2-1.8.so.0
131
132 %files devel
133 %defattr(644,root,root,755)
134 %doc doc/html/*.{css,html,js,png}
135 %attr(755,root,root) %{_bindir}/ccgnu2-config
136 %attr(755,root,root) %{_libdir}/libccext2.so
137 %attr(755,root,root) %{_libdir}/libccgnu2.so
138 %{_libdir}/libccext2.la
139 %{_libdir}/libccgnu2.la
140 %{_includedir}/cc++
141 %{_aclocaldir}/ost_check2.m4
142 %{_pkgconfigdir}/libccext2.pc
143 %{_pkgconfigdir}/libccgnu2.pc
144 %{_infodir}/commoncpp2.info*
145
146 %if %{with static_libs}
147 %files static
148 %defattr(644,root,root,755)
149 %{_libdir}/libccext2.a
150 %{_libdir}/libccgnu2.a
151 %endif
This page took 0.071481 seconds and 4 git commands to generate.