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