[openmamba-devel-it] java sun 1.5
gil
puntogil a libero.it
Dom 5 Lug 2009 15:45:07 CEST
ciao
sto provando un po maldestramente a impostare gli alternatives di
avete qualche suggerimento?
grazie
%pre
if [ $1 -ge 1 ]; then
for b in javac jar; do
/usr/sbin/update-alternatives --remove $b%{MAJOR} \
%{java_prefix}/jdk-sun-%{major}/bin/$b%{MAJOR} 2>/dev/null
done
fi
exit 0
%post
if [ $1 -ge 1 ]; then
if ! echo ${PATH} | grep -q
%{java_prefix}/jre-%{origin}-%{major}/bin; then
export PATH="$PATH:%{java_prefix}/jre-%{origin}-%{major}/bin"
fi
for b in javac jar; do
[ -L /usr/bin/$b%{MAJOR} -a "`readlink /usr/bin/$b%{MAJOR}`" !=
"/etc/alternatives/$b%{MAJOR}" ] &&
rm -f /usr/bin/$b%{MAJOR}
/usr/sbin/update-alternatives \
--install %{_bindir}/$b $b%{MAJOR} \
%{java_prefix}/jdk-sun-%{major}/bin/$b%{MAJOR} 90
/usr/sbin/update-alternatives \
--install %{java_prefix}/jdk-%{major} jdk-%{major} \
%{java_prefix}/jdk-%{origin}-%{major} 90
/usr/sbin/update-alternatives \
--install %{_jvmjardir}/jdk-%{major}
jdk-%{major}-exports \
%{_jvmjardir}/jdk-%{origin}-%{major} 90
done
fi
exit 0
%preun
if [ $1 -eq 0 ]; then
for b in javac jar; do
/usr/sbin/update-alternatives --remove $b%{MAJOR} \
%{java_prefix}/jdk-sun-%{major}/bin/$b%{MAJOR}
done
/usr/sbin/update-alternatives --remove jdk-%{major} \
%{java_prefix}/jdk-%{origin}-%{major}
/usr/sbin/update-alternatives --remove jdk-%{major}-exports \
%{_jvmjardir}/jdk-%{origin}-%{major}
fi
exit 0
%post runtime
if ! echo ${PATH} | grep -q %{java_prefix}/jre-%{origin}-%{major}/bin; then
export PATH="$PATH: %{java_prefix}/jre-%{origin}-%{major}/bin"
fi
exit 0
%preun runtime
if [ $1 -eq 0 ]; then
/usr/sbin/update-alternatives --remove java \
%{java_prefix}/jre-%{origin}-%{major}/bin/java
/usr/sbin/update-alternatives --remove jre-%{origin}-%{major} \
%{java_prefix}/jre-%{origin}-%{major}
/usr/sbin/update-alternatives --remove jre-%{major}-exports \
%{_jvmjardir}/jre-%{origin}-%{major}
fi
exit 0
-------------- parte successiva --------------
Un allegato non testuale è stato rimosso....
Nome: puntogil.vcf
Tipo: text/x-vcard
Dimensione: 49 bytes
Descrizione: non disponibile
URL: <http://tao/pipermail/openmamba-devel-it/attachments/20090705/280e1e0c/attachment.vcf>
Maggiori informazioni sulla lista
openmamba-devel-it