summaryrefslogtreecommitdiff
path: root/packaging/system-plugin-spreadtrum.spec
blob: 638e60038cad52c7badd0d79ed5253d57bfe8590 (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
97
98
99
100
101
102
103
104
###########################
# Default feature config. #
###########################
# SMACK
%define WITH_SMACK 0
%define WITH_BOOT_PARTITION 0
%define WITH_DEFAULT_SMACK_LABEL 1

Name: system-plugin-spreadtrum
Summary: system-plugin for spreadtrum system
Version: 0.1.01
Release: 0
License: Apache-2.0
Group: System/Base
%ifarch %{arm}
ExclusiveArch: %arm
%endif
Source: %{name}-%{version}.tar.gz
Source1001: %{name}.manifest

BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libattr
%if %{WITH_SMACK}
BuildRequires: libacl-devel
BuildRequires: smack-devel
%endif

Requires: e2fsprogs
Requires: /bin/grep
Requires: /usr/bin/awk
Requires: psmisc
Requires: system-plugin-common
Requires(post): coreutils

%description
Startup files

%prep
%setup -q

%build
cp %{SOURCE1001} .

aclocal
automake --add-missing
autoconf

%configure \
        --prefix=%{_prefix} \
%if %{WITH_SMACK}
        --enable-smack \
%endif
%if %{WITH_BOOT_PARTITION}
        --enable-boot-partition \
%endif
%if %{WITH_DEFAULT_SMACK_LABEL}
        --enable-default-smack-label \
%endif

make %{?_smp_mflags}

%install
%make_install

mkdir -p $RPM_BUILD_ROOT%{_datadir}/license
cat LICENSE > $RPM_BUILD_ROOT%{_datadir}/license/%{name}

# for z3 target booting
mkdir -p %{buildroot}/initrd

%post

%files
%defattr(-,root,root,-)
%{_datadir}/license/%{name}
%{_sysconfdir}/fstab
%{_sysconfdir}/machine-id
%{_bindir}/resize2fs_by_partlabel.sh
%{_libdir}/udev/rules.d/51-tizen-udev-spreadtrum.rules

# systemd service units
%{_libdir}/systemd/system/fsck@.service
%{_libdir}/systemd/system/resize2fs@.service
%{_libdir}/systemd/system/resize2fs-root.service
%{_libdir}/systemd/system/local-fs.target.wants/resize2fs-root.service

# systemd mount units
%{_libdir}/systemd/system/usr-share-locale.mount
%{_libdir}/systemd/system/local-fs.target.wants/usr-share-locale.mount
%if %{WITH_BOOT_PARTITION}
%{_sysconfdir}/systemd/system/boot.mount
%{_sysconfdir}/systemd/system/local-fs.target.wants/boot.mount
%endif
%{_sysconfdir}/systemd/system/csa.mount
%{_sysconfdir}/systemd/system/local-fs.target.wants/csa.mount
%{_sysconfdir}/systemd/system/opt-usr.mount
%{_sysconfdir}/systemd/system/local-fs.target.wants/opt-usr.mount
%{_sysconfdir}/systemd/system/opt.mount
%{_sysconfdir}/systemd/system/local-fs.target.wants/opt.mount
%manifest %{name}.manifest

# for z3 target booting
/initrd