packages apache-xml-stylebook.spec
      Pages: < 1 >  DOWNLOAD      
%define javahome /usr/lib/jvm/jdk-gcj
Name:          apache-xml-stylebook
Version:       1.0
Release:       4mamba
Summary:       Apache XML Stylebook
Group:         Applications/Publishing
Vendor:        openmamba
Distribution:  openmamba
Packager:      gil <puntogil@...>
URL:           http://xml.apache.org/
#svn export http://svn.apache.org/repos/asf/xml/stylebook/trunk/@313293 xml-stylebook-1.0
# tar cjf xml-stylebook-1.0-r313293-src.tar.bz2 xml-stylebook-1.0
Source:        xml-stylebook-%{version}-r313293-src.tar.bz2
# from JPackage
Patch0:        apache-xml-stylebook-1.0-r313293-image-printer.patch
Patch1:        apache-xml-stylebook-1.0-r313293-build-javadoc.patch
License:       Apache Software License 2.0
BuildRequires: apache-ant
BuildRequires: apache-ant-junit
BuildRequires: jakarta-bsf
BuildRequires: java-gcj-compat
BuildRequires: java-junit48
BuildRequires: java-openjdk
BuildRequires: jpackage-utils
BuildRequires: xalan-j2
BuildRequires: xerces-j2
BuildRequires: xml-commons-apis
Requires:      xml-commons-apis
Requires:      xalan-j2
Obsoletes:     java-xml-stylebook
Provides:      java-xml-stylebook
BuildRoot:     %{_tmppath}/%{name}-%{version}-root

%description
Apache XML Stylebook.

%package javadoc
Group:         Documentation
Summary:       Javadoc for %{name}
Requires:      sun-java-javadoc

%description javadoc
Apache XML Stylebook.

This package contains javadoc for %{name}.

%package demo
Group:         Development/Libraries/Java
Summary:       Examples for %{name}
Requires:      %{name} = %{?epoch:%epoch:}%{version}-%{release}

%description demo
Apache XML Stylebook.

This package contains examples demonstrating the use of %{name}.

%prep

%setup -q -n xml-stylebook-%{version}
%patch0 -p0
%patch1 -p0

# contains an errant font
rm -r styles/christmas/

for j in $(find . -name "*.jar"); do
     rm -rf $j
done

%build
export JAVA_HOME=%javahome
export CLASSPATH=$(build-classpath xalan-j2 xerces-j2 xml-commons-apis bsf junit48 ant/ant-junit)
ant

pushd docs
rm run.bat
java -classpath $(build-classpath xalan-j2 xerces-j2 xml-commons-apis bsf junit48 ant/ant-junit):../bin/stylebook-%{version}-b3_xalan-2.jar \
  org.apache.stylebook.StyleBook "targetDirectory=../results" book.xml ../styles/apachexml
popd

%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"

mkdir -p %{buildroot}%{_javadir}
install -m 644  bin/stylebook-%{version}-b3_xalan-2.jar \
  %{buildroot}%{_javadir}/xml-stylebook-%{version}.jar

(
  cd %{buildroot}%{_javadir}
  for jar in *-%{version}.jar; do
    ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`
  done
)

mkdir -p %{buildroot}%{_javadocdir}/xml-stylebook-%{version}
cp -pr build/javadoc/* %{buildroot}%{_javadocdir}/xml-stylebook-%{version}
ln -sf xml-stylebook-%{version} %{buildroot}%{_javadocdir}/xml-stylebook

mkdir -p %{buildroot}%{_datadir}/xml-stylebook
cp -pr docs %{buildroot}%{_datadir}/xml-stylebook
cp -pr styles %{buildroot}%{_datadir}/xml-stylebook
cp -pr results %{buildroot}%{_datadir}/xml-stylebook

%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"

%files
%defattr(-,root,root)
%{_javadir}/xml-stylebook-%{version}.jar
%{_javadir}/xml-stylebook.jar
%doc LICENSE.txt

%files javadoc
%defattr(-,root,root)
%{_javadocdir}/xml-stylebook-%{version}
%{_javadocdir}/xml-stylebook

%files demo
%defattr(-,root,root)
%{_datadir}/xml-stylebook

%changelog
* Mon Mar 14 2011 gil <puntogil@...> 1.0-4mamba
- rebuilt with java-gcj-compat & java-openjdk support

* Wed Dec 22 2010 gil <puntogil@...> 1.0-3mamba
- update to 1.0-r313293

* Thu Nov 04 2010 gil <puntogil@...> 1.0-2mamba
- rebuilt devel

* Fri Mar 06 2009 gil <puntogil@...> 1.0-1mamba
- package created by autospec