Blob Blame History Raw
%global basever 1.22.13

Name:		freewrl
Version:	%{basever}.1
Release:	8%{?dist}
Summary:	X3D / VRML visualization program
Group:		Applications/Internet
License:	LGPLv3+
URL:		http://freewrl.sourceforge.net
Source0:	http://sourceforge.net/projects/freewrl/files/freewrl-linux/1.22/%{name}-%{version}.tar.bz2
Source1:	README.FreeWRL.java
BuildRequires:	zlib-devel, freetype-devel, fontconfig-devel 
BuildRequires:	imlib2-devel, nspr-devel, xulrunner-devel, js-devel
BuildRequires:	expat-devel, libXxf86vm-devel, libX11-devel, libXext-devel
BuildRequires:	mesa-libGL-devel, mesa-libGLU-devel, glew-devel, libxml2-devel
BuildRequires:	libjpeg-devel, libpng-devel, java-devel, unzip, wget
BuildRequires:	ImageMagick, desktop-file-utils, chrpath
BuildRequires:	libXaw-devel, libXmu-devel
BuildRequires:	liblo-devel, libcurl-devel
BuildRequires:	sox, firefox
Requires:	sox, unzip, wget, ImageMagick

%description
FreeWRL is an X3D / VRML visualization program. This package contains the
standalone commandline tool.

%package devel
Summary:	Development files for FreeWRL
Group:		Development/Libraries
Requires:	freewrl%{?_isa} = %{version}-%{release}
Requires:	pkgconfig

%description devel
Development libraries and headers for FreeWRL.

%package java
Summary:	Java support for FreeWRL
Group:		System Environment/Libraries
Requires:	java
Requires:	freewrl%{?_isa} = %{version}-%{release}

%description java
Java support for FreeWRL.

%package -n libEAI
Summary:	FreeWRL EAI C support library
Group:		System Environment/Libraries

%description -n libEAI
FreeWRL EAI C support library.

%package -n libEAI-devel
Summary:	Development files for libEAI
Requires:	libEAI%{?_isa} = %{version}-%{release}
Group:		Development/Libraries

%description -n libEAI-devel
Development libraries and headers for libEAI.

%package plugin
Summary:	Browser plugin for FreeWRL
Requires:	freewrl%{?_isa} = %{version}-%{release}
Requires:	firefox
Group:		Applications/Internet

%description plugin
FreeWRL is an X3D / VRML visualization program. This package contains the           
browser plugin for Firefox (and other xulrunner compatible browsers).

%prep
%setup -q -n %{name}-%{basever}
# %patch0 -p1 -b .xul13
# %patch1 -p1 -b .noJS_FinalizeStub
# %patch2 -p1 -b .noMaybeGC
# %patch3 -p1 -b .NewGlobalObject
# %patch4 -p1 -b .jsgp
# %patch5 -p1 -b .wrappers
# %patch6 -p1 -b .nojsco
# %patch7 -p1 -b .jsnvv
cp %{SOURCE1} .
# Don't need it.
rm -rf appleOSX/

%build
export LDFLAGS="-Wl,--as-needed"
%configure --with-target=x11 \
	   --enable-fontconfig \
	   --enable-java \
	   --enable-libeai \
	   --enable-osc \
	   --enable-libcurl \
	   --disable-static \
	   --with-javadir=/usr/lib/jvm/java-openjdk/jre/lib/ext \
	   --with-statusbar=hud
make %{?_smp_mflags}

%install
make install DESTDIR=%{buildroot}
mkdir -p %{buildroot}%{_datadir}/%{name}/
install -p src/java/java.policy %{buildroot}%{_datadir}/%{name}/

