]> git.pld-linux.org Git - packages/libdigidocpp.git/blame - libdigidocpp.spec
up to 3.12.3, new SONAME: libdigidocpp.so.1
[packages/libdigidocpp.git] / libdigidocpp.spec
CommitLineData
919f854a
ER
1#
2# Conditional build:
3%bcond_without perl # perl module
4%bcond_without php # php module
5%bcond_without python # python module
17b72937 6%bcond_with bindings # build bindings
919f854a
ER
7
8%if %{without bindings}
9%undefine with_perl
10%undefine with_php
11%undefine with_python
12%endif
13
14Summary: Library for creating and validating BDoc and DDoc containers
15Name: libdigidocpp
6f450f53 16Version: 3.12.3
a38f41ba 17Release: 1
919f854a
ER
18License: LGPL v2+
19Group: Libraries
6f450f53
ER
20Source0: https://github.com/open-eid/libdigidocpp/releases/download/v%{version}/%{name}-%{version}.tar.gz
21# Source0-md5: deead245114c60c3afe7c4a3b3c81060
22URL: https://github.com/open-eid/libdigidocpp
919f854a 23BuildRequires: cmake
a38f41ba 24BuildRequires: libdigidoc-devel >= 3.9
919f854a
ER
25BuildRequires: libp11-devel
26BuildRequires: minizip-devel
27BuildRequires: openssl-devel
6f450f53 28BuildRequires: rpmbuild(macros) >= 1.583
919f854a
ER
29BuildRequires: xml-security-c-devel
30BuildRequires: xsd
919f854a
ER
31%if %{with perl} || %{with php} || %{with python}
32BuildRequires: swig
33%endif
34%if %{with perl}
35BuildRequires: perl-devel
36%endif
37%if %{with php}
38BuildRequires: php-devel >= 4:5.0.4
39%endif
40%if %{with python}
41BuildRequires: python-devel
42%endif
a38f41ba 43Requires: libdigidoc >= 3.9
919f854a 44Requires: opensc
a38f41ba 45BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
919f854a 46
6f450f53
ER
47# missing -lpthread, -lxalan-c, etc
48%define skip_post_check_so libdigidocpp.so.%{version}
49
919f854a
ER
50%description
51libdigidocpp is a C++ library for reading, validating, and creating
52BDoc and DDoc containers. These file formats are widespread in Estonia
53where they are used for storing legally binding digital signatures.
54
55%package devel
56Summary: Development files for %{name}
57Group: Development/Libraries
58Requires: %{name} = %{version}-%{release}
59Requires: libdigidoc-devel
60Requires: libp11-devel
61Requires: openssl-devel
62Requires: xml-security-c-devel
63Requires: xsd
64
65%description devel
66The %{name}-devel package contains libraries and header files for
67developing applications that use %{name}.
68
69%package -n perl-digidoc
70Summary: Perl bindings for %{name}
71Group: Development/Languages
72Requires: %{name} = %{version}-%{release}
73Provides: %{name}-perl = %{version}-%{release}
74Obsoletes: libdigidocpp-perl < 0.3.0-1
75
76%description -n perl-digidoc
77The perl-digidoc package contains Perl bindings for the %{name}
78library.
79
80%package -n php-digidoc
81Summary: PHP bindings for %{name}
82Group: Development/Languages
83Requires: %{name} = %{version}-%{release}
84%{?requires_php_extension}
85Provides: %{name}-php = %{version}-%{release}
86Obsoletes: libdigidocpp-php < 0.3.0-1
87
88%description -n php-digidoc
89The php-digidoc package contains PHP bindings for the %{name} library.
90
91%package -n python-digidoc
92Summary: Python bindings for %{name}
93Group: Development/Languages
94Requires: %{name} = %{version}-%{release}
95Provides: %{name}-python = %{version}-%{release}
96Obsoletes: libdigidocpp-python < 0.3.0-1
97
98%description -n python-digidoc
99The python-digidoc package contains Python bindings for the %{name}
100library.
101
102%prep
6f450f53 103%setup -q
919f854a
ER
104
105# Remove bundled copy of minizip
a38f41ba 106rm -r src/minizip
6f450f53
ER
107# Remove bundled openssl
108rm -r src/openssl
919f854a
ER
109
110%build
111install -d build
112cd build
113%cmake .. \
114 %{!?with_bindings:-DENABLE_BINDINGS=NO}
115%{__make}
116
117%install
118rm -rf $RPM_BUILD_ROOT
119%{__make} -C build install \
120 DESTDIR=$RPM_BUILD_ROOT
121
122%clean
123rm -rf $RPM_BUILD_ROOT
124
125%post -p /sbin/ldconfig
126%postun -p /sbin/ldconfig
127
128%files
129%defattr(644,root,root,755)
6f450f53 130%doc AUTHORS README.md RELEASE-NOTES.txt
919f854a
ER
131%dir %{_sysconfdir}/digidocpp
132%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/digidocpp/digidocpp.conf
a38f41ba 133# XXX ?
6f450f53 134%{_sysconfdir}/digidocpp/878252.p12
919f854a 135%{_sysconfdir}/digidocpp/schema
a38f41ba 136%attr(755,root,root) %{_libdir}/libdigidocpp.so.*.*.*
6f450f53 137%ghost %attr(755,root,root) %{_libdir}/libdigidocpp.so.1
a38f41ba
ER
138%attr(755,root,root) %{_bindir}/digidoc-tool
139%{_mandir}/man1/digidoc-tool.1*
140
919f854a
ER
141%files devel
142%defattr(644,root,root,755)
a38f41ba 143%{_libdir}/libdigidocpp.so
919f854a 144%{_includedir}/digidocpp
a38f41ba 145%{_pkgconfigdir}/libdigidocpp.pc
919f854a
ER
146
147%if %{with perl}
148%files -n perl-digidoc
149%defattr(644,root,root,755)
150%{perl_vendorarch}/*
151%{perl_vendorlib}/*
152%endif
153
154%if %{with php}
155%files -n php-digidoc
156%defattr(644,root,root,755)
6f450f53 157%{php_extensiondir}/*
919f854a
ER
158%{php_data_dir}/*
159%{_sysconfdir}/php.d/digidoc.ini
160%endif
161
162%if %{with python}
163%files -n python-digidoc
164%defattr(644,root,root,755)
165%{py_sitedir}/*
166%endif
This page took 0.100813 seconds and 4 git commands to generate.