diff options
author | u.harbuz <u.harbuz@samsung.com> | 2017-05-29 12:42:17 +0200 |
---|---|---|
committer | u.harbuz <u.harbuz@samsung.com> | 2017-06-27 15:58:38 +0200 |
commit | c2869247409cce7e02a139d9e735c860dce5e314 (patch) | |
tree | 664bbf0006bf0955cce70de06e54cb98723d2d7e | |
parent | 0e177cc136b971af11953a84e10f5489e5557579 (diff) | |
download | tef-optee_client-c2869247409cce7e02a139d9e735c860dce5e314.tar.gz tef-optee_client-c2869247409cce7e02a139d9e735c860dce5e314.tar.bz2 tef-optee_client-c2869247409cce7e02a139d9e735c860dce5e314.zip |
Add packaging.
Change-Id: I500d7bb7f45d64e4e7269e85ad5b40a7b43cedca
-rw-r--r-- | libteec/Makefile | 4 | ||||
-rw-r--r-- | packaging/optee-client.spec | 51 |
2 files changed, 53 insertions, 2 deletions
diff --git a/libteec/Makefile b/libteec/Makefile index 66055a7..5de229c 100644 --- a/libteec/Makefile +++ b/libteec/Makefile @@ -9,8 +9,8 @@ all: libteec ################################################################################ # Teec configuration ################################################################################ -MAJOR_VERSION := 1 -MINOR_VERSION := 0 +MAJOR_VERSION ?= 1 +MINOR_VERSION ?= 0 LIB_NAME := libteec.so LIB_MAJOR := $(LIB_NAME).$(MAJOR_VERSION) LIB_MAJ_MIN := $(LIB_NAME).$(MAJOR_VERSION).$(MINOR_VERSION) diff --git a/packaging/optee-client.spec b/packaging/optee-client.spec new file mode 100644 index 0000000..3b31ee9 --- /dev/null +++ b/packaging/optee-client.spec @@ -0,0 +1,51 @@ +%define major_version 2 +%define minor_version 4 + +Name: optee-client +Summary: Library for applications which use OPTEE functions. +Version: %{major_version}.%{minor_version} +Release: 1%{?dist} +Group: Security/Testing +License: BSD-2-Clause +URL: N/A +Source0: %{name}-%{version}.tar.gz +Provides: libteec + +BuildRequires: make + +%description +Library for applications which use OPTEE functions. + +%prep +%setup -q + +%build +make build CROSS_COMPILE="" MAJOR_VERSION=%{major_version} MINOR_VERSION=%{minor_version} + +%install +make CROSS_COMPILE="" MAJOR_VERSION=%{major_version} MINOR_VERSION=%{minor_version} DESTDIR=%{buildroot}/%{_prefix} install + +if [ "%{_libdir}" == "%{_exec_prefix}/lib64" ] +then + mkdir -p %{buildroot}/%{_libdir} + cp -f %{buildroot}/usr/lib/libteec.so* %{buildroot}/%{_libdir}/ + rm -rf %{buildroot}/usr/lib +fi + +rm -rf %{buildroot}%{_libdir}/debug + +%files +%defattr(-, root, root, -) +%{_bindir}/tee-supplicant +%{_libdir}/libteec.so* +%{_includedir}/tee_client_api.h +%{_includedir}/tee_client_api_extensions.h +%{_includedir}/teec_trace.h + +%post +ln -sf %{_libdir}/libteec.so.%{version} %{_libdir}/libteec.so.%{major_version} +ln -sf %{_libdir}/libteec.so.%{major_version} %{_libdir}/libteec.so + +/sbin/ldconfig + +%changelog |