- Cleanup with spec-cleaner and do not version javadoc dir.

OBS-URL: https://build.opensuse.org/package/show/Java:packages/aelfred?expand=0&rev=10
This commit is contained in:
Tomáš Chvátal 2014-07-11 14:02:48 +00:00 committed by Git OBS Bridge
parent cba9bc1688
commit 14897769a6
2 changed files with 24 additions and 79 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Fri Jul 11 14:02:37 UTC 2014 - tchvatal@suse.com
- Cleanup with spec-cleaner and do not version javadoc dir.
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Sep 9 11:04:07 UTC 2013 - tchvatal@suse.com Mon Sep 9 11:04:07 UTC 2013 - tchvatal@suse.com

View File

@ -1,7 +1,7 @@
# #
# spec file for package aelfred # spec file for package aelfred
# #
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -16,13 +16,7 @@
# #
%define gcj_support %{?_with_gcj_support:1}%{!?_with_gcj_support:%{?_without_gcj_support:0}%{!?_without_gcj_support:%{?_gcj_support:%{_gcj_support}}%{!?_gcj_support:0}}}
Name: aelfred Name: aelfred
%define name aelfred
%define version 1.2
%define release 0.a.7jpp
%define section free
Version: 1.2 Version: 1.2
Release: 0 Release: 0
Summary: Java-based XML parser Summary: Java-based XML parser
@ -32,41 +26,24 @@ Url: http://www.jpackage.org/
Source0: http://card4u.fhnon.de/XMLKlassen/microstar-Parser/aelfred.zip Source0: http://card4u.fhnon.de/XMLKlassen/microstar-Parser/aelfred.zip
Patch0: aelfred-icedtea-build.patch Patch0: aelfred-icedtea-build.patch
BuildRequires: ant BuildRequires: ant
BuildRequires: javapackages-tools
%if ! %{gcj_support}
BuildArch: noarch
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if %defined suse_version
BuildRequires: java-devel BuildRequires: java-devel
BuildRequires: javapackages-tools
BuildRequires: unzip BuildRequires: unzip
%endif BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if %{gcj_support} BuildArch: noarch
BuildRequires: gnu-crypto
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
%endif
%description %description
AElfred is a Java-based XML parser from Microstar Software Ltd. AElfred AElfred is a Java-based XML parser from Microstar Software Ltd. AElfred
is distributed for free (with full source) for both commercial and is distributed for free (with full source) for both commercial and
non-commercial use. non-commercial use.
%package javadoc %package javadoc
PreReq: coreutils
Summary: Java-based XML parser (documentation) Summary: Java-based XML parser (documentation)
Group: Development/Libraries/Java Group: Development/Libraries/Java
Requires(post): /bin/rm,/bin/ln
Requires(postun): /bin/rm
%description javadoc %description javadoc
Javadoc for aelfred. Javadoc for aelfred.
%package demo %package demo
Summary: Java-based XML parser (demo and samples) Summary: Java-based XML parser (demo and samples)
Group: Development/Libraries/Java Group: Development/Libraries/Java
@ -75,14 +52,12 @@ Requires: %{name} = %{version}-%{release}
%description demo %description demo
Demonstrations and samples for aelfred. Demonstrations and samples for aelfred.
%prep %prep
%setup -q -c %setup -q -c
# remove all binary libs # remove all binary libs
find . -name "*.jar" -exec %__rm -f {} \; find . -name "*.jar" -exec rm -f {} \;
find . -name "*.class" -exec %__rm -f {} \; find . -name "*.class" -exec rm -f {} \;
%__rm -rf HTML/* rm -rf HTML/*
%patch0 -b .sav %patch0 -b .sav
%build %build
@ -90,71 +65,36 @@ export JAVA_HOME=%{java_home}
export PATH=%{java_home}/bin:$PATH export PATH=%{java_home}/bin:$PATH
export CLASSPATH= export CLASSPATH=
cd src cd src
%javac -source 1.4 `find . -name \*.java` %{javac} -source 1.4 `find . -name \*.java`
%javadoc -source 1.4 -d ../HTML `find . -name \*.java` %{javadoc} -source 1.4 -d ../HTML `find . -name \*.java`
%install %install
# jar # jar
export JAVA_HOME=%{java_home} export JAVA_HOME=%{java_home}
cd src cd src
%__mkdir_p %{buildroot}%{_javadir} mkdir -p %{buildroot}%{_javadir}
%jar cvmf /dev/null %{name}.jar -C . com/ %{jar} cvmf /dev/null %{name}.jar -C . com/
%__cp -a %{name}.jar \ cp -a %{name}.jar \
%{buildroot}%{_javadir}/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
(cd %{buildroot}%{_javadir} && for jar in *-%{version}*; do \ (cd %{buildroot}%{_javadir} && for jar in *-%{version}*; do \
%__ln_s ${jar} ${jar/-%{version}/}; done) ln -s ${jar} ${jar/-%{version}/}; done)
# javadoc # javadoc
%__mkdir_p %{buildroot}%{_javadocdir}/%{name}-%{version} mkdir -p %{buildroot}%{_javadocdir}/%{name}
%__cp -a ../HTML/* %{buildroot}%{_javadocdir}/%{name}-%{version} cp -a ../HTML/* %{buildroot}%{_javadocdir}/%{name}
(cd %{buildroot}%{_javadocdir} && %__ln_s %{name}-%{version} %{name})
# data # data
%__mkdir_p %{buildroot}%{_datadir}/%{name}/Demo mkdir -p %{buildroot}%{_datadir}/%{name}/Demo
%__cp -a *.class %{buildroot}%{_datadir}/%{name}/Demo cp -a *.class %{buildroot}%{_datadir}/%{name}/Demo
%if %{gcj_support}
export CLASSPATH=$(build-classpath gnu-crypto)
%{_bindir}/aot-compile-rpm
%endif
%post javadoc
%__rm -f %{_javadocdir}/%{name}
%__ln_s %{name}-%{version} %{_javadocdir}/%{name}
%postun javadoc
if [ $1 -eq 0 ]; then
%__rm -f %{_javadocdir}/%{name}
fi
%if %{gcj_support}
%post
if [ -x %{_bindir}/rebuild-gcj-db ]
then
%{_bindir}/rebuild-gcj-db
fi
%endif
%if %{gcj_support}
%postun
if [ -x %{_bindir}/rebuild-gcj-db ]
then
%{_bindir}/rebuild-gcj-db
fi
%endif
%files %files
%defattr(0644,root,root,0755) %defattr(0644,root,root,0755)
%doc README.txt FILES %doc README.txt FILES
%{_javadir}/* %{_javadir}/*
%dir %{_datadir}/%{name} %dir %{_datadir}/%{name}
%if %{gcj_support}
%dir %attr(-,root,root) %{_libdir}/gcj/%{name}
%attr(-,root,root) %{_libdir}/gcj/%{name}/%{name}-%{version}.jar.*
%endif
%files javadoc %files javadoc
%defattr(0644,root,root,0755) %defattr(0644,root,root,0755)
%dir %{_javadocdir}/%{name}-%{version} %dir %{_javadocdir}/%{name}
%{_javadocdir}/%{name}-%{version}/* %{_javadocdir}/%{name}/*
%ghost %{_javadocdir}/%{name}
%files demo %files demo
%defattr(0644,root,root,0755) %defattr(0644,root,root,0755)