]>
Commit | Line | Data |
---|---|---|
836673a2 ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with static_libs # build static libraries | |
4 | ||
46d7d535 AM |
5 | Summary: XAdES digital signature standard library |
6 | Name: libdigidoc | |
d0abbd71 ER |
7 | Version: 3.10.2 |
8 | Release: 1 | |
836673a2 | 9 | License: LGPL v2+ |
46d7d535 | 10 | Group: Libraries |
d0abbd71 ER |
11 | Source0: https://github.com/open-eid/libdigidoc/releases/download/v%{version}/%{name}-%{version}.tar.gz |
12 | # Source0-md5: 987a21c44a8b627794b6f810bf15465f | |
13 | URL: https://github.com/open-eid/libdigidoc | |
836673a2 | 14 | BuildRequires: cmake |
46d7d535 AM |
15 | BuildRequires: libxml2-devel |
16 | BuildRequires: openssl-devel | |
836673a2 | 17 | BuildRequires: zlib-devel |
d0abbd71 | 18 | Requires: ca-certificates |
46d7d535 AM |
19 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
20 | ||
46d7d535 AM |
21 | %description |
22 | DigiDoc is a generic library implementing the XAdES digital signature | |
23 | standard. It allows to create, sign, verify, and modify digidoc XML | |
24 | containers. Support for doing hardware cryptographic signing | |
25 | operations is porivded via PKCS#11. | |
26 | ||
27 | %package devel | |
28 | Summary: Header files and development documentation for libdigidoc | |
29 | Group: Development/Libraries | |
560d8d0c | 30 | Requires: %{name} = %{version}-%{release} |
46d7d535 AM |
31 | |
32 | %description devel | |
33 | Header files and development documentation for libdigidoc. | |
34 | ||
35 | %package static | |
36 | Summary: Static libdigidoc library | |
37 | Group: Development/Libraries | |
560d8d0c | 38 | Requires: %{name}-devel = %{version}-%{release} |
46d7d535 AM |
39 | |
40 | %description static | |
41 | Static libdigidoc library. | |
42 | ||
43 | %prep | |
44 | %setup -q | |
45 | ||
46 | %build | |
836673a2 ER |
47 | install -d build |
48 | cd build | |
49 | %cmake .. | |
50 | %{__make} | |
46d7d535 AM |
51 | |
52 | %install | |
53 | rm -rf $RPM_BUILD_ROOT | |
836673a2 | 54 | %{__make} -C build install \ |
46d7d535 AM |
55 | DESTDIR=$RPM_BUILD_ROOT |
56 | ||
d0abbd71 ER |
57 | # certs come from ca-certificates package |
58 | rm -r $RPM_BUILD_ROOT%{_datadir}/%{name}/*.crt | |
59 | ||
46d7d535 AM |
60 | %clean |
61 | rm -rf $RPM_BUILD_ROOT | |
62 | ||
63 | %post -p /sbin/ldconfig | |
64 | %postun -p /sbin/ldconfig | |
65 | ||
66 | %files | |
67 | %defattr(644,root,root,755) | |
d0abbd71 | 68 | %doc AUTHORS README.md RELEASE-NOTES.txt |
46d7d535 | 69 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/digidoc.conf |
836673a2 ER |
70 | %attr(755,root,root) %{_libdir}/%{name}.so.*.* |
71 | %attr(755,root,root) %ghost %{_libdir}/%{name}.so.2 | |
72 | %attr(755,root,root) %{_bindir}/cdigidoc | |
260d025c | 73 | %{_mandir}/man1/cdigidoc.1* |
46d7d535 AM |
74 | |
75 | %files devel | |
d0abbd71 | 76 | %defattr(644,root,root,755) |
260d025c | 77 | %doc doc/* |
46d7d535 | 78 | %defattr(644,root,root,755) |
836673a2 | 79 | %attr(755,root,root) %{_libdir}/%{name}.so |
46d7d535 AM |
80 | %{_includedir}/%{name} |
81 | %{_pkgconfigdir}/%{name}.pc | |
82 | ||
836673a2 | 83 | %if %{with static_libs} |
46d7d535 AM |
84 | %files static |
85 | %defattr(644,root,root,755) | |
86 | %{_libdir}/libdigidoc.a | |
836673a2 | 87 | %endif |