- 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:
parent
cba9bc1688
commit
14897769a6
@ -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
|
||||
|
||||
|
98
aelfred.spec
98
aelfred.spec
@ -1,7 +1,7 @@
|
||||
#
|
||||
# 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
|
||||
# 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
|
||||
%define name aelfred
|
||||
%define version 1.2
|
||||
%define release 0.a.7jpp
|
||||
%define section free
|
||||
Version: 1.2
|
||||
Release: 0
|
||||
Summary: Java-based XML parser
|
||||
@ -32,41 +26,24 @@ Url: http://www.jpackage.org/
|
||||
Source0: http://card4u.fhnon.de/XMLKlassen/microstar-Parser/aelfred.zip
|
||||
Patch0: aelfred-icedtea-build.patch
|
||||
BuildRequires: ant
|
||||
BuildRequires: javapackages-tools
|
||||
%if ! %{gcj_support}
|
||||
BuildArch: noarch
|
||||
%endif
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%if %defined suse_version
|
||||
BuildRequires: java-devel
|
||||
BuildRequires: javapackages-tools
|
||||
BuildRequires: unzip
|
||||
%endif
|
||||
%if %{gcj_support}
|
||||
BuildRequires: gnu-crypto
|
||||
BuildRequires: java-gcj-compat-devel
|
||||
Requires(post): java-gcj-compat
|
||||
Requires(postun): java-gcj-compat
|
||||
%endif
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildArch: noarch
|
||||
|
||||
%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
|
||||
Requires(post): /bin/rm,/bin/ln
|
||||
Requires(postun): /bin/rm
|
||||
|
||||
%description javadoc
|
||||
Javadoc for aelfred.
|
||||
|
||||
|
||||
|
||||
%package demo
|
||||
Summary: Java-based XML parser (demo and samples)
|
||||
Group: Development/Libraries/Java
|
||||
@ -75,14 +52,12 @@ Requires: %{name} = %{version}-%{release}
|
||||
%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/*
|
||||
find . -name "*.jar" -exec rm -f {} \;
|
||||
find . -name "*.class" -exec rm -f {} \;
|
||||
rm -rf HTML/*
|
||||
%patch0 -b .sav
|
||||
|
||||
%build
|
||||
@ -90,71 +65,36 @@ 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`
|
||||
%{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 \
|
||||
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)
|
||||
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})
|
||||
mkdir -p %{buildroot}%{_javadocdir}/%{name}
|
||||
cp -a ../HTML/* %{buildroot}%{_javadocdir}/%{name}
|
||||
# data
|
||||
%__mkdir_p %{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
|
||||
mkdir -p %{buildroot}%{_datadir}/%{name}/Demo
|
||||
cp -a *.class %{buildroot}%{_datadir}/%{name}/Demo
|
||||
|
||||
%files
|
||||
%defattr(0644,root,root,0755)
|
||||
%doc README.txt FILES
|
||||
%{_javadir}/*
|
||||
%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
|
||||
%defattr(0644,root,root,0755)
|
||||
%dir %{_javadocdir}/%{name}-%{version}
|
||||
%{_javadocdir}/%{name}-%{version}/*
|
||||
%ghost %{_javadocdir}/%{name}
|
||||
%dir %{_javadocdir}/%{name}
|
||||
%{_javadocdir}/%{name}/*
|
||||
|
||||
%files demo
|
||||
%defattr(0644,root,root,0755)
|
||||
|
Loading…
Reference in New Issue
Block a user