summaryrefslogtreecommitdiff
path: root/packaging/factory-reset.spec
blob: 0662111ebadb6a1eea9c9f8ef4dbc87d610655fb (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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
Name:       factory-reset
Summary:    factory-reset scripts and uitls
Version:    1.0
Release:    2
Group:      Applications/Core Applications
License:    Apache-2.0
Source0:    %{name}-%{version}.tar.gz
Source1:    factory-reset.service
Source2:    factory-reset-launch.service
Source3:    org.tizen.factory-reset.service
ExclusiveArch: %{arm}
BuildRequires: cmake
BuildRequires: pkgconfig(libsmack)
BuildRequires: pkgconfig(dbus-1)
BuildRequires: pkgconfig(dbus-glib-1)

Requires: util-linux
Requires: zip
Requires: /usr/bin/tar
Requires: unzip >= 6.0
Requires: /usr/bin/ps
Requires: /usr/bin/grep
Requires: /usr/bin/sleep
Requires: /usr/bin/mount
Requires: /usr/bin/umount
Requires: /usr/bin/md5sum
Requires: /usr/bin/expr
Requires: /usr/bin/tr
Requires: /usr/bin/awk
Requires: /usr/bin/zip

%description
Factory-reset is for returning the phone to the initial state. This makes the
data of the phone to the default state and (if required) writes default
preconfiguration
It would be not only called by testers after many kind of verification tests
but it also be called by Manufacture Steps for all products.

%prep
%setup -q

%build
%if 0%{?sec_product_feature_telephony_disable}
export CFLAGS+=" -DTELEPHONY_DISABLE"
%endif

%if 0%{?sec_product_feature_csc_disable}
export CFLAGS+=" -DCSC_DISABLE"
%endif

%if 0%{?sec_build_binary_debug_enable}
export CFLAGS+=" -DDEBUG_BINARY"
%endif

%if 0%{?sec_product_feature_security_mdfpp_enable}
export CFLAGS+=" -DTIZEN_CC"
%endif

cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DDISPLAY_RESOLUTION=%{sec_product_feature_display_resolution}

make %{?jobs:-j%jobs}


%install
rm -rf %{buildroot}
%make_install

mkdir -p %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants/
install -m 0644 %SOURCE1 %{buildroot}%{_libdir}/systemd/system/factory-reset.service
install -m 0644 %SOURCE2 %{buildroot}%{_libdir}/systemd/system/factory-reset-launch.service
ln -s ../factory-reset.service %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants/factory-reset.service
mkdir -p %{buildroot}%{_datadir}/dbus-1/system-services
install -m 0644 %SOURCE3 %{buildroot}%{_datadir}/dbus-1/system-services/org.tizen.factory-reset.service

%post

%postun


%files
%{_libdir}/systemd/system/factory-reset.service
%{_libdir}/systemd/system/factory-reset-launch.service
%{_libdir}/systemd/system/multi-user.target.wants/factory-reset.service
%license LICENSE
/etc/smack/accesses2.d/%{name}.rule
%attr(700,root,root) %{_bindir}/*.sh
%attr(755,root,root) %{_bindir}/rstsmack
%attr(744,root,root) %{_bindir}/factory-reset
%{_datadir}/dbus-1/system-services/org.tizen.factory-reset.service
%manifest factory-reset.manifest
%attr(110,root,root) /opt/etc/dump.d/module.d/dump-frlog.sh

%if 0%{?sec_product_feature_security_mdfpp_enable}
%attr(700,root,root) %{_bindir}/resetCCMode
%endif