Files
cfr/cfr.spec

81 lines
2.4 KiB
RPMSpec
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#
# spec file for package cfr
#
# Copyright (c) 2023 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: cfr
Version: 0.152
Release: 0
Summary: Java decompiler
License: MIT
Group: Development/Libraries/Java
URL: https://www.benf.org/other/%{name}
Source0: https://github.com/leibnitz27/%{name}/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1: %{name}.pod
BuildRequires: fdupes
BuildRequires: maven-local
BuildRequires: mvn(org.codehaus.mojo:templating-maven-plugin)
BuildArch: noarch
%description
CFR will decompile modern Java features including much of Java 9, 12 & 14,
but is written entirely in Java 6, so will work anywhere! (FAQ) Itll even
make a decent go of turning class files from other JVM languages back into
java!
%package javadoc
Summary: API documentation for %{name}
Group: Documentation/HTML
%description javadoc
API documentation for %{name}.
%prep
%setup -q
%pom_remove_plugin :maven-source-plugin
%pom_remove_plugin :maven-javadoc-plugin
%pom_remove_plugin pl.project13.maven:git-commit-id-plugin
%{mvn_file} : %{name}
%build
%{mvn_build} -f -- \
-Dproject.build.outputTimestamp=$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%%s)} +%%Y-%%m-%%dT%%H:%%M:%%SZ) \
-DjavaVersion=8
pod2man --release='%{name} %{version}' --section=1 --center='User Commands' --quotes=none %{SOURCE1} %{name}.1
%install
%mvn_install
%fdupes %{buildroot}%{_javadocdir}/%{name}
%jpackage_script org.benf.cfr.reader.Main "" "" %{name} %{name} true
install -dm0755 %{buildroot}%{_mandir}/man1
install -Dm0644 %{name}.1 %{buildroot}%{_mandir}/man1
%files -f .mfiles
%license LICENSE
%doc README.md
%{_bindir}/%{name}
%{_mandir}/man1/%{name}.1%{?ext_man}
%files javadoc -f .mfiles-javadoc
%license LICENSE
%changelog