change bin file position to /usr/bin/hal 77/254077/2
authorJunkyeong Kim <jk0430.kim@samsung.com>
Tue, 23 Feb 2021 06:59:17 +0000 (15:59 +0900)
committerJunkyeong Kim <jk0430.kim@samsung.com>
Thu, 11 Mar 2021 04:30:09 +0000 (04:30 +0000)
Change-Id: Iec5ed001b0d78b4c17c962902b87192941998b07
Signed-off-by: Junkyeong Kim <jk0430.kim@samsung.com>
packaging/libtbm.spec

index ff2018f..d37d182 100644 (file)
@@ -81,10 +81,10 @@ LDFLAGS+=" -lgcov"
 %endif
 
 %if %{with wayland}
-%reconfigure --prefix=%{_prefix} --with-tbm-platform=WAYLAND  --with-haltests=${HALTESTS} \
+%reconfigure --prefix=%{_prefix} --with-tbm-platform=WAYLAND  --with-haltests=${HALTESTS} --bindir=%{_bindir}/hal \
             CFLAGS="${CFLAGS} -Wall -Werror" LDFLAGS="${LDFLAGS} -Wl,--hash-style=both -Wl,--as-needed"
 %else
-%reconfigure --prefix=%{_prefix} --with-tbm-platform=X11  --with-haltests=${HALTESTS} \
+%reconfigure --prefix=%{_prefix} --with-tbm-platform=X11  --with-haltests=${HALTESTS} --bindir=%{_bindir}/hal \
             CFLAGS="${CFLAGS} -Wall -Werror" LDFLAGS="${LDFLAGS} -Wl,--hash-style=both -Wl,--as-needed"
 %endif
 
@@ -119,7 +119,14 @@ rm -rf %{buildroot}
 %__mkdir_p %{_unitdir_user}/basic.target.wants
 ln -sf ../tbm-drm-auth-user.path %{_unitdir_user}/basic.target.wants/
 
-%post -p /sbin/ldconfig
+%post
+%if "%{HALTESTS_PACKAGE}" == "1"
+if [ -f %{_bindir}/tbm-haltests ]; then
+    rm -f %{_bindir}/tbm-haltests
+fi
+ln -s %{_bindir}/hal/tbm-haltests %{_bindir}/tbm-haltests
+%endif
+
 %postun -p /sbin/ldconfig
 rm -f %{_unitdir_user}/basic.target.wants/tbm-drm-auth-user.path
 
@@ -143,7 +150,7 @@ rm -f %{_unitdir_user}/basic.target.wants/tbm-drm-auth-user.path
 %if "%{HALTESTS_PACKAGE}" == "1"
 %files haltests
 %defattr(-,root,root,-)
-%{_bindir}/tbm-haltests
+%{_bindir}/hal/tbm-haltests
 %endif
 
 %if 0%{?gcov:1}