2022-08-14 10:08:58 +02:00
|
|
|
Name: imhex
|
2024-03-12 19:09:01 +01:00
|
|
|
Version: VERSION
|
2022-07-31 00:43:42 +02:00
|
|
|
Release: 0%{?dist}
|
|
|
|
Summary: A hex editor for reverse engineers and programmers
|
|
|
|
|
2023-01-10 23:10:34 +01:00
|
|
|
License: GPL-2.0-only AND Zlib AND MIT AND Apache-2.0
|
2023-05-11 09:27:23 +02:00
|
|
|
# imhex is gplv2. capstone is custom. nativefiledialog is Zlib.
|
2023-01-10 23:10:34 +01:00
|
|
|
# see license dir for full breakdown
|
2022-07-31 00:43:42 +02:00
|
|
|
URL: https://imhex.werwolv.net/
|
2023-01-10 23:10:34 +01:00
|
|
|
# We need the archive with deps bundled
|
|
|
|
Source0: https://github.com/WerWolv/%{name}/releases/download/v%{version}/Full.Sources.tar.gz#/%{name}-%{version}.tar.gz
|
2022-07-31 00:43:42 +02:00
|
|
|
|
|
|
|
BuildRequires: cmake
|
|
|
|
BuildRequires: desktop-file-utils
|
|
|
|
BuildRequires: dbus-devel
|
|
|
|
BuildRequires: file-devel
|
|
|
|
BuildRequires: freetype-devel
|
|
|
|
BuildRequires: fmt-devel
|
|
|
|
BuildRequires: gcc-c++
|
2023-01-10 23:10:34 +01:00
|
|
|
BuildRequires: libappstream-glib
|
|
|
|
BuildRequires: libglvnd-devel
|
2022-07-31 00:43:42 +02:00
|
|
|
BuildRequires: glfw-devel
|
|
|
|
BuildRequires: json-devel
|
|
|
|
BuildRequires: libcurl-devel
|
|
|
|
BuildRequires: llvm-devel
|
|
|
|
BuildRequires: mbedtls-devel
|
|
|
|
BuildRequires: yara-devel
|
2023-01-10 23:10:34 +01:00
|
|
|
BuildRequires: nativefiledialog-extended-devel
|
2024-01-21 18:03:47 +01:00
|
|
|
BuildRequires: dotnet-sdk-8.0
|
2023-12-31 11:39:24 +01:00
|
|
|
BuildRequires: libzstd-devel
|
|
|
|
BuildRequires: zlib-devel
|
|
|
|
BuildRequires: bzip2-devel
|
|
|
|
BuildRequires: xz-devel
|
2023-01-10 23:10:34 +01:00
|
|
|
%if 0%{?rhel}
|
|
|
|
BuildRequires: gcc-toolset-12
|
2022-07-31 00:43:42 +02:00
|
|
|
%endif
|
|
|
|
|
2023-01-10 23:10:34 +01:00
|
|
|
Provides: bundled(gnulib)
|
|
|
|
Provides: bundled(capstone) = 5.0-rc2
|
|
|
|
Provides: bundled(imgui)
|
|
|
|
Provides: bundled(libromfs)
|
|
|
|
Provides: bundled(microtar)
|
|
|
|
Provides: bundled(xdgpp)
|
|
|
|
|
|
|
|
# ftbfs on these arches. armv7hl might compile when capstone 5.x
|
|
|
|
# is released upstream and we can build against it
|
|
|
|
# [7:02 PM] WerWolv: We're not supporting 32 bit anyways soooo
|
|
|
|
# [11:38 AM] WerWolv: Officially supported are x86_64 and aarch64
|
|
|
|
ExclusiveArch: x86_64 %{arm64} ppc64le
|
|
|
|
|
2022-07-31 00:43:42 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
ImHex is a Hex Editor, a tool to display, decode and analyze binary data to
|
|
|
|
reverse engineer their format, extract informations or patch values in them.
|
|
|
|
|
|
|
|
What makes ImHex special is that it has many advanced features that can often
|
|
|
|
only be found in paid applications. Such features are a completely custom binary
|
|
|
|
template and pattern language to decode and highlight structures in the data, a
|
|
|
|
graphical node-based data processor to pre-process values before they're
|
|
|
|
displayed, a disassembler, diffing support, bookmarks and much much more. At the
|
|
|
|
same time ImHex is completely free and open source under the GPLv2 language.
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
2023-01-10 23:10:34 +01:00
|
|
|
%autosetup -n ImHex
|
|
|
|
# remove bundled libs we aren't using
|
2023-11-12 02:02:54 +01:00
|
|
|
rm -rf lib/third_party/{fmt,nlohmann_json,yara}
|
2022-07-31 00:43:42 +02:00
|
|
|
|
|
|
|
%build
|
2023-01-10 23:10:34 +01:00
|
|
|
%if 0%{?rhel}
|
|
|
|
. /opt/rh/gcc-toolset-12/enable
|
|
|
|
%set_build_flags
|
|
|
|
CXXFLAGS+=" -std=gnu++2b"
|
2022-07-31 00:43:42 +02:00
|
|
|
%endif
|
2023-01-10 23:10:34 +01:00
|
|
|
%cmake \
|
|
|
|
-D CMAKE_BUILD_TYPE=Release \
|
|
|
|
-D IMHEX_STRIP_RELEASE=OFF \
|
|
|
|
-D IMHEX_OFFLINE_BUILD=ON \
|
|
|
|
-D USE_SYSTEM_NLOHMANN_JSON=ON \
|
|
|
|
-D USE_SYSTEM_FMT=ON \
|
|
|
|
-D USE_SYSTEM_YARA=ON \
|
|
|
|
-D USE_SYSTEM_NFD=ON \
|
2023-07-15 10:01:50 +02:00
|
|
|
-D IMHEX_USE_GTK_FILE_PICKER=ON \
|
2023-07-15 14:29:14 +02:00
|
|
|
-D IMHEX_BUNDLE_DOTNET=OFF \
|
2022-07-31 00:43:42 +02:00
|
|
|
# when capstone >= 5.x is released we should be able to build against \
|
|
|
|
# system libs of it \
|
|
|
|
# -D USE_SYSTEM_CAPSTONE=ON
|
|
|
|
|
|
|
|
%cmake_build
|
|
|
|
|
|
|
|
|
2023-01-10 23:10:34 +01:00
|
|
|
%check
|
|
|
|
%if 0%{?rhel}
|
|
|
|
. /opt/rh/gcc-toolset-12/enable
|
|
|
|
%set_build_flags
|
|
|
|
CXXFLAGS+=" -std=gnu++2b"
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
2022-07-31 00:43:42 +02:00
|
|
|
%install
|
|
|
|
%cmake_install
|
2023-01-10 23:10:34 +01:00
|
|
|
desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop
|
|
|
|
|
|
|
|
# this is a symlink for the old appdata name that we don't need
|
|
|
|
rm -f %{buildroot}%{_metainfodir}/net.werwolv.%{name}.appdata.xml
|
|
|
|
|
|
|
|
# AppData
|
|
|
|
appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/net.werwolv.%{name}.metainfo.xml
|
|
|
|
|
|
|
|
# install licenses
|
2023-11-12 02:02:54 +01:00
|
|
|
cp -a lib/third_party/nativefiledialog/LICENSE %{buildroot}%{_datadir}/licenses/%{name}/nativefiledialog-LICENSE
|
|
|
|
cp -a lib/third_party/capstone/LICENSE.TXT %{buildroot}%{_datadir}/licenses/%{name}/capstone-LICENSE
|
|
|
|
cp -a lib/third_party/capstone/suite/regress/LICENSE %{buildroot}%{_datadir}/licenses/%{name}/capstone-regress-LICENSE
|
|
|
|
cp -a lib/third_party/microtar/LICENSE %{buildroot}%{_datadir}/licenses/%{name}/microtar-LICENSE
|
|
|
|
cp -a lib/third_party/xdgpp/LICENSE %{buildroot}%{_datadir}/licenses/%{name}/xdgpp-LICENSE
|
2022-07-31 00:43:42 +02:00
|
|
|
|
|
|
|
|
|
|
|
%files
|
2023-01-10 23:10:34 +01:00
|
|
|
%license %{_datadir}/licenses/%{name}/
|
2022-07-31 00:43:42 +02:00
|
|
|
%doc README.md
|
|
|
|
%{_bindir}/imhex
|
2023-12-28 20:26:58 +01:00
|
|
|
%{_bindir}/imhex-updater
|
2023-01-10 23:10:34 +01:00
|
|
|
%{_datadir}/pixmaps/%{name}.png
|
|
|
|
%{_datadir}/applications/%{name}.desktop
|
|
|
|
%{_libdir}/libimhex.so*
|
2024-03-11 21:08:23 +01:00
|
|
|
%{_libdir}/cimgui.so*
|
2023-01-10 23:10:34 +01:00
|
|
|
%{_libdir}/%{name}/
|
|
|
|
%{_metainfodir}/net.werwolv.%{name}.metainfo.xml
|
|
|
|
|
2022-07-31 00:43:42 +02:00
|
|
|
|
|
|
|
%changelog
|