89 lines
2.8 KiB
RPMSpec
89 lines
2.8 KiB
RPMSpec
#
|
|
# spec file for package asmtools
|
|
#
|
|
# Copyright (c) 2022 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: asmtools
|
|
Version: 7.0.b09+20210610.gitf40a2c0
|
|
Release: 0
|
|
Summary: To develop tools create proper & improper Java '.class' files
|
|
License: GPL-2.0-or-later
|
|
URL: https://github.com/openjdk/asmtools
|
|
Source0: %{name}-%{version}.tar.xz
|
|
Source1: asmtools.in
|
|
Source2: asmtools.1
|
|
BuildRequires: maven-local
|
|
Requires: java-headless
|
|
BuildArch: noarch
|
|
|
|
%description
|
|
AsmTools helps develop tools to create proper and improper Java '.class' files.
|
|
Aids various Java .class based testing and OpenJDK development applications.
|
|
Asmtools supports latest class file formats, in lock-step with JDK development.
|
|
AsmTools consist of a set of (Java class file) assembler/dis-assemblers:
|
|
Jasm/Jdis:
|
|
An assembler language to provide Java-like declaration of member signatures,
|
|
providing Java VM specification compliant mnemonics for byte-code instructions.
|
|
JCod/JDec:
|
|
An assembler language to provide byte-code containers of class-file constructs.
|
|
|
|
%package javadoc
|
|
Summary: Javadoc for %{name}
|
|
|
|
%description javadoc
|
|
This package contains the API documentation for %{name}.
|
|
|
|
%prep
|
|
%setup -q
|
|
cd maven
|
|
sed -i "s|ln -sv|cp -r|g" mvngen.sh
|
|
sh mvngen.sh
|
|
%pom_remove_plugin :maven-jar-plugin
|
|
%pom_remove_plugin :maven-javadoc-plugin
|
|
%pom_remove_plugin :maven-source-plugin
|
|
%pom_remove_plugin :maven-gpg-plugin
|
|
|
|
%build
|
|
cd maven
|
|
%{mvn_build} -f -- \
|
|
-Dproject.build.outputTimestamp=$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%%s)} +%%Y-%%m-%%dT%%H:%%M:%%SZ)
|
|
|
|
%install
|
|
pushd maven
|
|
%mvn_install
|
|
popd
|
|
|
|
mkdir -p %{buildroot}%{_bindir}/
|
|
mkdir -p %{buildroot}%{_mandir}/man1/
|
|
install -d -m 755 %{buildroot}%{_bindir}
|
|
#!/bin/sh
|
|
for launcher in "" "-jasm" "-jdis" "-jcoder" "-jdec" "-jcdec"; do
|
|
switch=`echo $launcher |sed "s/-//"`
|
|
cat %{SOURCE1} | sed "s/@SCD@/$switch/" > %{buildroot}%{_bindir}/%{name}$launcher
|
|
done
|
|
install -d -m 755 %{buildroot}%{_mandir}/man1/
|
|
install -m 644 %{SOURCE2} %{buildroot}%{_mandir}/man1/
|
|
|
|
%files -f maven/.mfiles
|
|
%license LICENSE
|
|
%doc README.md
|
|
%attr(755, root, -) %{_bindir}/*
|
|
%{_mandir}/man1/asmtools.1%{?ext_man}
|
|
|
|
%files javadoc -f maven/.mfiles-javadoc
|
|
|
|
%changelog
|