]> git.pld-linux.org Git - SPECS.git/blob - libdigidocpp.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / libdigidocpp.spec
1 #
2 # Conditional build:
3 %bcond_without  perl            # Perl module
4 %bcond_without  php             # PHP module
5 %bcond_without  python          # Python module
6 %bcond_with     bindings        # build bindings (currently only C#/Win32 and Java/Android supported)
7 # https://github.com/open-eid/libdigidocpp/issues/231
8 %bcond_with     podofo
9
10 %if %{without bindings}
11 %undefine       with_perl
12 %undefine       with_php
13 %undefine       with_python
14 %endif
15
16 Summary:        Library for creating and validating BDoc and DDoc containers
17 Summary(pl.UTF-8):      Biblioteka do tworzenia i sprawdzania poprawności kontenerów BDoc i DDoc
18 Name:           libdigidocpp
19 Version:        3.13.8
20 Release:        2
21 License:        LGPL v2.1+
22 Group:          Libraries
23 Source0:        https://github.com/open-eid/libdigidocpp/releases/download/v%{version}/%{name}-%{version}.tar.gz
24 # Source0-md5:  2d35f37dc103e3cecb57f0332f46ff31
25 Patch0:         %{name}-link.patch
26 Patch1:         DIGIDOCPP_VERSION.patch
27 URL:            https://github.com/open-eid/libdigidocpp
28 # for tests
29 BuildRequires:  boost-devel
30 BuildRequires:  cmake >= 3.0
31 BuildRequires:  doxygen
32 BuildRequires:  libdigidoc-devel >= 3.9
33 BuildRequires:  libstdc++-devel
34 BuildRequires:  minizip-devel
35 BuildRequires:  openssl-devel >= 1.0.1
36 BuildRequires:  pkgconfig
37 %{?with_podofo:BuildRequires:   podofo-devel}
38 BuildRequires:  rpmbuild(macros) >= 1.734
39 BuildRequires:  xerces-c-devel
40 BuildRequires:  xml-security-c-devel
41 BuildRequires:  xsd >= 4.0
42 BuildRequires:  xxd
43 BuildRequires:  zlib-devel
44 %if %{with perl} || %{with php} || %{with python}
45 BuildRequires:  swig
46 %endif
47 %if %{with perl}
48 BuildRequires:  perl-devel
49 %endif
50 %if %{with php}
51 BuildRequires:  php-devel >= 4:5.0.4
52 %endif
53 %if %{with python}
54 BuildRequires:  python-devel
55 %endif
56 Requires:       libdigidoc >= 3.9
57 Requires:       opensc
58 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
59
60 %description
61 libdigidocpp is a C++ library for reading, validating, and creating
62 BDoc and DDoc containers. These file formats are widespread in Estonia
63 where they are used for storing legally binding digital signatures.
64
65 %description -l pl.UTF-8
66 libdigidocpp to biblioteka C++ do odczytu, sprawdzania poprawności i
67 tworzenia kontenerów BDoc i DDoc. Te formaty plików są
68 rozpowszechnione w Estonii, gdzie służą do przechowywania umocowanych
69 prawnie podpisów cyfrowych.
70
71 %package devel
72 Summary:        Development files for libdigidocpp library
73 Summary(pl.UTF-8):      Pliki programistyczne biblioteki libdigidocpp
74 Group:          Development/Libraries
75 Requires:       %{name} = %{version}-%{release}
76 Requires:       libstdc++-devel
77
78 %description devel
79 This package contains the header files for developing applications
80 that use libdigidocpp library.
81
82 %description devel -l pl.UTF-8
83 Ten pakiet zawiera pliki nagłówkowe do tworzenia aplikacji
84 wykorzystujących bibliotekę libdigidocpp.
85
86 %package apidocs
87 Summary:        API documentation for libdigidocpp library
88 Summary(pl.UTF-8):      Dokumentacja API biblioteki libdigidocpp
89 Group:          Documentation
90
91 %description apidocs
92 API documentation for libdigidocpp library.
93
94 %description apidocs -l pl.UTF-8
95 Dokumentacja API biblioteki libdigidocpp.
96
97 %package -n perl-digidoc
98 Summary:        Perl bindings for libdigidocpp library
99 Summary(pl.UTF-8):      Wiązania Perla do biblioteki libdigidocpp
100 Group:          Development/Languages/Perl
101 Requires:       %{name} = %{version}-%{release}
102 Provides:       %{name}-perl = %{version}-%{release}
103 Obsoletes:      libdigidocpp-perl < 0.3.0-1
104
105 %description -n perl-digidoc
106 Perl bindings for libdigidocpp library.
107
108 %description -n perl-digidoc -l pl.UTF-8
109 Wiązania Perla do biblioteki libdigidocpp.
110
111 %package -n php-digidoc
112 Summary:        PHP bindings for libdigidocpp library
113 Summary(pl.UTF-8):      Wiązania PHP do biblioteki libdigidocpp
114 Group:          Development/Languages/PHP
115 Requires:       %{name} = %{version}-%{release}
116 %{?requires_php_extension}
117 Provides:       %{name}-php = %{version}-%{release}
118 Obsoletes:      libdigidocpp-php < 0.3.0-1
119
120 %description -n php-digidoc
121 PHP bindings for libdigidocpp library.
122
123 %description -n php-digidoc -l pl.UTF-8
124 Wiązania PHP do biblioteki libdigidocpp.
125
126 %package -n python-digidoc
127 Summary:        Python bindings for libdigidocpp library
128 Summary(pl.UTF-8):      Wiązania Pythona do biblioteki libdigidocpp
129 Group:          Development/Languages/Python
130 Requires:       %{name} = %{version}-%{release}
131 Provides:       %{name}-python = %{version}-%{release}
132 Obsoletes:      libdigidocpp-python < 0.3.0-1
133
134 %description -n python-digidoc
135 Python bindings for libdigidocpp library.
136
137 %description -n python-digidoc -l pl.UTF-8
138 Wiązania Pythona do biblioteki libdigidocpp.
139
140 %prep
141 %setup -q
142 %patch0 -p1
143 %patch1 -p1
144
145 # Remove bundled copy of minizip
146 %{__rm} -r src/minizip
147
148 %{!?with_podofo:sed -i -e 's#PODOFO_FOUND#0#g' src/CMakeLists.txt}
149
150 %build
151 install -d build
152 cd build
153 %cmake .. \
154         -DCMAKE_INSTALL_DOCDIR=%{_docdir}/%{name}
155
156 %{__make}
157
158 %install
159 rm -rf $RPM_BUILD_ROOT
160
161 %{__make} -C build install \
162         DESTDIR=$RPM_BUILD_ROOT
163
164 # packaged as %doc
165 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
166
167 %clean
168 rm -rf $RPM_BUILD_ROOT
169
170 %post   -p /sbin/ldconfig
171 %postun -p /sbin/ldconfig
172
173 %files
174 %defattr(644,root,root,755)
175 %doc AUTHORS COPYING README.md RELEASE-NOTES.md
176 %dir %{_sysconfdir}/digidocpp
177 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/digidocpp/digidocpp.conf
178 # XXX ?
179 %{_sysconfdir}/digidocpp/878252.p12
180 %{_sysconfdir}/digidocpp/schema
181 %attr(755,root,root) %{_libdir}/libdigidocpp.so.*.*.*
182 %ghost %attr(755,root,root) %{_libdir}/libdigidocpp.so.1
183 %attr(755,root,root) %{_bindir}/digidoc-tool
184 %{_mandir}/man1/digidoc-tool.1*
185
186 %files devel
187 %defattr(644,root,root,755)
188 %attr(755,root,root) %{_libdir}/libdigidocpp.so
189 %{_includedir}/digidocpp
190 %{_pkgconfigdir}/libdigidocpp.pc
191
192 %files apidocs
193 %defattr(644,root,root,755)
194 %doc build/doc/*
195
196 %if %{with perl}
197 %files -n perl-digidoc
198 %defattr(644,root,root,755)
199 %{perl_vendorarch}/*
200 %{perl_vendorlib}/*
201 %endif
202
203 %if %{with php}
204 %files -n php-digidoc
205 %defattr(644,root,root,755)
206 %{php_extensiondir}/*
207 %{php_data_dir}/*
208 %{_sysconfdir}/php.d/digidoc.ini
209 %endif
210
211 %if %{with python}
212 %files -n python-digidoc
213 %defattr(644,root,root,755)
214 %{py_sitedir}/*
215 %endif
This page took 2.435296 seconds and 3 git commands to generate.