summaryrefslogtreecommitdiff
path: root/packaging/ttrace-extension.spec
blob: 216c76a5793b5e355c0264b77e4e918e30d8fd3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
Name:		ttrace-extension
Summary:    T-trace extension package
Version:	1.0.0
Release:    1
Group:      System/Libraries
License:    Apache-2.0
Source0:    %{name}-%{version}.tar.gz

BuildRequires: cmake
BuildRequires: pkgconfig(capi-base-common)

%define keepstatic 1

%define TTRACE_PROFILE none
%if "%{?tizen_profile_name}" == "mobile"
%define TTRACE_PROFILE mobile
%else
%if "%{?tizen_profile_name}" == "tv"
%define TTRACE_PROFILE tv
%else
%if "%{?tizen_profile_name}" == "wearable"
%define TTRACE_PROFILE wearable
%endif
%endif
%endif

%define TTRACE_TIZEN_VERSION_MAJOR 2
%if "%{?tizen_version_major}" == "3"
%define TTRACE_TIZEN_VERSION_MAJOR 3
%endif

%description
T-trace extension library

%package devel
Summary:    T-trace extension for tizen
Group:      Development/Libraries
Requires:   %{name} = %{version}-%{release}

%description devel
T-trace extension library devel

%prep
%setup -q

%build
export CFLAGS="$CFLAGS -g -Wall -std=gnu99"
export CXXFLAGS="$CXXFLAGS -std=c++0x -fPIE -pie"
%cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DLIBDIR=%{_libdir} -DINCLUDEDIR=%{_includedir} \
      -DTTRACE_PROFILE=%{TTRACE_PROFILE} -DTTRACE_TIZEN_VERSION_MAJOR=%{TTRACE_TIZEN_VERSION_MAJOR}
make %{?jobs:-j%jobs}

%install
rm -rf %{buildroot}
%make_install
mkdir -p %{buildroot}/usr/share/license
cp LICENSE %{buildroot}/usr/share/license/%{name}

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%files
%manifest ttrace-extension.manifest
%defattr(-,root,root,-)
%{_libdir}/libttrace-extension.so.*
/usr/share/license/%{name}

%files devel
%defattr(-,root,root,-)
%{_includedir}/ttrace-extension.h
%{_libdir}/libttrace-extension.so
%{_libdir}/libttrace-extension.a
%{_libdir}/pkgconfig/ttrace-extension.pc
%{_libdir}/pkgconfig/ttrace-extension-static.pc