summaryrefslogtreecommitdiff
path: root/packaging/system-plugin-slp.spec
blob: 23ab5014bd1b67c0b708f388cb64a63f13eee5fc (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
Name:       system-plugin-slp
Summary:    system-plugin for Clean SDK
Version:    0.0.1
License:    Apache-2.0
Group: System/Base
Release: 64
ExclusiveArch: %arm
Source: %{name}-%{version}.tar.gz
BuildRequires: cmake
BuildRequires: perl
BuildRequires: pkgconfig(libudev)
Requires: udev
Requires: sysvinit

%description
Startup files

%prep
%setup -q

%build
cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DSYSCONFDIR=%{_sysconfdir}
make %{?_smp_mflags}
./mount-generator.pl etc/fstab usr/lib/systemd/system 

%install
%make_install

cp -a etc usr bin %{buildroot}

mkdir -p %{buildroot}/usr/lib/systemd/system/local-fs.target.wants
for mount in usr/lib/systemd/system/*.mount; do
    if grep -q '^Options[[:space:]]*=.*noauto' $mount; then continue; fi
    m=$(basename $mount)
    ln -s ../$m %{buildroot}/usr/lib/systemd/system/local-fs.target.wants/$m
done
mkdir -p %{buildroot}/%{_libdir}/systemd/system/local-fs.target.wants
ln -s ../resize2fs-root.service %{buildroot}/%{_libdir}/systemd/system/local-fs.target.wants

mkdir -p %{buildroot}/lib/modules

%files
/bin/with-dev-root-do
/etc/fstab
/etc/fta_version.txt
/etc/inittab
/etc/mtools.conf
/etc/rc.d/rc.firstboot
/etc/rc.d/rc.shutdown
/etc/rc.d/rc.sysinit
/usr/bin/save_blenv
/bin/check-booting-mode.sh
/usr/lib/systemd/system/resize2fs-root.service
/usr/lib/systemd/system/resize2fs@.service
/usr/lib/systemd/system/*.mount
/usr/lib/systemd/system/local-fs.target.wants/*.mount
/usr/lib/systemd/system/local-fs.target.wants/resize2fs-root.service
/lib/modules