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