This commit is contained in:
Per Øyvind Karlsen (proyvind) 2013-02-25 14:41:41 +01:00
parent 7867ee35dc
commit 39827edf8a

View file

@ -1,6 +1,5 @@
# actually, plugin should advertise itself as 1.2pre # actually, plugin should advertise itself as 1.2pre
%define custom .1 %define custom .1
#define snapshot 89eb20442421
%ifarch %{ix86} x86_64 %ifarch %{ix86} x86_64
%define javaver 1.7.0 %define javaver 1.7.0
@ -36,16 +35,11 @@ Summary: Additional Java components for OpenJDK
Group: Networking/WWW Group: Networking/WWW
License: LGPLv2+ and GPLv2 with exceptions License: LGPLv2+ and GPLv2 with exceptions
URL: http://icedtea.classpath.org/wiki/IcedTea-Web URL: http://icedtea.classpath.org/wiki/IcedTea-Web
%if !%{defined snapshot}
Source0: http://icedtea.classpath.org/download/source/%{name}-%{version}.tar.gz Source0: http://icedtea.classpath.org/download/source/%{name}-%{version}.tar.gz
%else
# http://icedtea.classpath.org/hg/icedtea-web/archive/%{snapshot}.tar.gz
Source0: icedtea-web-%{snapshot}.tar.gz
%endif
BuildRequires: desktop-file-utils BuildRequires: desktop-file-utils
BuildRequires: glib2-devel BuildRequires: pkgconfig(glib-2.0)
BuildRequires: gtk2-devel BuildRequires: pkgconfig(gtk+-2.0)
%ifarch %{ix86} x86_64 %ifarch %{ix86} x86_64
BuildRequires: java-%{javaver}-openjdk-devel BuildRequires: java-%{javaver}-openjdk-devel
@ -53,13 +47,13 @@ BuildRequires: java-%{javaver}-openjdk-devel
BuildRequires: java-%{javaver}-openjdk-devel >= 1.6.0.0-18.b22 BuildRequires: java-%{javaver}-openjdk-devel >= 1.6.0.0-18.b22
%endif %endif
BuildRequires: xulrunner-devel BuildRequires: pkgconfig(mozilla-plugin)
BuildRequires: zip BuildRequires: zip
BuildRequires: zlib-devel BuildRequires: pkgconfig(zlib)
Requires: java-%{javaver}-openjdk Requires: java-%{javaver}-openjdk
Requires(post): update-alternatives Requires(post): update-alternatives
Requires(postun): update-alternatives Requires(postun):update-alternatives
# Standard JPackage plugin provides. # Standard JPackage plugin provides.
Provides: java-plugin = %{javaver} Provides: java-plugin = %{javaver}
@ -81,11 +75,11 @@ of Java Web Start (originally based on the Netx project) and a settings tool to
manage deployment settings for the aforementioned plugin and Web Start manage deployment settings for the aforementioned plugin and Web Start
implementations. implementations.
%package javadoc %package javadoc
Summary: API documentation for IcedTea-Web Summary: API documentation for IcedTea-Web
Group: Networking/WWW Group: Networking/WWW
Requires: jpackage-utils Requires: jpackage-utils
%if %mdkversion >= 201010 %if %{mdkversion} >= 201010
BuildArch: noarch BuildArch: noarch
%endif %endif
@ -93,45 +87,33 @@ BuildArch: noarch
This package contains Javadocs for the IcedTea-Web project. This package contains Javadocs for the IcedTea-Web project.
%prep %prep
%if %{defined snapshot} %setup -q
%setup -q -n %{name}-%{snapshot}
%else
%setup -q
%endif
#patch0 -p1 #patch0 -p1
#patch1 -p1 #patch1 -p1
%patch2 -p1 -b .nogtk~ %patch2 -p1 -b .nogtk~
%if !%{defined snapshot} # ugly hack to make it work on 2009.0/mes5 (pcpa)
%if %mdkversion < 201000 sed -e 's|AC_CANONICAL_HOST||;' -i configure.*
# ugly hack to make it work on 2009.0/mes5 (pcpa) autoreconf -fi
perl -pi -e 's|AC_CANONICAL_HOST||;' configure.*
autoreconf -fi
%endif
%else
sh autogen.sh
%endif
%build %build
%configure2_5x \ %configure2_5x \
--with-pkgversion=mandriva-%{release}-%{_arch} \ --with-pkgversion=%{_vendor}-%{release}-%{_arch} \
--docdir=%{_javadocdir}/%{name} \ --docdir=%{_javadocdir}/%{name} \
--with-jdk-home=%{javadir} \ --with-jdk-home=%{javadir} \
--with-jre-home=%{jredir} \ --with-jre-home=%{jredir} \
--libdir=%{_libdir} \ --program-suffix=%{binsuffix}
--program-suffix=%{binsuffix} \
--prefix=%{_prefix}
make CXXFLAGS="%{optflags}" %make CXXFLAGS="%{optflags}"
%install %install
%makeinstall_std %makeinstall_std
# Move javaws man page to a more specific name # Move javaws man page to a more specific name
mv %{buildroot}/%{_mandir}/man1/javaws.1 %{buildroot}/%{_mandir}/man1/javaws-itweb.1 mv %{buildroot}%{_mandir}/man1/javaws.1 %{buildroot}%{_mandir}/man1/javaws-itweb.1
# Install desktop files. # Install desktop files.
install -d -m 755 %{buildroot}%{_datadir}/{applications,pixmaps} install -d -m755 %{buildroot}%{_datadir}/{applications,pixmaps}
cp javaws.png %{buildroot}%{_datadir}/pixmaps cp javaws.png %{buildroot}%{_datadir}/pixmaps
desktop-file-install --vendor ''\ desktop-file-install --vendor ''\
--dir %{buildroot}%{_datadir}/applications javaws.desktop --dir %{buildroot}%{_datadir}/applications javaws.desktop
@ -167,8 +149,7 @@ fi
exit 0 exit 0
%files %files
%defattr(-,root,root,-) %{_bindir}/*
%{_prefix}/bin/*
%{_libdir}/IcedTeaPlugin.so %{_libdir}/IcedTeaPlugin.so
%{_datadir}/applications/* %{_datadir}/applications/*
%{_datadir}/icedtea-web %{_datadir}/icedtea-web
@ -177,6 +158,5 @@ exit 0
%doc NEWS README COPYING %doc NEWS README COPYING
%files javadoc %files javadoc
%defattr(-,root,root,-) %{_javadocdir}/%{name}
%{_datadir}/javadoc/%{name}
%doc COPYING %doc COPYING