File 010editor.spec of Package 010editor
#
# spec file for package 010editor
#
# Copyright (c) 2024 SUSE LINUX GmbH, 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/
#
# Stripping binaries breaks them
%undefine _build_create_debug
%define __arch_install_post export NO_BRP_STRIP_DEBUG=true
Name: 010editor
Summary: Text and hex editing with binary tmplates
Version: 14.0.1
Release: 0
License: SUSE-NonFree
Group: Development/Tools/Other
Url: https://www.sweetscape.com/010editor
%ifarch %ix86
Source0: https://download.sweetscape.com/010EditorLinux32Installer%{version}.tar.gz
%endif
%ifarch x86_64
Source0: https://download.sweetscape.com/010EditorLinux64Installer%{version}.tar.gz
%endif
Source1: %name-rpmlintrc
BuildRequires: hicolor-icon-theme
BuildRequires: update-desktop-files
BuildRequires: fdupes
# Don't provide the bundled dependencies to other packages
AutoReqProv: off
ExclusiveArch: %ix86 x86_64
%description
Professional text and hex editing with binary templates.
%prep
%setup -q -c %{name}-%{version}
%build
%install
mkdir -p %{buildroot}%{_libexecdir}
mv %{name}/ %{buildroot}%{_libexecdir}/
chmod -x %{buildroot}%{_libexecdir}/%{name}/Data/010Repository.zip
chmod -x %{buildroot}%{_libexecdir}/%{name}/Data/010Repository.xml
# Executable
mkdir -p %{buildroot}%{_bindir}
ln -s %{_libexecdir}/%{name}/010editor %{buildroot}%{_bindir}/010editor
# Icon
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/
ln -s %{_libexecdir}/%{name}/010_icon_128x128.png %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/%{name}.png
%suse_update_desktop_file -c %{name} "010 Editor" "A text and hex editor" %{name} %{name} Utility X-SuSE-Editor
%fdupes %{buildroot}%{_libexecdir}/010editor
%files
%license %{_libexecdir}/%{name}/LICENSE
%{_bindir}/010editor
%{_libexecdir}/010editor/
%{_datadir}/icons/hicolor/128x128/apps/010editor.png
%{_datadir}/applications/010editor.desktop
%changelog