summaryrefslogtreecommitdiff
path: root/packaging/smack-privilege-config.spec
blob: 520d24c1ba2b47a6c1c98cd14514d598cae829f8 (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
Name:       smack-privilege-config
Summary:    SMACK rules for libprivilege
Version:    1.0.5.TIZEN
Release:    1
Group:      System/Security
License:    Apache 2.0
Source0:    %{name}-%{version}.tar.gz
Source1:    %{name}.manifest
BuildRequires: cmake
Requires:   /usr/bin/chsmack

%description
SMACK rules package to control privilege of in-house application

%prep
%setup -q

%build
%cmake . -DCMAKE_BUILD_TYPE=%{?build_type:%build_type}

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

%post

if [ ! -e "/usr/share/privilege-control" ]
then
    mkdir -p /usr/share/privilege-control/
fi

if [ ! -e "/opt/etc/smack-app/accesses.d" ]
then
    mkdir -p /opt/etc/smack-app/accesses.d
fi

%files
%{_datarootdir}/privilege-control/*
/opt/etc/smack/*
%{_datadir}/license/%{name}
%manifest %{_datadir}/%{name}.manifest