File jave2.spec of Package jave2

#
# spec file for package jave2
#
# Copyright (c) 2024 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:           jave2
Version:        3.5.0
Release:        0
Summary:        Java wrapper on the ffmpeg project
License:        GPL-3.0-only
Group:          Development/Libraries/Java
URL:            https://github.com/a-schild/%{name}
Source0:        %{url}/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1:        %{name}.rpmlintrc
BuildRequires:  fdupes
BuildRequires:  maven-local
BuildRequires:  mvn(org.codehaus.mojo:templating-maven-plugin)
ExcludeArch:    ppc64le
ExcludeArch:    riscv64
ExcludeArch:    s390x

%description
The JAVE2 (Java Audio Video Encoder) library is Java wrapper on the ffmpeg
project. Developers can take take advantage of JAVE2 to transcode audio and
video files from a format to another. In example you can transcode an AVI file
to a MPEG one, you can change a DivX video stream into a (youtube like) Flash
FLV one, you can convert a WAV audio file to a MP3 or a Ogg Vorbis one, you can
separate and transcode audio and video tracks, you can resize videos, changing
their sizes and proportions and so on.

Many other formats, containers and operations are supported by JAVE2.

%package javadoc
Summary:        API documentation for %{name}
Group:          Documentation/HTML
BuildArch:      noarch

%description javadoc
API documentation for %{name}.

%prep
%setup -q

sed -i -e 's/\r//' README.md

%pom_disable_module jave-example
%pom_disable_module jave-all-deps
%pom_disable_module jave-core-test
%pom_disable_module jave-core-test-java11
%pom_disable_module jave-nativebin-win32
%pom_disable_module jave-nativebin-win64
%pom_disable_module jave-nativebin-osx64
%pom_disable_module jave-nativebin-osxm1

%ifarch x86_64
%pom_disable_module jave-nativebin-linux32
%pom_disable_module jave-nativebin-arm32
%pom_disable_module jave-nativebin-arm64
%endif

%ifarch i586
%pom_disable_module jave-nativebin-linux64
%pom_disable_module jave-nativebin-arm32
%pom_disable_module jave-nativebin-arm64
%endif

%ifarch aarch64
%pom_disable_module jave-nativebin-linux32
%pom_disable_module jave-nativebin-linux64
%pom_disable_module jave-nativebin-arm32
%endif

%ifarch %{arm}
%pom_disable_module jave-nativebin-linux32
%pom_disable_module jave-nativebin-linux64
%pom_disable_module jave-nativebin-arm64
%endif

%pom_remove_plugin -r org.sonatype.plugins:nexus-staging-maven-plugin
%pom_remove_plugin -r :maven-source-plugin
%pom_remove_plugin -r :maven-javadoc-plugin
%pom_remove_plugin -r org.codehaus.mojo:buildnumber-maven-plugin

%build
%{mvn_build} -f -- \
	-Dproject.build.outputTimestamp=$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%%s)} +%%Y-%%m-%%dT%%H:%%M:%%SZ)

%install
%mvn_install
%fdupes %{buildroot}%{_javadocdir}/%{name}

%files -f .mfiles
%license LICENSE
%doc {Changelog,Examples,README}.md

%files javadoc -f .mfiles-javadoc
%license LICENSE

%changelog
openSUSE Build Service is sponsored by