desktop-base-openmamba/SRPMS/jre.pregpl/jre.spec.in

141 lines
4.3 KiB
RPMSpec
Raw Normal View History

2011-04-26 13:25:32 +02:00
Name: jre
Version: 0.9
Release: 1@distroext@
Epoch: 1
Summary: The Java Runtime Environment
Group: System/Libraries/Java
Vendor: @vendor@
Distribution: @distribution@
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://java.sun.com
Source0: java-profile
Source1: LICENSE
License: JAVA
Obsoletes: j2re
Provides: j2re = %{version}
AutoReqProv: no
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
The Java Runtime Environment consists of the Java virtual machine, the Java
platform core classes, and supporting files.
It is the runtime part of the Java SDK, but without the development tools
such as compilers and debuggers.
%prep
%setup -q -D -T -c
[ -r /etc/sysconfig/@sysconfigfile@ ] || exit 1
. /etc/sysconfig/@sysconfigfile@
[ -z "$JRE_URL" -o -z "$JRE_PCK" ] && exit 1
# get the file list available at %{URL}...
wget -nv --timeout=5 --tries=2 -c ${JRE_URL}/${JRE_PCK} || {
rm -f $JRE_PCK
wget -nv --timeout=5 --tries=2 --progress=bar ${JRE_URL}/${JRE_PCK};
}
#find . -name ${JRE_PCK}* -exec mv {} ${JRE_PCK} \;
%build
%install
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
[ -r /etc/sysconfig/@sysconfigfile@ ] || exit 1
. /etc/sysconfig/@sysconfigfile@
[ -z "$JRE_URL" -o -z "$JRE_PCK" ] && exit 1
install -d %{buildroot}%{_prefix}/java
pushd %{buildroot}%{_prefix}/java
MORE="-400" sh %{_builddir}/%{name}-%{version}/${JRE_PCK} << EOF
yes
EOF
popd
javapath="$(\
find %{buildroot}%{_prefix}/java/ -maxdepth 1 -name jre\* -type d | \
sed "s|^%{buildroot}||" 2>/dev/null)"
[ "$javapath" ] || exit 1
ln -s ${javapath} %{buildroot}%{_prefix}/java/jre
install -d %{buildroot}%{_sysconfdir}/profile.d
cp %{S:0} %{buildroot}%{_sysconfdir}/profile.d/java.sh
# see <http://www.java.com/it/download/help/5000010500.xml#install>
install -d %{buildroot}%{_libdir}/mozilla/plugins
ln -s %{_prefix}/java/jre/plugin/i386/ns${JRE_NSVER}/libjavaplugin_oji.so \
%{buildroot}%{_libdir}/mozilla/plugins
ln -s %{_prefix}/java/jre/plugin/i386/ns${JRE_NSVER}/libjavaplugin_oji.so \
%{buildroot}%{_libdir}/mozilla/plugins/libjavaplugin.so
#ln -s /usr/java/jre/plugin/i386/ns7-gcc29/libjavaplugin_oji.so \
# %{buildroot}%{_libdir}/mozilla/plugins
rm -rf %{buildroot}${javapath}/.systemPrefs
# get the list of the installed files
find %{buildroot}${javapath} \( -type f -or -type l \) | \
sed "s|^%{buildroot}||" > jrefiles.list
echo "%dir ${javapath}" >> jrefiles.list
%clean
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
%post
if [ $1 -eq 1 ]; then
# new install
if ! echo ${PATH} | grep -q /usr/java/jre/bin; then
export PATH="$PATH:/usr/java/jre/bin"
fi
fi
exit 0
%files -f jrefiles.list
%defattr(-,root,root)
%{_prefix}/java/jre
%{_libdir}/mozilla/plugins/libjavaplugin_oji.so
%{_libdir}/mozilla/plugins/libjavaplugin.so
%{_sysconfdir}/profile.d/java.sh
%changelog
* Fri Feb 02 2007 Davide Madrisan <davide.madrisan@qilinux.it> 0.9-1qilnx
- get download parameters from a sysconfig file
* Tue Oct 31 2006 Davide Madrisan <davide.madrisan@qilinux.it> 1.5.0-8qilnx
- specfile updated to donwload latest jre version (1.5.0_09)
* Wed Jul 12 2006 Davide Madrisan <davide.madrisan@qilinux.it> 1.5.0-7qilnx
- added "provides j2re" (needed by the limewire rpm)
* Mon Apr 03 2006 Davide Madrisan <davide.madrisan@qilinux.it> 1.5.0-6qilnx
- updated javaurl
* Thu Feb 02 2006 Davide Madrisan <davide.madrisan@qilinux.it> 1.5.0-5qilnx
- fixed symbolic link in %{_libdir}/mozilla/plugins
* Tue Aug 23 2005 Davide Madrisan <davide.madrisan@qilinux.it> 1.5.0-4qilnx
- specfile updates for last jre version (1.5.0_04)
* Thu Jul 07 2005 Silvan Calarco <silvan.calarco@qilinux.it> 1.5.0-3qilnx
- remove %{javapath}/.systemPrefs if found
* Wed Apr 20 2005 Silvan Calarco <silvan.calarco@qilinux.it> 1.5.0-2qilnx
- enable resume of download
- remove requirements and provides
* Wed Apr 20 2005 Silvan Calarco <silvan.calarco@qilinux.it> 1.5.0-1qilnx
- specfile for new jre version (1.5.0)
- added automatic download and build support (this is a non distributable package)
* Mon Jul 12 2004 Silvan Calarco <silvan.calarco@qilinux.it> 1.4.2-2qilnx
- create symlinks for browser plugins to /usr/lib/mozilla/plugins
* Mon Oct 13 2003 Silvan Calarco <silvan.calarco@qilinux.it> 1.4.2-1qilnx
- first build