packaging: Do not create symboic links in /bin and /sbin 10/209710/1
authorWook Song <wook16.song@samsung.com>
Wed, 10 Jul 2019 04:50:14 +0000 (13:50 +0900)
committerWook Song <wook16.song@samsung.com>
Wed, 10 Jul 2019 06:20:47 +0000 (15:20 +0900)
Since the 'filesystem' package creates /bin and /sbin as symbolic links
to /usr/bin and /usr/sbin, respectively, in Tizen, it is unnecessary
that toybox creates symbolic links in /bin and /sbin by itself.

Change-Id: Ic9b799a3f1de48b5ddaa1815ab82d9adfea70871
Signed-off-by: Wook Song <wook16.song@samsung.com>
packaging/bin.links [deleted file]
packaging/sbin.links [deleted file]
packaging/toybox.spec

diff --git a/packaging/bin.links b/packaging/bin.links
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/packaging/sbin.links b/packaging/sbin.links
deleted file mode 100644 (file)
index e69de29..0000000
index d52e4d3..67ebf39 100644 (file)
@@ -7,8 +7,6 @@ License: BSD-2.0
 URL: http://www.landley.net/toybox/
 Source: %{name}-%{version}.tar.bz2
 Source1: config
-Source2: bin.links
-Source3: sbin.links
 Source4: usrbin.links
 Source5: usrsbin.links
 Source11: config-full
@@ -98,38 +96,36 @@ cp toybox toybox-dynamic-full
 
 %install
 rm -rf $RPM_BUILD_ROOT
-mkdir -p $RPM_BUILD_ROOT/bin
-mkdir -p $RPM_BUILD_ROOT/sbin
-install -m 755 toybox-dynamic      $RPM_BUILD_ROOT/bin/toybox
-install -m 755 toybox-dynamic-full $RPM_BUILD_ROOT/bin/toybox-full
+mkdir -p $RPM_BUILD_ROOT/%{_bindir}
+mkdir -p $RPM_BUILD_ROOT/%{_sbindir}
+install -m 755 toybox-dynamic      $RPM_BUILD_ROOT/%{_bindir}/toybox
+install -m 755 toybox-dynamic-full $RPM_BUILD_ROOT/%{_bindir}/toybox-full
 
 # debian/toybox.links
 pushd %{buildroot}
-mkdir -p usr/bin usr/sbin sbin
-cd bin
-for f in `cat %SOURCE2` ; do ln -s toybox $f ; done
-cd ../sbin
-for f in `cat %SOURCE3` ; do ln -s ../bin/toybox $f ; done
-cd ../usr/bin
-for f in `cat %SOURCE4` ; do ln -s ../../bin/toybox $f ; done
-cd ../../usr/sbin
-for f in `cat %SOURCE5` ; do ln -s ../../bin/toybox $f ; done
+mkdir -p usr/bin usr/sbin
+pushd usr/bin
+for f in `cat %SOURCE4` ; do ln -s toybox $f ; done
+popd
+pushd usr/sbin
+for f in `cat %SOURCE5` ; do ln -s ../bin/toybox $f ; done
+popd
 popd
 
 %post full
-/bin/toybox-full ln -s /bin/toybox-full /bin/toybox
+%{_bindir}/toybox-full ln -s %{_bindir}/toybox-full %{_bindir}/toybox
 
 %files
 %manifest toybox.manifest
 %license LICENSE.BSD
 %defattr(-,root,root,-)
-/bin/toybox
+%{_bindir}/toybox
 
 %files full
 %manifest toybox.manifest
 %license LICENSE.BSD
 %defattr(-,root,root,-)
-/bin/toybox-full
+%{_bindir}/toybox-full
 
 %files symlinks-full
 %manifest toybox.manifest