Files
fastcsv/fastcsv.spec

92 lines
2.5 KiB
RPMSpec

#
# spec file for package fastcsv
#
# Copyright (c) 2025 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
Name: fastcsv
Version: 3.4.0
Release: 0
Summary: CSV library for Java that is fast, RFC-compliant and dependency-free
License: MIT
Group: Development/Libraries/Java
URL: https://%{name}.org/
Source0: https://github.com/osiegmar/FastCSV/archive/refs/tags/v%{version}.tar.gz
Source1: https://repo1.maven.org/maven2/de/siegmar/%{name}/%{version}/%{name}-%{version}.pom
BuildRequires: fdupes
BuildRequires: maven-local
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
BuildArch: noarch
%description
FastCSV is a high-performance CSV parser and writer for Java licensed under the
MIT open source license. It is designed to not only be fast and lightweight but
also to be compliant with the CSV specification RFC 4180.
%package javadoc
Summary: API documentation for %{name}
Group: Documentation/HTML
%description javadoc
API documentation for %{name}.
%prep
%autosetup -n FastCSV-%{version}
cp %{SOURCE1} lib/pom.xml
%pom_xpath_inject pom:project '<packaging>bundle</packaging>' lib
%pom_add_plugin org.apache.felix:maven-bundle-plugin lib \
'<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-SymbolicName>de.siegmar.fastcsv</Bundle-SymbolicName>
<_exportcontents>de.siegmar.fastcsv.reader.*, de.siegmar.fastcsv.writer.*</_exportcontents>
</instructions>
</configuration>
<executions>
<execution>
<id>bundle-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
</execution>
</executions>'
%{mvn_file} : %{name}
%build
pushd lib
%{mvn_build} -f -- \
-Dmaven.compiler.{source,target}=11
popd
%install
pushd lib
%mvn_install
%fdupes %{buildroot}%{_javadocdir}/%{name}
popd
%files -f lib/.mfiles
%license LICENSE
%doc {CHANGELOG,README}.md
%files javadoc -f lib/.mfiles-javadoc
%license LICENSE
%changelog