Accepting request 204154 from devel:libraries:c_c++
- fix update-alternatives usage - Add update-alternatives rules to db48-utils (bnc#840738) OBS-URL: https://build.opensuse.org/request/show/204154 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libdb-4_8?expand=0&rev=21
This commit is contained in:
commit
4bd85b331f
@ -1,3 +1,13 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 21 13:05:38 UTC 2013 - coolo@suse.com
|
||||
|
||||
- fix update-alternatives usage
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 8 16:27:57 UTC 2013 - jengelh@inai.de
|
||||
|
||||
- Add update-alternatives rules to db48-utils (bnc#840738)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 23 07:30:46 UTC 2013 - coolo@suse.com
|
||||
|
||||
|
@ -54,6 +54,7 @@ Summary: Command Line tools for Managing Berkeley DB Databases
|
||||
Group: Productivity/Databases/Tools
|
||||
Provides: db-utils = %{version}
|
||||
Obsoletes: db-utils < %{version}
|
||||
PreReq: update-alternatives
|
||||
|
||||
%description -n db48-utils
|
||||
The Berkeley DB Database is a programmatic toolkit that provides
|
||||
@ -173,9 +174,14 @@ mv %{buildroot}/%{docdir}/collections/tutorial %{buildroot}/%{docdir}/
|
||||
rm -rf %{buildroot}%{_libdir}/*.la
|
||||
rm -rf %{buildroot}%{_libdir}/tls/*.la
|
||||
|
||||
for i in archive checkpoint deadlock dump hotbackup load printlog \
|
||||
recover sql stat upgrade verify; do
|
||||
mv "%buildroot/%_bindir/db_$i" "%buildroot/%_bindir/db48_$i"
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||
|
||||
%define util_list archive checkpoint deadlock dump hotbackup load printlog recover sql stat upgrade verify
|
||||
for i in %util_list; do
|
||||
# dummy
|
||||
touch "%{buildroot}%{_sysconfdir}/alternatives/db_$i"
|
||||
mv "%buildroot/%_bindir/db_$i" "%buildroot/%_bindir/db48_$i"
|
||||
ln -s "%{_sysconfdir}/alternatives/db_$i" "%{buildroot}%_bindir/db_$i"
|
||||
done
|
||||
|
||||
%fdupes %{buildroot}%{_libdir}
|
||||
@ -185,6 +191,17 @@ done
|
||||
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%post -n db48-utils
|
||||
for i in %util_list; do
|
||||
"%_sbindir/update-alternatives" --install "%_bindir/db_$i" \
|
||||
"db_$i" "%_bindir/db48_$i" 48
|
||||
done
|
||||
|
||||
%postun -n db48-utils
|
||||
for i in %util_list; do
|
||||
"%_sbindir/update-alternatives" --remove "db_$i" "%_bindir/db_$i"
|
||||
done
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%{_libdir}/libdb-%{major}.%{minor}.so
|
||||
@ -208,18 +225,20 @@ done
|
||||
|
||||
%files -n db48-utils
|
||||
%defattr(-,root,root)
|
||||
%{_bindir}/db48_archive
|
||||
%{_bindir}/db48_checkpoint
|
||||
%{_bindir}/db48_deadlock
|
||||
%{_bindir}/db48_dump
|
||||
%{_bindir}/db48_hotbackup
|
||||
%{_bindir}/db48_load
|
||||
%{_bindir}/db48_printlog
|
||||
%{_bindir}/db48_recover
|
||||
%{_bindir}/db48_sql
|
||||
%{_bindir}/db48_stat
|
||||
%{_bindir}/db48_upgrade
|
||||
%{_bindir}/db48_verify
|
||||
%_bindir/db48_*
|
||||
%ghost %{_sysconfdir}/alternatives/db_archive
|
||||
%ghost %{_sysconfdir}/alternatives/db_checkpoint
|
||||
%ghost %{_sysconfdir}/alternatives/db_deadlock
|
||||
%ghost %{_sysconfdir}/alternatives/db_dump
|
||||
%ghost %{_sysconfdir}/alternatives/db_hotbackup
|
||||
%ghost %{_sysconfdir}/alternatives/db_load
|
||||
%ghost %{_sysconfdir}/alternatives/db_printlog
|
||||
%ghost %{_sysconfdir}/alternatives/db_recover
|
||||
%ghost %{_sysconfdir}/alternatives/db_sql
|
||||
%ghost %{_sysconfdir}/alternatives/db_stat
|
||||
%ghost %{_sysconfdir}/alternatives/db_upgrade
|
||||
%ghost %{_sysconfdir}/alternatives/db_verify
|
||||
%_bindir/db_*
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
|
Loading…
Reference in New Issue
Block a user