File veles.spec of Package veles
#
# spec file for package veles
#
# Copyright (c) 2023 SUSE LLC, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#
%define pyversion 3.13
Name: veles
Version: 2018.05.0.TIF
Release: 0
Summary: A new age tool for binary analysis
License: Apache-2.0
Url: https://github.com/codilime/veles
Source: %{name}-%{version}.tar.gz
Source1: %{name}-rpmlintrc
Patch1: 0001-fix-msgpack-detection.patch
Patch2: 0002-add-qrc_veles-to-sources.patch
Patch3: 0003-libveles_base-needs-zlib.patch
Patch4: 0004-setup.cfg-fix-home_page-spelling.patch
BuildRequires: cmake >= 3.1.0
BuildRequires: clang
BuildRequires: gcc-c++
BuildRequires: gmock
BuildRequires: gtest
BuildRequires: fdupes
BuildRequires: libopenssl-devel
BuildRequires: libQt5Core-devel >= 5.5
BuildRequires: libQt5Gui-devel
BuildRequires: libQt5Network-devel
BuildRequires: libQt5Widgets-devel
BuildRequires: msgpack-c-devel
BuildRequires: msgpack-cxx-devel
BuildRequires: python3 = %{pyversion}
BuildRequires: %{python_module kaitaistruct}
BuildRequires: %{python_module msgpack}
BuildRequires: %{python_module pbr}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pyOpenSSL}
BuildRequires: %{python_module six}
BuildRequires: %{python_module wheel}
BuildRequires: update-desktop-files
BuildRequires: zlib-devel
%description
It is a very difficult task for a human to notice subtle patterns in
large amounts of binary data, however, us humans are very good at
finding patterns in images. Statistical visualizations let you find the
important bits in a sea of binary data - all at a glance.
%prep
%setup -q
%patch -P1 -p1
%patch -P2 -p1
%patch -P3 -p1
%patch -P4 -p1
rm -f python/requirements.txt
touch python/requirements.txt
%build
%cmake
%cmake_build || /bin/true
rm -rf msgpack-venv/lib/python%{pyversion}/site-packages
ln -s /usr/lib/python%{pyversion}/site-packages msgpack-venv/lib/python%{pyversion}/site-packages
rm -f msgpack-venv/lib64
mkdir -p msgpack-venv/lib64/python%{pyversion}
ln -s /usr/lib64/python%{pyversion}/site-packages msgpack-venv/lib64/python%{pyversion}/site-packages
%cmake_build
%install
mkdir -p %{buildroot}/%{_libdir}
install build/libveles_base.so %{buildroot}/%{_libdir}
%cmake_install
%suse_update_desktop_file -i -u %{name} Utility DesktopUtility
%fdupes %{buildroot}%{_datadir}/%{name}
%post -p /sbin/ldconfig
%files
%defattr(-,root,root)
%license LICENSE-2.0
%doc *.md
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}-server
%{_libdir}/*
%{_datadir}/%{name}/*
%{_datadir}/%{name}-server/*
%{_datadir}/applications/*.desktop
%{_bindir}/*
%changelog