merge with master
[adaptation/ap_samsung/system-plugin-slp.git] / packaging / system-plugin-slp.spec
1 Name:       system-plugin-slp
2 Summary:    system-plugin for Clean SDK
3 Version:    0.0.1
4 License:    Apache-2.0
5 Group: System/Base
6 Release: 62
7 ExclusiveArch: %arm
8 Source: %{name}-%{version}.tar.gz
9 BuildRequires: cmake
10 BuildRequires: perl
11 BuildRequires: pkgconfig(libudev)
12 Requires: udev
13 Requires: sysvinit
14
15 %description
16 Startup files
17
18 %prep
19 %setup -q
20
21 %build
22 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DSYSCONFDIR=%{_sysconfdir}
23 make %{?_smp_mflags}
24 ./mount-generator.pl etc/fstab usr/lib/systemd/system 
25
26 %install
27 %make_install
28
29 cp -a etc usr bin %{buildroot}
30
31 mkdir -p %{buildroot}/usr/lib/systemd/system/local-fs.target.wants
32 for mount in usr/lib/systemd/system/*.mount; do
33     if grep -q '^Options[[:space:]]*=.*noauto' $mount; then continue; fi
34     m=$(basename $mount)
35     ln -s ../$m %{buildroot}/usr/lib/systemd/system/local-fs.target.wants/$m
36 done
37 mkdir -p %{buildroot}/%{_libdir}/systemd/system/local-fs.target.wants
38 ln -s ../resize2fs-root.service %{buildroot}/%{_libdir}/systemd/system/local-fs.target.wants
39
40 mkdir -p %{buildroot}/lib/modules
41
42 %files
43 /bin/with-dev-root-do
44 /etc/fstab
45 /etc/fta_version.txt
46 /etc/inittab
47 /etc/mtools.conf
48 /etc/rc.d/rc.firstboot
49 /etc/rc.d/rc.shutdown
50 /etc/rc.d/rc.sysinit
51 /usr/bin/save_blenv
52 /bin/check-booting-mode.sh
53 /usr/lib/systemd/system/resize2fs-root.service
54 /usr/lib/systemd/system/resize2fs@.service
55 /usr/lib/systemd/system/*.mount
56 /usr/lib/systemd/system/local-fs.target.wants/*.mount
57 /usr/lib/systemd/system/local-fs.target.wants/resize2fs-root.service
58 /lib/modules