# Built with Ghidra's own Gradle wrapper; the build needs network access # (Gradle distribution, Maven Central and fetchDependencies.gradle). %global debug_package %{nil} %global _python_bytecompile_extra 0 %global __brp_mangle_shebangs_exclude_from ^%{_libdir}/%{name}/ %global __requires_exclude_from ^%{_libdir}/%{name}/ %global __provides_exclude_from ^%{_libdir}/%{name}/ Name: ghidra Version: 12.1.4 Release: 1%{?dist} Summary: Software reverse engineering framework License: Apache-2.0 AND GPL-3.0-only URL: https://github.com/NationalSecurityAgency/ghidra Source0: %{url}/archive/refs/tags/Ghidra_%{version}_build.tar.gz Source1: ghidra.desktop # Backport of upstream 864999d7: Python 3.15 support (Fedora 45+) Patch0: ghidra-python-3.15.patch ExclusiveArch: x86_64 aarch64 BuildRequires: java-devel >= 1:21 BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: make BuildRequires: python3 BuildRequires: python3-pip BuildRequires: unzip BuildRequires: desktop-file-utils Requires: java-devel >= 1:21 Requires: bash Recommends: python3 %description Ghidra is a software reverse engineering (SRE) framework created by the NSA Research Directorate. It includes disassembly, assembly, decompilation, graphing and scripting for a wide range of processors and executable formats. %prep %autosetup -p1 -n ghidra-Ghidra_%{version}_build sed -i 's/^application.release.name=.*/application.release.name=PUBLIC/' Ghidra/application.properties %build ./gradlew --no-daemon -I gradle/support/fetchDependencies.gradle ./gradlew --no-daemon assembleAll %install install -d %{buildroot}%{_libdir}/%{name} %{buildroot}%{_bindir} cp -a build/dist/ghidra_%{version}_PUBLIC/. %{buildroot}%{_libdir}/%{name}/ # some bundled jars ship world-writable chmod -R go-w %{buildroot}%{_libdir}/%{name} ln -s %{_libdir}/%{name}/ghidraRun %{buildroot}%{_bindir}/ghidra for s in analyzeHeadless pyghidraRun; do ln -s %{_libdir}/%{name}/support/$s %{buildroot}%{_bindir}/ghidra-$s done desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE1} for px in 16 24 32 48 64 128 256; do install -Dpm644 Ghidra/Framework/Gui/src/main/resources/images/GhidraIcon$px.png \ %{buildroot}%{_datadir}/icons/hicolor/${px}x${px}/apps/%{name}.png done %files %license LICENSE %{_libdir}/%{name} %{_bindir}/ghidra %{_bindir}/ghidra-analyzeHeadless %{_bindir}/ghidra-pyghidraRun %{_datadir}/applications/%{name}.desktop %{_datadir}/icons/hicolor/*/apps/%{name}.png %changelog * Wed Oct 14 2026 David - 12.1.4-1 - Initial package