File javacsv.spec of Package javacsv

#
# spec file for package 
#
# Copyright (c) 2013 Peter Conrad <obs@quisquis.de>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/

Name:		javacsv
Version:	2.1
Release:	1
License:	LGPL-2.1+
Summary:	Java classes for handling CSV files
Url:		https://www.csvreader.com/java_csv.php
Group:		Development/Libraries/Java
Source:		http://prdownloads.sourceforge.net/project/javacsv/JavaCsv/JavaCsv%20%{version}/javacsv%{version}.zip
Source1:	http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt
BuildRequires:	java-devel ant unzip
BuildRoot:	%{_tmppath}/%{name}-%{version}-build
BuildArch:	noarch
%if 0%{?fedora} > 0 && 0%{?fedora} < 21
BuildRequires:	java-1.5.0-gcj-devel
%endif

%description
Java CSV is a small fast open source java library for reading and writing CSV
and plain delimited text files. All kinds of CSV files can be handled, text
qualified, Excel formatted, etc.

%package javadoc
Summary:	Javadoc for %name
Group:		Development/Libraries/Java

%description javadoc
This package contains the documentation for %{name}.

%prep
%setup -cq
ln %{S:1} COPYING

%build
rm -rf *.jar doc/*
%__sed -i 's/source="1.4"/source="8" target="8"/' build.xml
%ant
%ant -f javadoc.xml

%install
%__install -dm 755 "%{buildroot}/%{_javadir}"
%__install -m 0644 "%{name}.jar"  "%{buildroot}/%{_javadir}/%{name}-%{version}.jar"
%__ln_s "%{name}-%{version}.jar" "%{buildroot}/%{_javadir}/%{name}.jar"

%__install -dm 755 "%{buildroot}/%{_javadocdir}/%{name}-%{version}"
cp -pr doc/* "%{buildroot}/%{_javadocdir}/%{name}-%{version}/"

%files
%defattr(-,root,root,-)
%doc COPYING
%{_javadir}/%{name}-%{version}.jar
%{_javadir}/%{name}.jar

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

%changelog
openSUSE Build Service is sponsored by