File mht2htm.spec of Package mht2htm
#
# spec file for package mht2htm
#
# Copyright (c) 2025 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: mht2htm
Version: 1.7.7.97
Release: 0
Summary: Conversion from *.mht files to *.htm files
License: GPL-3.0-or-later
Group: Productivity/Office/Other
URL: https://pgm.bpalanka.com/
Source: https://sourceforge.net/projects/%{name}/files/%{name}/%{version}%{20}%{2819}.dec.2012%{29}/%{name}-%{version}_19.dec.2012.source.zip
Source1: https://sourceforge.net/projects/%{name}/files/%{name}/%{version}%{20}%{2819}.dec.2012%{29}/%{name}-%{version}_19.dec.2012.help.zip
Source2: %{name}-README
Source3: %{name}.desktop
BuildRequires: ImageMagick
BuildRequires: cairo-devel
BuildRequires: fdupes
BuildRequires: fpc
BuildRequires: lazarus
BuildRequires: libexpat-devel
BuildRequires: pkgconfig
BuildRequires: unzip
BuildRequires: pkgconfig(x11)
%description
mht2htm extracts all files from mht in single dir so you can
open it on any OS. Also works with .eml, .msg, .nws... files.
%prep
%setup -q -c "%{name}-%{version}" -a 1
%build
sed -i 904,905"s|ExtractFilePath(Application\.ExeName)"\+\'help\'"|\'%{_defaultdocdir}/%{name}/help\'|" main.pas
lazbuild -r %{name}.lpi
%install
install -Dm 0755 %{name} %{buildroot}%{_bindir}/%{name}
install -Dm 0644 %{SOURCE2} %{buildroot}%{_defaultdocdir}/%{name}/README
install -Dm 0644 %{SOURCE3} %{buildroot}%{_datadir}/applications/%{name}.desktop
cp -a help %{buildroot}%{_defaultdocdir}/%{name}
convert %{name}.ico\[0\] $RPM_SOURCE_DIR/%{name}.png
install -Dm 0644 $RPM_SOURCE_DIR/%{name}.png %{buildroot}%{_datadir}/pixmaps/%{name}.png
%fdupes %{buildroot}%{_datadir}
%files
%{_bindir}/%{name}*
%{_defaultdocdir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png
%changelog