Blob Blame History Raw
#
# spec file for package svgsalamander

Name:           svgsalamander
Version:        0.0
Release:        4%{?dist}
Summary:        An SVG engine for Java

Group:          Development/Libraries
License:        LGPLv2+ or BSD
URL:            http://svgsalamander.java.net/
Source0:        %{name}-%{version}.tar.gz
Source1:        %{name}-generate-tarball.sh
#Source built using the following commands : sh svgSalamander-generate-tarball.sh

#patch to change source 1.4 to 1.5 when calling javac
Patch1:         %{name}-source-1.5-version.patch

BuildArch:      noarch
BuildRequires:  jpackage-utils 
BuildRequires:  junit
BuildRequires:  ant
BuildRequires:  java-devel
BuildRequires:  javacc
Requires:       java
Requires:       jpackage-utils
Requires(post): jpackage-utils
Requires(postun):jpackage-utils


%description
SVG Salamander is an SVG engine for Java that's designed to be small, fast, 
and allow programmers to use it with a minimum of fuss. It's in particular 
targeted for making it easy to integrate SVG into Java games and making it 
much easier for artists to design 2D game content - from rich interactive 
menus to charts and graphcs to complex animations.

%package javadoc
Summary:        Javadocs for %{name}
Group:          Documentation
Requires:       %{name} = %{version}-%{release}
Requires:       jpackage-utils

%description javadoc
This package contains the API documentation for %{name}.

%prep
%setup -q
%patch1 -p0



find . -name '*.jar' -exec rm -f '{}' \;
find . -name '*.class' -exec rm -f '{}' \;

# Fix rights
chmod a-x www/docs/*.html www/docs/exampleCode/*

# Remove DOS line endings
for file in www/docs/*.html www/docs/exampleCode/*.html; do
  sed 's|\r||g' $file >$file.new && \
  touch -r $file $file.new && \
  mv $file.new $file
done


%build
ant -Djavacc.home=$(dirname $(build-classpath javacc)) \
    -Djunit.jar=$(build-classpath junit)

%install
mkdir -p %{buildroot}%{_javadir}

mkdir -p %{buildroot}%{_javadocdir}/%{name}
cp -rp build/javadoc %{buildroot}%{_javadocdir}/%{name}

install -Dpm 0644 build/jar/svgSalamander.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
ln -s %{name}.jar $RPM_BUILD_ROOT%{_javadir}/svgSalamander.jar

install -Dpm 644 www/maven/pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP-%{name}.pom
%add_to_maven_depmap com.kitfox.svg svg-salamander %{version} JPP %{name}

%post
%update_maven_depmap


%postun
%update_maven_depmap

%files
%defattr(-,root,root,-)
%doc  www/docs/{exampleCode/,use.html}
%{_javadir}/%{name}.jar
%{_javadir}/svgSalamander.jar
%{_mavenpomdir}/*
%{_mavendepmapfragdir}/*


%files javadoc
%defattr(-,root,root,-)
%{_javadocdir}/%{name}



%changelog
* Wed Oct 05 2011 Cédric OLIVIER <cedric.olivier@free.fr> 0.0-4
- Fix stange permissions on svgsalamander-generate-tarball.sh

* Thu Sep 08 2011 Cédric OLIVIER <cedric.olivier@free.fr> 0.0-3
- Method to set classpath changed

* Sun Aug 14 2011 Cédric OLIVIER <cedric.olivier@free.fr> 0.0-2
- Add to maven
- Remove DOS end lines

* Sun Aug 14 2011 Cédric OLIVIER <cedric.olivier@free.fr> 0.0-1
- First release