Tizen 2.0 Release
[adaptation/system-plugin-slp.git] / packaging / system-plugin-slp.spec
index c674256..23ab501 100755 (executable)
@@ -1,11 +1,14 @@
 Name:       system-plugin-slp
 Summary:    system-plugin for Clean SDK
 Version:    0.0.1
-License:    TO BE FILLED IN
+License:    Apache-2.0
 Group: System/Base
-Release: 60
+Release: 64
 ExclusiveArch: %arm
 Source: %{name}-%{version}.tar.gz
+BuildRequires: cmake
+BuildRequires: perl
+BuildRequires: pkgconfig(libudev)
 Requires: udev
 Requires: sysvinit
 
@@ -16,29 +19,40 @@ Startup files
 %setup -q
 
 %build
+cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DSYSCONFDIR=%{_sysconfdir}
+make %{?_smp_mflags}
+./mount-generator.pl etc/fstab usr/lib/systemd/system 
 
 %install
-rm -rf %{buildroot}
+%make_install
 
-mkdir -p %{buildroot}
 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/change-booting-mode.sh
+/bin/with-dev-root-do
 /etc/fstab
-/etc/init.d/csa-tools
+/etc/fta_version.txt
 /etc/inittab
-/etc/mdev.conf
 /etc/mtools.conf
-/etc/rc.d/rc5.d/S99zzzbackup_csa
 /etc/rc.d/rc.firstboot
 /etc/rc.d/rc.shutdown
 /etc/rc.d/rc.sysinit
-/usr/bin/mount_slp.sh
 /usr/bin/save_blenv
-/lib/udev/rules.d/99-serial-console.rules
-/lib/systemd/system/mnt-csc.automount
-/lib/systemd/system/local-fs.target.wants/mnt-csc.automount
-
+/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