forked from pool/schily
Migrate from update-alternatives to libalternatives #2
@@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 17 03:59:20 UTC 2026 - Marius Grossu <marius.grossu@suse.com>
|
||||
|
||||
- Migrate from update-alternatives to libalternatives
|
||||
(bsc#1245915), (bsc#1245916)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 27 21:35:22 UTC 2025 - Martin Jambor <mjambor@suse.com>
|
||||
|
||||
|
||||
73
schily.spec
73
schily.spec
@@ -41,6 +41,7 @@ Source1: README-FIRST
|
||||
Patch1: iconv-name.diff
|
||||
Patch2: schily-2018-05-25_star_configuration.patch
|
||||
Patch3: 81.patch
|
||||
BuildRequires: alts
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: gcc-c++
|
||||
@@ -104,8 +105,7 @@ write BluRay media on a BluRay recorder.
|
||||
Summary: A program to generate tag files for ex/vi
|
||||
License: BSD-2-Clause AND CDDL-1.0 AND GPL-2.0-only AND GPL-2.0-or-later AND BSD-3-Clause AND HPND AND ISC
|
||||
Group: Development/Tools/Building
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
Requires: alts
|
||||
|
||||
%description ctags
|
||||
Ctags makes a tags file for ex(1) from the specified C, Pascal,
|
||||
@@ -362,8 +362,7 @@ Group: Productivity/Archiving/Backup
|
||||
Provides: mt
|
||||
Obsoletes: star-rmt
|
||||
Provides: star-rmt:/usr/bin/smt
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
Conflicts: mt
|
||||
|
||||
%description mt
|
||||
The mt/smt program sends commands to a local or a remote magnetic
|
||||
@@ -376,8 +375,7 @@ Group: Productivity/Archiving/Backup
|
||||
Provides: rmt
|
||||
Obsoletes: star-rmt
|
||||
Provides: star-rmt:/usr/bin/srmt
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
Conflicts: rmt
|
||||
|
||||
%description rmt
|
||||
rmt is a program that can be used by e.g. star and ufsdump
|
||||
@@ -543,7 +541,8 @@ mv -v "$b/%_bindir/ctags" "$b/%_bindir/ctags-schily"
|
||||
cp -v ctags/vctags.1 "$b/%_mandir/man1/"
|
||||
|
||||
# mt/rmt
|
||||
rm -fv "$b/%_bindir/mt" # handled up u-a
|
||||
ln -sv srmt "$b/%_bindir/rmt"
|
||||
ln -sv smt "$b/%_bindir/mt"
|
||||
ln -sv smt.1 "$b/%_mandir/man1/mt.1"
|
||||
ln -sv srmt.1 "$b/%_mandir/man1/rmt.1"
|
||||
|
||||
@@ -661,6 +660,16 @@ rm -Rfv \
|
||||
# Remove documentation (will be added in %_datadir/doc/packages/*)
|
||||
#rm -Rf "$b/%_datadir/doc"/*
|
||||
|
||||
# alternatives configuration directories
|
||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/ctags
|
||||
ln -sf %{_bindir}/alts %{buildroot}%{_bindir}/ctags
|
||||
# ctags implementation (schily)
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/ctags/15.conf <<EOF
|
||||
binary=%{_bindir}/vctags
|
||||
man=vctags.1
|
||||
group=ctags
|
||||
EOF
|
||||
|
||||
%fdupes -s %buildroot/%_prefix
|
||||
|
||||
%check
|
||||
@@ -676,42 +685,10 @@ true
|
||||
%set_permissions %_bindir/cdda2wav
|
||||
true
|
||||
|
||||
%post ctags
|
||||
"%_sbindir/update-alternatives" \
|
||||
--install "%_bindir/ctags" ctags "%_bindir/ctags-schily" 20
|
||||
"%_sbindir/update-alternatives" --auto ctags
|
||||
|
||||
%postun ctags
|
||||
if test "$1" = 0; then
|
||||
"%_sbindir/update-alternatives" --remove ctags "%_bindir/ctags-schily"
|
||||
fi
|
||||
|
||||
%post -n readcd
|
||||
%set_permissions %_bindir/readcd
|
||||
true
|
||||
|
||||
%post mt
|
||||
"%_sbindir/update-alternatives" \
|
||||
--install "%_bindir/mt" mt "%_bindir/smt" 10 \
|
||||
--slave "%_mandir/man1/mt.1%ext_man" "mt.1%ext_man" "%_mandir/man1/smt.1%ext_man"
|
||||
"%_sbindir/update-alternatives" --auto mt
|
||||
|
||||
%postun mt
|
||||
if test "$1" = 0; then
|
||||
"%_sbindir/update-alternatives" --remove mt "%_bindir/smt"
|
||||
fi
|
||||
|
||||
%post rmt
|
||||
"%_sbindir/update-alternatives" \
|
||||
--install "%_bindir/rmt" rmt "%_bindir/srmt" 10 \
|
||||
--slave "%_mandir/man1/rmt.1%ext_man" "rmt.1%ext_man" "%_mandir/man1/srmt.1%ext_man"
|
||||
"%_sbindir/update-alternatives" --auto rmt
|
||||
|
||||
%postun rmt
|
||||
if test "$1" = 0; then
|
||||
"%_sbindir/update-alternatives" --remove rmt "%_bindir/srmt"
|
||||
fi
|
||||
|
||||
%ldconfig_scriptlets -n libcdrdeflt1_0
|
||||
%ldconfig_scriptlets -n libdeflt1_0
|
||||
%ldconfig_scriptlets -n libedc_ecc1_0
|
||||
@@ -784,9 +761,13 @@ fi
|
||||
|
||||
%files ctags
|
||||
%license CDDL.Schily.txt
|
||||
%{_bindir}/ctags
|
||||
%_bindir/ctags-schily
|
||||
%_bindir/vctags
|
||||
%_mandir/man1/vctags.1*
|
||||
%dir %{_datadir}/libalternatives/
|
||||
%dir %{_datadir}/libalternatives/ctags/
|
||||
%{_datadir}/libalternatives/ctags/15.conf
|
||||
|
||||
%files -n libcdrdeflt1_0
|
||||
%license CDDL.Schily.txt
|
||||
@@ -1016,22 +997,20 @@ fi
|
||||
|
||||
%files -n schily-mt
|
||||
%license CDDL.Schily.txt
|
||||
%{_bindir}/mt
|
||||
%_bindir/smt
|
||||
%_mandir/man1/smt.1*
|
||||
%ghost %_sysconfdir/alternatives/mt
|
||||
%ghost %_sysconfdir/alternatives/mt.1%ext_man
|
||||
%ghost %_mandir/man1/mt.1%ext_man
|
||||
%_mandir/man1/mt.1%ext_man
|
||||
%_mandir/man1/smt.1%ext_man
|
||||
|
||||
%files -n schily-rmt
|
||||
%license CDDL.Schily.txt
|
||||
%config(noreplace) %_sysconfdir/default/rmt
|
||||
%_docdir/rmt/
|
||||
%_docdir/schily-rmt
|
||||
%{_bindir}/rmt
|
||||
%_bindir/srmt
|
||||
%_mandir/man1/srmt.1*
|
||||
%ghost %_sysconfdir/alternatives/rmt
|
||||
%ghost %_sysconfdir/alternatives/rmt.1%ext_man
|
||||
%ghost %_mandir/man1/rmt.1%ext_man
|
||||
%_mandir/man1/rmt.1%ext_man
|
||||
%_mandir/man1/srmt.1%ext_man
|
||||
|
||||
%files -n smake
|
||||
%_bindir/smake
|
||||
|
||||
Reference in New Issue
Block a user