2021-06-14 07:11:27 +02:00
|
|
|
#
|
|
|
|
# spec file for package juniversalchardet
|
|
|
|
#
|
2021-06-14 07:16:44 +02:00
|
|
|
# Copyright (c) 2021 SUSE LLC
|
2021-06-14 07:11:27 +02:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2021-06-14 07:16:44 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2021-06-14 07:11:27 +02:00
|
|
|
#
|
|
|
|
|
2021-06-14 07:16:44 +02:00
|
|
|
|
2021-06-14 07:11:27 +02:00
|
|
|
Name: juniversalchardet
|
|
|
|
Version: 1.0.3
|
|
|
|
Release: 0
|
2021-06-14 07:16:44 +02:00
|
|
|
Summary: Encoding detector library
|
2021-06-14 07:11:27 +02:00
|
|
|
License: MPL-1.1
|
|
|
|
Group: Development/Libraries/Java
|
2021-06-14 07:16:44 +02:00
|
|
|
URL: https://code.google.com/archive/p/juniversalchardet/
|
2021-06-14 07:11:27 +02:00
|
|
|
Source0: https://repo1.maven.org/maven2/com/googlecode/%{name}/%{name}/%{version}/%{name}-%{version}-sources.jar
|
|
|
|
Source1: https://repo1.maven.org/maven2/com/googlecode/%{name}/%{name}/%{version}/%{name}-%{version}.pom
|
2021-06-14 07:16:44 +02:00
|
|
|
Source2: https://www.mozilla.org/media/MPL/1.1/index.0c5913925d40.txt
|
|
|
|
Source3: README.txt
|
|
|
|
BuildRequires: fdupes
|
2022-03-21 13:18:20 +01:00
|
|
|
BuildRequires: java-devel >= 1.8
|
|
|
|
BuildRequires: java-javadoc >= 1.8
|
2021-07-27 21:01:39 +02:00
|
|
|
BuildRequires: javapackages-local
|
2021-06-14 07:16:44 +02:00
|
|
|
BuildArch: noarch
|
2021-06-14 07:11:27 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
JUNIVERSALCHARDET is a Java port of 'universalchardet', that is the encoding
|
|
|
|
detector library of Mozilla.
|
|
|
|
|
|
|
|
%package javadoc
|
|
|
|
Summary: API documentation for %{name}
|
2021-06-14 07:16:44 +02:00
|
|
|
|
2021-06-14 07:11:27 +02:00
|
|
|
%description javadoc
|
|
|
|
API documentation for %{name}.
|
|
|
|
|
|
|
|
%prep
|
2021-06-14 07:16:44 +02:00
|
|
|
%setup -q -T -c
|
2021-06-14 07:11:27 +02:00
|
|
|
mkdir -p src/main/java
|
2021-07-27 21:01:39 +02:00
|
|
|
pushd src/main/java
|
|
|
|
jar -xvf %{SOURCE0}
|
|
|
|
popd
|
2021-06-14 07:16:44 +02:00
|
|
|
cp %{SOURCE2} LICENSE.txt
|
|
|
|
cp %{SOURCE3} .
|
2021-06-14 07:11:27 +02:00
|
|
|
|
|
|
|
%build
|
|
|
|
mkdir -p target/classes
|
2022-03-21 13:18:20 +01:00
|
|
|
javac -source 8 -target 8 -encoding UTF-8 -sourcepath src/main/java -d target/classes $(find src/main/java -name \*.java)
|
2021-06-14 07:11:27 +02:00
|
|
|
jar -cvf %{name}-%{version}.jar -C target/classes .
|
2022-03-21 13:18:20 +01:00
|
|
|
javadoc -source 8 -encoding UTF-8 \
|
2021-06-14 07:11:27 +02:00
|
|
|
-d target/apidocs \
|
|
|
|
-sourcepath src/main/java \
|
|
|
|
-link file://%{_javadocdir}/java \
|
|
|
|
org.mozilla.universalchardet
|
|
|
|
|
|
|
|
%install
|
2021-07-27 21:01:39 +02:00
|
|
|
# jar
|
|
|
|
install -dm 0755 %{buildroot}%{_javadir}/%{name}
|
|
|
|
install -pm 0644 %{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}/%{name}.jar
|
|
|
|
# pom
|
|
|
|
install -dm 0755 %{buildroot}%{_mavenpomdir}/%{name}
|
|
|
|
install -pm 0644 %{SOURCE1} %{buildroot}%{_mavenpomdir}/%{name}/%{name}.pom
|
|
|
|
%add_maven_depmap %{name}/%{name}.pom %{name}/%{name}.jar
|
|
|
|
# javadoc
|
|
|
|
install -dm 0755 %{buildroot}%{_javadocdir}/%{name}
|
|
|
|
cp -r target/apidocs/* %{buildroot}%{_javadocdir}/%{name}/
|
2021-06-14 07:11:27 +02:00
|
|
|
%fdupes %{buildroot}%{_javadocdir}/%{name}
|
|
|
|
|
|
|
|
%files -f .mfiles
|
|
|
|
%doc README.txt
|
|
|
|
%license LICENSE.txt
|
|
|
|
|
2021-07-27 21:01:39 +02:00
|
|
|
%files javadoc
|
|
|
|
%{_javadocdir}/%{name}
|
2021-06-14 07:11:27 +02:00
|
|
|
%license LICENSE.txt
|
|
|
|
|
|
|
|
%changelog
|