Migrate to openssl 1.1
[platform/core/security/yaca.git] / packaging / yaca.spec
1 Name:               yaca
2 Version:            0.0.3
3 Release:            0
4 Source0:            %{name}-%{version}.tar.gz
5 License:            Apache-2.0
6 Group:              Security/Other
7 Summary:            Yet Another Crypto API
8 BuildRequires:      cmake
9 BuildRequires:      python3 >= 3.4
10 BuildRequires:      pkgconfig(capi-base-common)
11 BuildRequires:      pkgconfig(openssl1.1)
12 Requires(post):     /sbin/ldconfig
13 Requires(postun):   /sbin/ldconfig
14
15 %description
16 The package provides Yet Another Crypto API.
17
18 %post -p /sbin/ldconfig
19
20 %postun -p /sbin/ldconfig
21
22 %files
23 %license LICENSE
24 %manifest yaca.manifest
25 %{_libdir}/libyaca.so.0
26 %{_libdir}/libyaca.so.%{version}
27
28 %prep
29 %setup -q
30
31 %build
32 %{!?build_type:%define build_type "RELEASE"}
33
34 %cmake . -DCMAKE_BUILD_TYPE=%{build_type}
35 make -k %{?jobs:-j%jobs}
36
37 %install
38 %make_install
39 %py3_compile %{buildroot}/%{python3_sitelib}
40
41 %clean
42 rm -rf %{buildroot}
43
44 ## Devel Package ###############################################################
45 %package devel
46 Summary:        Yet Another Crypto API development files
47 Group:          Security/Other
48 Requires:       yaca = %{version}-%{release}
49
50 %description devel
51 The package provides Yet Another Crypto API development files.
52
53 %files devel
54 %{_libdir}/libyaca.so
55 %{_includedir}/yaca
56 %{_libdir}/pkgconfig/yaca.pc
57
58 ## Examples Package ############################################################
59 %package examples
60 Summary:        Yet Another Crypto API example files
61 Group:          Security/Other
62 Requires:       yaca = %{version}-%{release}
63
64 %description examples
65 The package provides Yet Another Crypto API example files.
66
67 %files examples
68 %{_bindir}/yaca-example*
69 %{_datadir}/%{name}/examples
70
71 ## Python3 Package ############################################################
72 %package -n python3-yaca
73 Summary:        Yet Another Crypto API Python3 bindings
74 Group:          Security/Other
75 Requires:       yaca = %{version}-%{release}
76
77 %description -n python3-yaca
78 The package provides Yet Another Crypto API bindings for Python3.
79
80 %files -n python3-yaca
81 %{python3_sitelib}/%{name}