File freewrl.spec of Package FreeWRL

#
# spec file for package freewrl
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#

# norootforbuild

Name:           freewrl
Summary:        A VRML/X3D viewer
Version:        1.22.13
Release:        1
License:        GPL-3.0+
Group:          Productivity/Multimedia/Video/Players
Url:            http://freewrl.sourceforge.net/
Requires:       bitstream-vera
Requires:       ImageMagick
Requires:       Mesa 
Requires:       perl 
Requires:       sox
Requires:       wget
Requires:       curl
Requires:       java-plugin
Requires:       java-sdk
BuildRequires:  java-sdk
BuildRequires:  -post-build-checks
BuildRequires:  bitstream-vera
BuildRequires:  fontconfig-devel
BuildRequires:  freeglut-devel
BuildRequires:  freetype2-devel
BuildRequires:  glew-devel
BuildRequires:  gcc-c++
BuildRequires:  ImageMagick
BuildRequires:  imlib2-devel
BuildRequires:  java-devel
BuildRequires:  libcurl-devel
BuildRequires:  libexpat-devel
BuildRequires:  libjpeg-devel
BuildRequires:  libpng-devel
BuildRequires:  libxml2-devel
BuildRequires:  MozillaFirefox
BuildRequires:  Mesa-devel
BuildRequires:  openmotif-devel
BuildRequires:  update-desktop-files
BuildRequires:  unzip
BuildRequires:  wget
BuildRequires:  sox
BuildRequires:  xorg-x11-devel
BuildRequires:  xorg-x11-libs
BuildRequires:  xorg-x11-libXmu-devel
BuildRequires:  zlib-devel
BuildRequires:  gecko-sdk
%if 0%{?sles_version}
BuildRequires:  sles-release
%else
BuildRequires:  openSUSE-release-mini
%endif
%if 0%{suse_version} == 1020
BuildRequires:  java-1_4_2-gcj-compat-devel
%endif
%if 0%{suse_version} > 1030
BuildRequires:  sox-devel
%else
BuildRequires:  sox
%endif
Source0:        %{name}-%{version}.tar.bz2
Source1:        freewrl-rpmlintrc
Source2:        %name.png
Source3:        %{name}.desktop
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
FreeWRL is a VRML client with the following features:
* FreeWRL supports the VRML97 and X3D open standards 
* FreeWRL is confirmed as "Interchange Profile" conformant 
  by the Web3d Consortium
* FreeWRL runs on OSX and Linux, it runs within Web browsers, 
  or standalone
* FreeWRL is ReWire and MIDI enabled for sound-based interaction
* FreeWRL is able to interconnect to other programs using MIDI, 
  or the EAI and SAI external programming interfaces

%package devel
Summary:       Development files for %name
Requires:      %name = %version
Group:         Development/Libraries/C and C++

%description devel
This package contains the needed files to develop applications using
%name.


%prep
%setup -q -n %{name}-%{version}

%build
%configure \
           --enable-mozilla-plugin \
           --enable-java \
           --enable-libeai \
           --enable-twodee \
           --enable-fontconfig \
           --enable-libcurl \
           --disable-static \
           --with-javadir=%{_datadir}/java \
           --with-jar=/etc/alternatives/jar \
           --with-javac=/etc/alternatives/javac \
           --with-browser=%{_bindir}/firefox \
           --with-plugindir=%{_libdir}/browser-plugins \
           --with-fontsdir=%{_datadir}/fonts \
           --with-target=motif \
           --with-mesa \
           --with-soundconv=%{_bindir}/sox \
           --with-unzip=%{_bindir}/unzip \
           --with-wget=%{_bindir}/wget \
           --with-expat=%{_includedir} \
           --with-x \
           --with-imageconvert=%{_bindir}/convert

make %{?jobs:-j %jobs}

%install
export NO_BRP_CHECK_BYTECODE_VERSION="true"
mkdir -p %buildroot/%_datadir/%name
%makeinstall
install -Dm644 %{SOURCE2} %buildroot%_datadir/pixmaps/%name.png
install -Dm644 %{SOURCE3} %buildroot%_datadir/applications/%{name}.desktop
%suse_update_desktop_file %name Graphics 3DGraphics Viewer
find %buildroot/%_datadir -type f -print0 | xargs -0 chmod 644
chmod 644 AUTHORS ChangeLog COPYING COPYING.LESSER README TODO
rm %buildroot/%{_libdir}/*.la

%clean
rm -rf /tmp/include
rm -rf %buildroot

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc AUTHORS COPYING COPYING.LESSER README TODO
%_bindir/*
%_libdir/browser-plugins/*
%_datadir/pixmaps/*
%_datadir/applications/*
%_datadir/%name
%{_mandir}/man1/freewrl*
%{_libdir}/libFreeWRL.so.*
%{_libdir}/libFreeWRLEAI.so.*
%{_datadir}/java/vrml.jar

%files devel
%defattr(-,root,root)
%dir %{_includedir}/FreeWRLEAI
%{_includedir}/FreeWRLEAI/*.h
%{_includedir}/libFreeWRL.h
%{_libdir}/pkgconfig/libFreeWRL.pc
%{_libdir}/pkgconfig/libFreeWRLEAI.pc
%_libdir/*.so

%changelog
openSUSE Build Service is sponsored by