fd8cb9585074b4d083e5c0c8a98224b891ae03bc
[platform/core/security/libcryptsvc.git] / packaging / libcryptsvc.spec
1 Name:      libcryptsvc
2 Summary:    Crypto Service Library
3 Version:    0.0.1
4 Release:    6
5 Group:      Security/Libraries
6 License:    Apache-2.0
7 Source0:    %{name}-%{version}.tar.gz
8 Source1001: libcryptsvc.manifest
9 BuildRequires: cmake
10 BuildRequires: pkgconfig(dlog)
11 BuildRequires: pkgconfig(openssl)
12 BuildRequires: pkgconfig(capi-system-info)
13 BuildRequires:  pkgconfig(libtzplatform-config)
14
15 %description
16 Crypto Service Library.
17
18 %package devel
19 Summary:    Crypto Service Library (Development)
20 Group:      Security/Libraries
21 Requires: %{name} = %{version}-%{release}
22
23 %description devel
24 Crypto Service Library (Development).
25
26 %prep
27 %setup -q
28 cp %{SOURCE1001} .
29
30 %build
31 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
32 %ifarch %ix86 x86_64
33 %cmake . -DARCH=x86 \
34 %else
35 %cmake . -DARCH=arm \
36 %endif
37     -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DDESCRIPTION="%{summary}" \
38     -DTZ_SYS_ETC=%TZ_SYS_ETC
39
40 make %{?jobs:-j%jobs}
41
42 %install
43 %make_install
44
45
46 %post -p /sbin/ldconfig
47
48 %postun -p /sbin/ldconfig
49
50 %files
51 %manifest %{name}.manifest
52 %license  LICENSE.APLv2
53 %{_libdir}/*.so*
54 %attr(755,root,root) %{TZ_SYS_ETC}/duid-gadget
55
56 %files devel
57 %manifest %{name}.manifest
58 %{_includedir}/*
59 %{_libdir}/pkgconfig/cryptsvc.pc