aelfred/aelfred.spec

135 lines
3.0 KiB
RPMSpec
Raw Normal View History

#
# spec file for package aelfred (Version 1.2)
#
# Copyright (c) 2005 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://www.suse.de/feedback/
#
# norootforbuild
Name: aelfred
BuildRequires: ant java2-devel-packages xml-commons-apis
%define name aelfred
%define version 1.2
%define release 0.a.7jpp
%define section free
Version: 1.2
Release: 1
Summary: Java-based XML parser
License: BSD
URL: http://www.jpackage.org/
Source0: http://card4u.fhnon.de/XMLKlassen/microstar-Parser/aelfred.zip
Group: Development/Libraries/Java
Buildarch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
AElfred is a Java-based XML parser from Microstar Software Ltd. AElfred
is distributed for free (with full source) for both commercial and
non-commercial use.
%package javadoc
PreReq: coreutils
Summary: Java-based XML parser (documentation)
Group: Development/Libraries/Java
%description javadoc
Javadoc for aelfred.
%package demo
Summary: Java-based XML parser (demo and samples)
Requires: %{name} = %{version}-%{release}
Group: Development/Libraries/Java
%description demo
Demonstrations and samples for aelfred.
%prep
%setup -q -c
# remove all binary libs
find . -name "*.jar" -exec %__rm -f {} \;
find . -name "*.class" -exec %__rm -f {} \;
%__rm -rf HTML/*
%build
export JAVA_HOME=%{java_home}
export PATH=%{java_home}/bin:$PATH
export CLASSPATH=
cd src
%javac -source 1.4 `find . -name \*.java`
%javadoc -source 1.4 -d ../HTML `find . -name \*.java`
%install
# jar
export JAVA_HOME=%{java_home}
cd src
%__mkdir_p %{buildroot}%{_javadir}
%jar cvmf /dev/null %{name}.jar -C . com/
%__cp -a %{name}.jar \
%{buildroot}%{_javadir}/%{name}-%{version}.jar
(cd %{buildroot}%{_javadir} && for jar in *-%{version}*; do \
%__ln_s ${jar} ${jar/-%{version}/}; done)
# javadoc
%__mkdir_p %{buildroot}%{_javadocdir}/%{name}-%{version}
%__cp -a ../HTML/* %{buildroot}%{_javadocdir}/%{name}-%{version}
(cd %{buildroot}%{_javadocdir} && %__ln_s %{name}-%{version} %{name})
# data
%__mkdir_p %{buildroot}%{_datadir}/%{name}/Demo
%__cp -a *.class %{buildroot}%{_datadir}/%{name}/Demo
%clean
rm -rf $RPM_BUILD_ROOT
%post javadoc
%__rm -f %{_javadocdir}/%{name}
%__ln_s %{name}-%{version} %{_javadocdir}/%{name}
%postun javadoc
if [ $1 -eq 0 ]; then
%__rm -f %{_javadocdir}/%{name}
fi
%files
%defattr(0644,root,root,0755)
%doc README.txt FILES
%{_javadir}/*
%dir %{_datadir}/%{name}
%files javadoc
%defattr(0644,root,root,0755)
%dir %{_javadocdir}/%{name}-%{version}
%{_javadocdir}/%{name}-%{version}/*
%ghost %dir %{_javadocdir}/%{name}
%files demo
%defattr(0644,root,root,0755)
%{_datadir}/%{name}/Demo
%changelog -n aelfred
* Wed Jan 25 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
* Wed Oct 19 2005 - jsmeix@suse.de
- Current version 1.2 from JPackage.org