Support parallel installation with other Vala versions
This commit is contained in:
parent
12a59588a7
commit
467f4085c4
115
vala.spec
115
vala.spec
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Name: vala
|
Name: vala
|
||||||
Version: 0.15.1
|
Version: 0.15.1
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: A modern programming language for GNOME
|
Summary: A modern programming language for GNOME
|
||||||
|
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
@ -22,14 +22,22 @@ BuildRequires: flex
|
|||||||
BuildRequires: bison
|
BuildRequires: bison
|
||||||
BuildRequires: glib2-devel
|
BuildRequires: glib2-devel
|
||||||
BuildRequires: libxslt
|
BuildRequires: libxslt
|
||||||
# only while we carry the patch
|
# only if Vala source files are patched
|
||||||
BuildRequires: vala
|
# BuildRequires: vala
|
||||||
|
|
||||||
# for Emacs modes
|
# for Emacs modes
|
||||||
BuildRequires: emacs emacs-el
|
BuildRequires: emacs emacs-el
|
||||||
|
|
||||||
# for tests
|
# for tests
|
||||||
BuildRequires: dbus-x11
|
# BuildRequires: dbus-x11
|
||||||
|
|
||||||
|
# alternatives
|
||||||
|
%global vala_binaries vala valac
|
||||||
|
%global vala_manpages valac
|
||||||
|
%global vala_tools_binaries vala-gen-introspect vapicheck vapigen
|
||||||
|
%global vala_tools_manpages vala-gen-introspect vapigen
|
||||||
|
Requires(post): %{_sbindir}/update-alternatives
|
||||||
|
Requires(postun): %{_sbindir}/update-alternatives
|
||||||
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -52,7 +60,6 @@ type system.
|
|||||||
Summary: Development files for %{name}
|
Summary: Development files for %{name}
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{name} = %{version}-%{release}
|
||||||
Requires: pkgconfig
|
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
Vala is a new programming language that aims to bring modern programming
|
Vala is a new programming language that aims to bring modern programming
|
||||||
@ -154,8 +161,21 @@ cp -p %{SOURCE3} COPYING
|
|||||||
%install
|
%install
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
make install DESTDIR=$RPM_BUILD_ROOT
|
make install DESTDIR=$RPM_BUILD_ROOT
|
||||||
|
# Makefile.vapigen somehow gets copied; bug authors
|
||||||
|
rm $RPM_BUILD_ROOT%{_datadir}/vala/Makefile.vapigen
|
||||||
|
# remove symlinks, using alternatives
|
||||||
|
for f in %{vala_binaries} %{vala_tools_binaries};
|
||||||
|
do
|
||||||
|
rm $RPM_BUILD_ROOT%{_bindir}/$f
|
||||||
|
touch $RPM_BUILD_ROOT%{_bindir}/$f
|
||||||
|
done
|
||||||
|
for f in %{vala_manpages} %{vala_tools_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
|
mkdir -p $RPM_BUILD_ROOT%{_datadir}/vala/vapi
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/libvala-%{api_ver}.la
|
rm $RPM_BUILD_ROOT%{_libdir}/libvala-%{api_ver}.la
|
||||||
|
|
||||||
# Emacs mode files
|
# Emacs mode files
|
||||||
@ -176,24 +196,77 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%post -p /sbin/ldconfig
|
%post
|
||||||
|
/sbin/ldconfig
|
||||||
|
for f in %{vala_binaries};
|
||||||
|
do
|
||||||
|
%{_sbindir}/update-alternatives --install %{_bindir}/$f \
|
||||||
|
$f %{_bindir}/$f-%{api_ver} 90
|
||||||
|
done
|
||||||
|
for f in %{vala_manpages};
|
||||||
|
do
|
||||||
|
%{_sbindir}/update-alternatives --install %{_mandir}/man1/$f.1.gz \
|
||||||
|
$f.1.gz %{_mandir}/man1/$f-%{api_ver}.1.gz 90
|
||||||
|
done
|
||||||
|
|
||||||
%postun -p /sbin/ldconfig
|
%post tools
|
||||||
|
for f in %{vala_tools_binaries};
|
||||||
|
do
|
||||||
|
%{_sbindir}/update-alternatives --install %{_bindir}/$f \
|
||||||
|
$f %{_bindir}/$f-%{api_ver} 90
|
||||||
|
done
|
||||||
|
for f in %{vala_tools_manpages};
|
||||||
|
do
|
||||||
|
%{_sbindir}/update-alternatives --install %{_mandir}/man1/$f.1.gz \
|
||||||
|
$f.1.gz %{_mandir}/man1/$f-%{api_ver}.1.gz 90
|
||||||
|
done
|
||||||
|
|
||||||
|
%postun
|
||||||
|
/sbin/ldconfig
|
||||||
|
if [ $1 -eq 0 ];
|
||||||
|
then
|
||||||
|
for f in %{vala_binaries};
|
||||||
|
do
|
||||||
|
%{_sbindir}/update-alternatives --remove $f \
|
||||||
|
%{_bindir}/$f-%{api_ver}
|
||||||
|
done
|
||||||
|
for f in %{vala_manpages};
|
||||||
|
do
|
||||||
|
%{_sbindir}/update-alternatives --remove $f.1.gz \
|
||||||
|
%{_mandir}/man1/$f-%{api_ver}.1.gz
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
%postun tools
|
||||||
|
if [ $1 -eq 0 ];
|
||||||
|
then
|
||||||
|
for f in %{vala_tools_binaries};
|
||||||
|
do
|
||||||
|
%{_sbindir}/update-alternatives --remove $f \
|
||||||
|
%{_bindir}/$f-%{api_ver}
|
||||||
|
done
|
||||||
|
for f in %{vala_tools_manpages};
|
||||||
|
do
|
||||||
|
%{_sbindir}/update-alternatives --remove $f.1.gz \
|
||||||
|
%{_mandir}/man1/$f-%{api_ver}.1.gz
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc AUTHORS ChangeLog COPYING INSTALL MAINTAINERS NEWS README THANKS
|
%doc AUTHORS ChangeLog COPYING INSTALL MAINTAINERS NEWS README THANKS
|
||||||
# TODO to support parallel installation, the symlinks in bin/ must be
|
%ghost %{_bindir}/vala
|
||||||
# migrated to use the alternatives system
|
%ghost %{_bindir}/valac
|
||||||
%{_bindir}/vala
|
|
||||||
%{_bindir}/valac
|
|
||||||
%{_bindir}/vala-%{api_ver}
|
%{_bindir}/vala-%{api_ver}
|
||||||
%{_bindir}/valac-%{api_ver}
|
%{_bindir}/valac-%{api_ver}
|
||||||
%{_datadir}/vala
|
# owning only the directories, they should be empty
|
||||||
|
%dir %{_datadir}/vala
|
||||||
|
%dir %{_datadir}/vala/vapi
|
||||||
%{_datadir}/vala-%{api_ver}
|
%{_datadir}/vala-%{api_ver}
|
||||||
%{_libdir}/libvala-%{api_ver}.so.*
|
%{_libdir}/libvala-%{api_ver}.so.*
|
||||||
%{_mandir}/*/valac*
|
%ghost %{_mandir}/man1/valac.1.gz
|
||||||
|
%{_mandir}/man1/valac-%{api_ver}.1.gz
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
@ -205,16 +278,19 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
|
|
||||||
%files tools
|
%files tools
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%{_bindir}/vala-gen-introspect
|
%ghost %{_bindir}/vala-gen-introspect
|
||||||
%{_bindir}/vapicheck
|
%ghost %{_bindir}/vapicheck
|
||||||
%{_bindir}/vapigen
|
%ghost %{_bindir}/vapigen
|
||||||
%{_bindir}/vala-gen-introspect-%{api_ver}
|
%{_bindir}/vala-gen-introspect-%{api_ver}
|
||||||
%{_bindir}/vapicheck-%{api_ver}
|
%{_bindir}/vapicheck-%{api_ver}
|
||||||
%{_bindir}/vapigen-%{api_ver}
|
%{_bindir}/vapigen-%{api_ver}
|
||||||
%{_libdir}/vala-%{api_ver}
|
%{_libdir}/vala-%{api_ver}
|
||||||
%{_datadir}/aclocal/vapigen.m4
|
%{_datadir}/aclocal/vapigen.m4
|
||||||
%{_datadir}/pkgconfig/vapigen*.pc
|
%{_datadir}/pkgconfig/vapigen*.pc
|
||||||
%{_mandir}/*/*gen*
|
%ghost %{_mandir}/man1/vala-gen-introspect.1.gz
|
||||||
|
%ghost %{_mandir}/man1/vapigen.1.gz
|
||||||
|
%{_mandir}/man1/vala-gen-introspect-%{api_ver}.1.gz
|
||||||
|
%{_mandir}/man1/vapigen-%{api_ver}.1.gz
|
||||||
|
|
||||||
%files doc
|
%files doc
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
@ -233,6 +309,9 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Feb 3 2012 Michel Salim <salimma@fedoraproject.org> - 0.15.1-2
|
||||||
|
- Support parallel installation with other Vala versions
|
||||||
|
|
||||||
* Mon Jan 30 2012 Michel Salim <salimma@fedoraproject.org> - 0.15.1-1
|
* Mon Jan 30 2012 Michel Salim <salimma@fedoraproject.org> - 0.15.1-1
|
||||||
- Update to 0.15.1
|
- Update to 0.15.1
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user