Drop the alternatives system
We haven't made use of it in a long while and it is just making the spec file more complicated than it needs be.
This commit is contained in:
parent
894bbe8987
commit
749bcb7507
71
vala.spec
71
vala.spec
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
Name: vala
|
Name: vala
|
||||||
Version: 0.43.90
|
Version: 0.43.90
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: A modern programming language for GNOME
|
Summary: A modern programming language for GNOME
|
||||||
|
|
||||||
# Most files are LGPLv2.1+, curses.vapi is 2-clause BSD
|
# Most files are LGPLv2.1+, curses.vapi is 2-clause BSD
|
||||||
@ -23,11 +23,10 @@ BuildRequires: libxslt
|
|||||||
# for tests
|
# for tests
|
||||||
BuildRequires: dbus-x11
|
BuildRequires: dbus-x11
|
||||||
|
|
||||||
# alternatives
|
# alternatives; remove in F32
|
||||||
%global vala_binaries vala valac vala-gen-introspect vapigen
|
%global vala_binaries vala valac vala-gen-introspect vapigen
|
||||||
%global vala_manpages valac vala-gen-introspect vapigen
|
%global vala_manpages valac vala-gen-introspect vapigen
|
||||||
Requires(posttrans): %{_sbindir}/alternatives
|
Requires(pre): %{_sbindir}/alternatives
|
||||||
Requires(preun): %{_sbindir}/alternatives
|
|
||||||
|
|
||||||
Requires: libvala%{?_isa} = %{version}-%{release}
|
Requires: libvala%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
@ -138,17 +137,7 @@ make %{?_smp_mflags}
|
|||||||
|
|
||||||
%install
|
%install
|
||||||
%make_install
|
%make_install
|
||||||
# remove symlinks, using alternatives
|
|
||||||
for f in %{vala_binaries}
|
|
||||||
do
|
|
||||||
rm $RPM_BUILD_ROOT%{_bindir}/$f
|
|
||||||
touch $RPM_BUILD_ROOT%{_bindir}/$f
|
|
||||||
done
|
|
||||||
for f in %{vala_manpages}
|
|
||||||
do
|
|
||||||
rm $RPM_BUILD_ROOT%{_mandir}/man1/$f.1*
|
|
||||||
touch $RPM_BUILD_ROOT%{_mandir}/man1/$f.1.gz
|
|
||||||
done
|
|
||||||
# own this directory for third-party *.vapi files
|
# own this directory for third-party *.vapi files
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_datadir}/vala/vapi
|
mkdir -p $RPM_BUILD_ROOT%{_datadir}/vala/vapi
|
||||||
find %{buildroot} -name '*.la' -exec rm -f {} ';'
|
find %{buildroot} -name '*.la' -exec rm -f {} ';'
|
||||||
@ -158,40 +147,29 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';'
|
|||||||
make check
|
make check
|
||||||
|
|
||||||
|
|
||||||
%posttrans
|
# Drop the pre script in F32
|
||||||
for f in %{vala_binaries};
|
%pre
|
||||||
do
|
if [ $1 -gt 1 ] ; then
|
||||||
%{_sbindir}/alternatives --install %{_bindir}/$f \
|
for f in %{vala_binaries};
|
||||||
$f %{_bindir}/$f-%{api_ver} %{priority} || :
|
do
|
||||||
done
|
%{_sbindir}/alternatives --remove-all $f >& /dev/null || :
|
||||||
for f in %{vala_manpages};
|
done
|
||||||
do
|
for f in %{vala_manpages};
|
||||||
%{_sbindir}/alternatives --install %{_mandir}/man1/$f.1.gz \
|
do
|
||||||
$f.1.gz %{_mandir}/man1/$f-%{api_ver}.1.gz %{priority} || :
|
%{_sbindir}/alternatives --remove-all $f.1.gz >& /dev/null || :
|
||||||
done
|
done
|
||||||
|
fi
|
||||||
%preun
|
|
||||||
for f in %{vala_binaries};
|
|
||||||
do
|
|
||||||
%{_sbindir}/alternatives --remove $f \
|
|
||||||
%{_bindir}/$f-%{api_ver} || :
|
|
||||||
done
|
|
||||||
for f in %{vala_manpages};
|
|
||||||
do
|
|
||||||
%{_sbindir}/alternatives --remove $f.1.gz \
|
|
||||||
%{_mandir}/man1/$f-%{api_ver}.1.gz || :
|
|
||||||
done
|
|
||||||
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%license COPYING
|
%license COPYING
|
||||||
%ghost %{_bindir}/vala
|
%{_bindir}/vala
|
||||||
%ghost %{_bindir}/valac
|
|
||||||
%ghost %{_bindir}/vala-gen-introspect
|
|
||||||
%ghost %{_bindir}/vapigen
|
|
||||||
%{_bindir}/vala-%{api_ver}
|
%{_bindir}/vala-%{api_ver}
|
||||||
|
%{_bindir}/valac
|
||||||
%{_bindir}/valac-%{api_ver}
|
%{_bindir}/valac-%{api_ver}
|
||||||
|
%{_bindir}/vala-gen-introspect
|
||||||
%{_bindir}/vala-gen-introspect-%{api_ver}
|
%{_bindir}/vala-gen-introspect-%{api_ver}
|
||||||
|
%{_bindir}/vapigen
|
||||||
%{_bindir}/vapigen-%{api_ver}
|
%{_bindir}/vapigen-%{api_ver}
|
||||||
%{_libdir}/pkgconfig/vapigen*.pc
|
%{_libdir}/pkgconfig/vapigen*.pc
|
||||||
%{_libdir}/vala-%{api_ver}/
|
%{_libdir}/vala-%{api_ver}/
|
||||||
@ -199,11 +177,11 @@ done
|
|||||||
%{_datadir}/aclocal/vapigen.m4
|
%{_datadir}/aclocal/vapigen.m4
|
||||||
%{_datadir}/vala/
|
%{_datadir}/vala/
|
||||||
%{_datadir}/vala-%{api_ver}/
|
%{_datadir}/vala-%{api_ver}/
|
||||||
%ghost %{_mandir}/man1/valac.1.gz
|
%{_mandir}/man1/valac.1.gz
|
||||||
%ghost %{_mandir}/man1/vala-gen-introspect.1.gz
|
|
||||||
%ghost %{_mandir}/man1/vapigen.1.gz
|
|
||||||
%{_mandir}/man1/valac-%{api_ver}.1.gz
|
%{_mandir}/man1/valac-%{api_ver}.1.gz
|
||||||
|
%{_mandir}/man1/vala-gen-introspect.1.gz
|
||||||
%{_mandir}/man1/vala-gen-introspect-%{api_ver}.1.gz
|
%{_mandir}/man1/vala-gen-introspect-%{api_ver}.1.gz
|
||||||
|
%{_mandir}/man1/vapigen.1.gz
|
||||||
%{_mandir}/man1/vapigen-%{api_ver}.1.gz
|
%{_mandir}/man1/vapigen-%{api_ver}.1.gz
|
||||||
|
|
||||||
%files -n libvala
|
%files -n libvala
|
||||||
@ -234,6 +212,9 @@ done
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Feb 12 2019 Kalev Lember <klember@redhat.com> - 0.43.90-2
|
||||||
|
- Drop the alternatives system
|
||||||
|
|
||||||
* Mon Feb 04 2019 Kalev Lember <klember@redhat.com> - 0.43.90-1
|
* Mon Feb 04 2019 Kalev Lember <klember@redhat.com> - 0.43.90-1
|
||||||
- Update to 0.43.90
|
- Update to 0.43.90
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user