diff --git a/juniversalchardet.changes b/juniversalchardet.changes index 0966de1..2fbfcee 100644 --- a/juniversalchardet.changes +++ b/juniversalchardet.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jul 27 19:00:40 UTC 2021 - Fridrich Strba + +- Do not use xmvn-install and xmvn-resolve, since this package + does not need them at all because its pom file is very simple + ------------------------------------------------------------------- Fri Jun 11 08:49:03 UTC 2021 - Anton Shvetz diff --git a/juniversalchardet.spec b/juniversalchardet.spec index e759458..b048e18 100644 --- a/juniversalchardet.spec +++ b/juniversalchardet.spec @@ -28,10 +28,8 @@ Source1: https://repo1.maven.org/maven2/com/googlecode/%{name}/%{name}/%{ Source2: https://www.mozilla.org/media/MPL/1.1/index.0c5913925d40.txt Source3: README.txt BuildRequires: fdupes -BuildRequires: java-devel >= 11 -BuildRequires: java-javadoc >= 11 -BuildRequires: maven-local -BuildRequires: xmvn +BuildRequires: java-devel >= 1.6 +BuildRequires: javapackages-local BuildArch: noarch %description @@ -47,31 +45,41 @@ API documentation for %{name}. %prep %setup -q -T -c mkdir -p src/main/java -env -C src/main/java jar -xvf %{SOURCE0} +pushd src/main/java +jar -xvf %{SOURCE0} +popd cp %{SOURCE2} LICENSE.txt cp %{SOURCE3} . %build mkdir -p target/classes -javac -encoding UTF-8 -sourcepath src/main/java -d target/classes $(find src/main/java -name \*.java) +javac -source 6 -target 6 -encoding UTF-8 -sourcepath src/main/java -d target/classes $(find src/main/java -name \*.java) jar -cvf %{name}-%{version}.jar -C target/classes . -javadoc -encoding UTF-8 \ +javadoc -source 6 -encoding UTF-8 \ -d target/apidocs \ -sourcepath src/main/java \ -link file://%{_javadocdir}/java \ - -Xdoclint:none \ org.mozilla.universalchardet %install -%{mvn_artifact} %{SOURCE1} %{name}-%{version}.jar -%mvn_install -J target/apidocs/ +# 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}/ %fdupes %{buildroot}%{_javadocdir}/%{name} %files -f .mfiles %doc README.txt %license LICENSE.txt -%files javadoc -f .mfiles-javadoc +%files javadoc +%{_javadocdir}/%{name} %license LICENSE.txt %changelog