forked from pool/adaptx
128 lines
3.5 KiB
RPMSpec
128 lines
3.5 KiB
RPMSpec
#
|
|
# spec file for package adaptx (Version 0.9.6)
|
|
#
|
|
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
# This file and all modifications and additions to the pristine
|
|
# package are under the same license as the package itself.
|
|
#
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
# norootforbuild
|
|
|
|
Name: adaptx
|
|
BuildRequires: ant java2-devel-packages xml-commons-apis
|
|
%{!?_with_external: %{!?_without_external: %define _without_external 1}}
|
|
%define name adaptx
|
|
%define version 0.9.6
|
|
%define release 2jpp
|
|
%define section free
|
|
Version: 0.9.6
|
|
Release: 24
|
|
Summary: XSLT Processor Written in Java
|
|
License: BSD, Other License(s), see package
|
|
Group: Development/Libraries/Java
|
|
Source0: %{name}-%{version}-cvs.tar.bz2
|
|
Patch0: %{name}-%{version}-xsl.patch
|
|
URL: http://castor.exolab.org/
|
|
%if %{?_with_external:1}%{!?_with_external:0}
|
|
%endif
|
|
BuildArch: noarch
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
%description
|
|
AdaptX is an extensible stylesheet language (XSL) processor.
|
|
|
|
|
|
|
|
%package javadoc
|
|
PreReq: coreutils
|
|
Group: Development/Libraries/Java
|
|
Summary: Javadoc for adaptx
|
|
|
|
%description javadoc
|
|
This package contains the javadoc documentation for AdaptX.
|
|
|
|
|
|
|
|
%package doc
|
|
Summary: Documentation for adaptx
|
|
Group: Development/Libraries/Java
|
|
|
|
%description doc
|
|
This package contains the documentation for AdaptX.
|
|
|
|
|
|
|
|
%prep
|
|
%setup -q -n %{name}
|
|
# remove CVS internal files
|
|
for dir in `find . -type d -name CVS`; do rm -rf $dir; done
|
|
# remove all binary libs
|
|
find . -name "*.jar" -exec rm -f {} \;
|
|
%patch0
|
|
|
|
%build
|
|
perl -p -i -e 's|classic|modern|' src/build.xml
|
|
if ! grep -q "javac.*source=" src/build.xml ; then
|
|
perl -p -i -e 's|<javac |<javac source=\"1.4\" |' src/build.xml
|
|
perl -p -i -e 's|<javadoc |<javadoc source=\"1.4\" |' src/build.xml
|
|
fi
|
|
%if %{?_with_external:1}%{!?_with_external:0}
|
|
export CLASSPATH=$(build-classpath adaptx xml-commons-apis)
|
|
%else
|
|
export CLASSPATH=dist/adaptx_%{version}.jar:$(build-classpath xml-commons-apis)
|
|
%endif
|
|
ant -buildfile src/build.xml jar
|
|
ant -buildfile src/build.xml javadoc
|
|
ant -buildfile src/build.xml doc
|
|
|
|
%install
|
|
# jar
|
|
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
|
|
install -m 644 dist/%{name}_%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
|
|
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} ${jar/-%{version}/}; done)
|
|
# javadoc
|
|
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
|
|
cp -pr build/doc/javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
|
|
rm -rf build/doc/javadoc
|
|
|
|
%clean
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
%post javadoc
|
|
rm -f %{_javadocdir}/%{name}
|
|
ln -s %{name}-%{version} %{_javadocdir}/%{name}
|
|
|
|
%postun javadoc
|
|
if [ "$1" = "0" ]; then
|
|
rm -f %{_javadocdir}/%{name}
|
|
fi
|
|
|
|
%files
|
|
%defattr(0664,root,root,0755)
|
|
%doc src/etc/{CHANGELOG,contributors.html,LICENSE}
|
|
%{_javadir}/*
|
|
|
|
%files javadoc
|
|
%defattr(0664,root,root,0755)
|
|
%{_javadocdir}/%{name}-%{version}
|
|
|
|
%files doc
|
|
%defattr(0664,root,root,0755)
|
|
%doc build/doc/*
|
|
|
|
%changelog -n adaptx
|
|
* Fri Sep 15 2006 - ro@suse.de
|
|
- set source=1.4 for java
|
|
* Wed Jan 25 2006 - mls@suse.de
|
|
- converted neededforbuild to BuildRequires
|
|
* Wed Jul 27 2005 - jsmeix@suse.de
|
|
- Adjustments in the spec file.
|
|
* Mon Jul 18 2005 - jsmeix@suse.de
|
|
- Current version 0.9.6 from JPackage.org
|
|
* Thu Sep 16 2004 - skh@suse.de
|
|
- Fix prerequires of javadoc subpackage
|
|
* Sun Sep 05 2004 - skh@suse.de
|
|
- Initial package created with version 0.9.6 (JPackage 1.5)
|