]>
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 |
071ab8b3 | 18 | Release: 2 |
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 |
b9d8bcdb | 34 | BuildRequires: rpmbuild(macros) >= 1.734 |
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 ER |
55 | |
56 | %description | |
57 | libdigidocpp is a C++ library for reading, validating, and creating | |
58 | BDoc and DDoc containers. These file formats are widespread in Estonia | |
59 | where they are used for storing legally binding digital signatures. | |
60 | ||
ed0be3f9 JB |
61 | %description -l pl.UTF-8 |
62 | libdigidocpp to biblioteka C++ do odczytu, sprawdzania poprawności i | |
63 | tworzenia kontenerów BDoc i DDoc. Te formaty plików są | |
64 | rozpowszechnione w Estonii, gdzie służą do przechowywania umocowanych | |
65 | prawnie podpisów cyfrowych. | |
66 | ||
919f854a | 67 | %package devel |
ed0be3f9 JB |
68 | Summary: Development files for libdigidocpp library |
69 | Summary(pl.UTF-8): Pliki programistyczne biblioteki libdigidocpp | |
919f854a ER |
70 | Group: Development/Libraries |
71 | Requires: %{name} = %{version}-%{release} | |
ed0be3f9 | 72 | Requires: libstdc++-devel |
919f854a ER |
73 | |
74 | %description devel | |
ed0be3f9 JB |
75 | This package contains the header files for developing applications |
76 | that use libdigidocpp library. | |
77 | ||
78 | %description devel -l pl.UTF-8 | |
79 | Ten pakiet zawiera pliki nagłówkowe do tworzenia aplikacji | |
80 | wykorzystujących bibliotekę libdigidocpp. | |
81 | ||
82 | %package apidocs | |
83 | Summary: API documentation for libdigidocpp library | |
84 | Summary(pl.UTF-8): Dokumentacja API biblioteki libdigidocpp | |
85 | Group: Documentation | |
86 | ||
87 | %description apidocs | |
88 | API documentation for libdigidocpp library. | |
89 | ||
90 | %description apidocs -l pl.UTF-8 | |
91 | Dokumentacja API biblioteki libdigidocpp. | |
919f854a ER |
92 | |
93 | %package -n perl-digidoc | |
ed0be3f9 JB |
94 | Summary: Perl bindings for libdigidocpp library |
95 | Summary(pl.UTF-8): Wiązania Perla do biblioteki libdigidocpp | |
96 | Group: Development/Languages/Perl | |
919f854a ER |
97 | Requires: %{name} = %{version}-%{release} |
98 | Provides: %{name}-perl = %{version}-%{release} | |
99 | Obsoletes: libdigidocpp-perl < 0.3.0-1 | |
100 | ||
101 | %description -n perl-digidoc | |
ed0be3f9 JB |
102 | Perl bindings for libdigidocpp library. |
103 | ||
104 | %description -n perl-digidoc -l pl.UTF-8 | |
105 | Wiązania Perla do biblioteki libdigidocpp. | |
919f854a ER |
106 | |
107 | %package -n php-digidoc | |
ed0be3f9 JB |
108 | Summary: PHP bindings for libdigidocpp library |
109 | Summary(pl.UTF-8): Wiązania PHP do biblioteki libdigidocpp | |
110 | Group: Development/Languages/PHP | |
919f854a ER |
111 | Requires: %{name} = %{version}-%{release} |
112 | %{?requires_php_extension} | |
113 | Provides: %{name}-php = %{version}-%{release} | |
114 | Obsoletes: libdigidocpp-php < 0.3.0-1 | |
115 | ||
116 | %description -n php-digidoc | |
ed0be3f9 JB |
117 | PHP bindings for libdigidocpp library. |
118 | ||
119 | %description -n php-digidoc -l pl.UTF-8 | |
120 | Wiązania PHP do biblioteki libdigidocpp. | |
919f854a ER |
121 | |
122 | %package -n python-digidoc | |
ed0be3f9 JB |
123 | Summary: Python bindings for libdigidocpp library |
124 | Summary(pl.UTF-8): Wiązania Pythona do biblioteki libdigidocpp | |
125 | Group: Development/Languages/Python | |
919f854a ER |
126 | Requires: %{name} = %{version}-%{release} |
127 | Provides: %{name}-python = %{version}-%{release} | |
128 | Obsoletes: libdigidocpp-python < 0.3.0-1 | |
129 | ||
130 | %description -n python-digidoc | |
ed0be3f9 JB |
131 | Python bindings for libdigidocpp library. |
132 | ||
133 | %description -n python-digidoc -l pl.UTF-8 | |
134 | Wiązania Pythona do biblioteki libdigidocpp. | |
919f854a ER |
135 | |
136 | %prep | |
6f450f53 | 137 | %setup -q |
ed0be3f9 | 138 | %patch0 -p1 |
919f854a ER |
139 | |
140 | # Remove bundled copy of minizip | |
ed0be3f9 | 141 | %{__rm} -r src/minizip |
919f854a ER |
142 | |
143 | %build | |
144 | install -d build | |
145 | cd build | |
146 | %cmake .. \ | |
ed0be3f9 JB |
147 | -DCMAKE_INSTALL_DOCDIR=%{_docdir}/%{name} |
148 | ||
919f854a ER |
149 | %{__make} |
150 | ||
151 | %install | |
152 | rm -rf $RPM_BUILD_ROOT | |
ed0be3f9 | 153 | |
919f854a ER |
154 | %{__make} -C build install \ |
155 | DESTDIR=$RPM_BUILD_ROOT | |
156 | ||
ed0be3f9 JB |
157 | # packaged as %doc |
158 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name} | |
159 | ||
919f854a ER |
160 | %clean |
161 | rm -rf $RPM_BUILD_ROOT | |
162 | ||
163 | %post -p /sbin/ldconfig | |
164 | %postun -p /sbin/ldconfig | |
165 | ||
166 | %files | |
167 | %defattr(644,root,root,755) | |
ed0be3f9 | 168 | %doc AUTHORS COPYING README.md RELEASE-NOTES.md |
919f854a ER |
169 | %dir %{_sysconfdir}/digidocpp |
170 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/digidocpp/digidocpp.conf | |
a38f41ba | 171 | # XXX ? |
6f450f53 | 172 | %{_sysconfdir}/digidocpp/878252.p12 |
919f854a | 173 | %{_sysconfdir}/digidocpp/schema |
a38f41ba | 174 | %attr(755,root,root) %{_libdir}/libdigidocpp.so.*.*.* |
6f450f53 | 175 | %ghost %attr(755,root,root) %{_libdir}/libdigidocpp.so.1 |
a38f41ba ER |
176 | %attr(755,root,root) %{_bindir}/digidoc-tool |
177 | %{_mandir}/man1/digidoc-tool.1* | |
178 | ||
919f854a ER |
179 | %files devel |
180 | %defattr(644,root,root,755) | |
ed0be3f9 | 181 | %attr(755,root,root) %{_libdir}/libdigidocpp.so |
919f854a | 182 | %{_includedir}/digidocpp |
a38f41ba | 183 | %{_pkgconfigdir}/libdigidocpp.pc |
919f854a | 184 | |
ed0be3f9 JB |
185 | %files apidocs |
186 | %defattr(644,root,root,755) | |
187 | %doc build/doc/* | |
188 | ||
919f854a ER |
189 | %if %{with perl} |
190 | %files -n perl-digidoc | |
191 | %defattr(644,root,root,755) | |
192 | %{perl_vendorarch}/* | |
193 | %{perl_vendorlib}/* | |
194 | %endif | |
195 | ||
196 | %if %{with php} | |
197 | %files -n php-digidoc | |
198 | %defattr(644,root,root,755) | |
6f450f53 | 199 | %{php_extensiondir}/* |
919f854a ER |
200 | %{php_data_dir}/* |
201 | %{_sysconfdir}/php.d/digidoc.ini | |
202 | %endif | |
203 | ||
204 | %if %{with python} | |
205 | %files -n python-digidoc | |
206 | %defattr(644,root,root,755) | |
207 | %{py_sitedir}/* | |
208 | %endif |