From: Unsung Lee Date: Fri, 31 Mar 2023 02:44:45 +0000 (+0900) Subject: resourced.spec: Undo modification of light package X-Git-Tag: accepted/tizen/unified/20230613.170823~18 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6a493507d964637b89b5b6d69208189609de5e33;p=platform%2Fcore%2Fsystem%2Fresourced.git resourced.spec: Undo modification of light package This patch includes - Making a symbolic link from resourced to resourced.common - Adding a symbolic link in the light/bin package This patch undo part of commit 82b39f9c50adcf1d3dbd3bcb90db9eb1e2fe6427. Change-Id: I9ce3134a1ecc4861cae616fbe823c6fec98f89b9 Signed-off-by: Unsung Lee --- diff --git a/packaging/resourced.spec b/packaging/resourced.spec index ee41391..a618e63 100644 --- a/packaging/resourced.spec +++ b/packaging/resourced.spec @@ -42,8 +42,11 @@ BuildRequires: pkgconfig(capi-system-device) BuildRequires: pkgconfig(capi-system-resource) BuildRequires: pkgconfig(cmocka) BuildRequires: pkgconfig(libsyscommon) -BuildRequires: gperf +Requires(post): %{_sbindir}/update-alternatives +Requires(preun): %{_sbindir}/update-alternatives + +BuildRequires: gperf # for swap plugin Requires: %{_sbindir}/mkswap Requires: %{_bindir}/dd @@ -67,6 +70,8 @@ Requires: %{name}-watchdog-handler = %{version}-%{release} %package bin Summary: Resourced binary +Requires(post): %{_sbindir}/update-alternatives +Requires(preun): %{_sbindir}/update-alternatives %description bin %package private-api-devel @@ -117,7 +122,7 @@ pushd build -DRD_CONFIG_PATH=%{confdir} \ -DRD_PLUGIN_PATH=%{plugindir} \ -DRD_TESTS_PATH=%{_libdir}/resourced-tests \ - -DRD_BINARY_NAME=resourced \ + -DRD_BINARY_NAME=resourced.common \ %{?asan:-DASAN_BUILD=True} make %{?jobs:-j%jobs} @@ -131,6 +136,14 @@ mkdir -p %{buildroot}/%{TZ_SYS_GLOBALUSER_DATA}/heart mkdir -p %{buildroot}/%{TZ_SYS_GLOBALUSER_DB} popd +%post bin +%{_sbindir}/update-alternatives --install %{_bindir}/resourced %{name} %{_bindir}/resourced.common 100 + +%preun bin +if [ $1 -eq 0 ]; then + %{_sbindir}/update-alternatives --remove %{name} %{_bindir}/resourced.common +fi + %post config-tv mv %{confdir}/optimizer-profile-tv.conf %{confdir}/optimizer.conf @@ -150,8 +163,8 @@ mv %{confdir}/optimizer-profile-tv.conf %{confdir}/optimizer.conf %license LICENSE %manifest resourced.manifest %{_libdir}/libresourced-private-api.so.* -%{_bindir}/resourced -%attr(-,root, root) %{_bindir}/resourced +%ghost %{_bindir}/resourced +%attr(-,root, root) %{_bindir}/resourced.common %attr(700, root, root) %{TZ_SYS_ETC}/dump.d/module.d/dump_heart_data.sh %files config @@ -181,6 +194,7 @@ mv %{confdir}/optimizer-profile-tv.conf %{confdir}/optimizer.conf %files light %manifest resourced.manifest +%ghost %{_bindir}/resourced %files private-api-devel %manifest resourced.manifest