summaryrefslogtreecommitdiff
path: root/packaging/osp-installer.spec
blob: fa5b181c3e24f34fa270fcb412644f78d4916ae8 (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
Name:		osp-installer
Summary:	osp application installer
Version:	1.2.1.0
Release:	2
Group:		TO_BE/FILLED_IN
License:	Apache License, Version 2.0 or Flora
Source0:	%{name}-%{version}.tar.gz
BuildRequires:  cmake
BuildRequires:  pkgconfig(capi-system-info)
BuildRequires:  pkgconfig(capi-system-device)
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(appsvc)
BuildRequires:  pkgconfig(pkgmgr)
BuildRequires:  pkgconfig(pkgmgr-parser)
BuildRequires:  pkgconfig(pkgmgr-info)
BuildRequires:  pkgconfig(app2sd)
BuildRequires:  pkgconfig(libwbxml2)
BuildRequires:  pkgconfig(osp-appfw)
BuildRequires:  pkgconfig(drm-service-core-intel)

BuildRequires:  osp-appfw-internal-devel

# runtime requires
Requires: osp-appfw
Requires: osp-loader  

%description
osp application installer

%prep
%setup -q

%build 
%ifarch %{ix86}
CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_OSP_X86_ -D_OSP_EMUL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
%else
CXXFLAGS="-O2 -g -pipe -Wall -fno-exceptions -Wformat -Wformat-security -Wl,--as-needed -fmessage-length=0 -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=neon -mfloat-abi=softfp -D__SOFTFP__ -mthumb -Wa,-mimplicit-it=thumb -funwind-tables -D_OSP_DEBUG_ -D_OSP_ARMEL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
%endif

# Call make instruction with smp support
make %{?jobs:-j%jobs}

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

%make_install

%post
/bin/rm -f /etc/ld.so.cache
/sbin/ldconfig

mkdir -p /usr/share/packages
mkdir -p /opt/share/packages
rm -rf /usr/etc/package-manager/backendlib/libtpk.so
ln -s /usr/lib/libosp-installer-plugin.so /usr/etc/package-manager/backendlib/libtpk.so
rm -rf /usr/etc/package-manager/backend/tpk
ln -s /usr/bin/osp-installer /usr/etc/package-manager/backend/tpk

%postun -p /sbin/ldconfig

%files
%manifest osp-installer.manifest
/usr/share/license/%{name}
/usr/bin/*
/usr/lib/*.so*