rm -rf %{buildroot}%{_libdir}/*.a
rm -rf %{buildroot}%{_libdir}/*.la %{buildroot}%{_libdir}/mozilla/plugins/*.la

desktop-file-validate %{buildroot}%{_datadir}/applications/freewrl.desktop
chmod -x %{buildroot}%{_datadir}/applications/freewrl.desktop
chmod -x %{buildroot}%{_datadir}/%{name}/java.policy

chrpath --delete %{buildroot}%{_bindir}/freewrl
chrpath --delete %{buildroot}%{_bindir}/freewrl_snd
chrpath --delete %{buildroot}%{_libdir}/libFreeWRLEAI.so.*

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%post -n libEAI -p /sbin/ldconfig
%postun -n libEAI -p /sbin/ldconfig

%files
%doc AUTHORS COPYING COPYING.LESSER README TODO
%{_bindir}/%{name}
%{_bindir}/%{name}_msg
%{_bindir}/%{name}_snd
%{_libdir}/libFreeWRL.so.*
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png
%{_mandir}/man1/%{name}*

%files devel
%doc doc/INTERFACE.pdf doc/INTERFACE.txt
%{_includedir}/libFreeWRL.h
%{_libdir}/libFreeWRL.so
%{_libdir}/pkgconfig/libFreeWRL.pc

%files java
%doc README.FreeWRL.java
%{_datadir}/%{name}/
/usr/lib/jvm/java-openjdk/jre/lib/ext/vrml.jar

%files -n libEAI
%doc COPYING COPYING.LESSER
%{_libdir}/libFreeWRLEAI.so.*

%files -n libEAI-devel
%{_includedir}/FreeWRLEAI/
%{_libdir}/libFreeWRLEAI.so
%{_libdir}/pkgconfig/libFreeWRLEAI.pc

%files plugin
%{_libdir}/mozilla/plugins/libFreeWRLplugin.so

%changelog
* Tue Apr  9 2013 Tom Callaway <spot@fedoraproject.org> - 1.22.13.1-8
- use js-devel (xulrunner's jsapi.h is now C++ only)

* Fri Feb  1 2013 Tom Callaway <spot@fedoraproject.org> - 1.22.13.1-7
- three args for JS_GetPrototype today
- fix more abandoned API

* Wed Jan  9 2013 Tom Callaway <spot@fedoraproject.org> - 1.22.13.1-6
- use JS_NewGlobalObject instead of JS_NewCompartmentAndGlobalObject

* Fri Dec 21 2012 Adam Tkac <atkac redhat com> - 1.22.13.1-5
- rebuild against new libjpeg

* Thu Dec 13 2012 Adam Jackson <ajax@redhat.com> - 1.22.13.1-4
- Rebuild for glew 1.9.0

* Tue Jul 31 2012 Tom Callaway <spot@fedoraproject.org> - 1.22.13.1-3
- fix build, patch out deprecated JS_FinalizeStub, JS_DestroyContextMaybeGC

* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.22.13.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Mon Jun 25 2012 Tom Callaway <spot@fedoraproject.org> - 1.22.13.1-1
- update to 1.22.13.1

* Tue Jan 17 2012 Tom Callaway <spot@fedoraproject.org> - 1.22.12-0.7.pre2
- fix compile with gcc 4.7

* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.22.12-0.6.pre2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Tue Dec  6 2011 Tom Callaway <spot@fedoraproject.org> - 1.22.12-0.5.pre2
- fix build against firefox8 

* Tue Dec 06 2011 Adam Jackson <ajax@redhat.com> - 1.22.12-0.4.pre2
- Rebuild for new libpng

* Tue Aug  9 2011 Tom Callaway <spot@fedoraproject.org> - 1.22.12-0.3.pre2
- move browser plugin to independent subpackage to minimize deps on main package

* Tue Aug  9 2011 Tom Callaway <spot@fedoraproject.org> - 1.22.12-0.2.pre2
- drop Requires: pkgconfig
- delete appleOSX/ dir 

* Wed Jul 27 2011 Tom Callaway <spot@fedoraproject.org> - 1.22.12-0.1.pre2
- pre2

* Tue Jul 19 2011 Tom Callaway <spot@fedoraproject.org> - 1.22.12-0.1.pre1
- initial package