File bluegriffon.spec of Package bluegriffon

#
# spec file for package bluegriffon
#
# Copyright (c) 2022 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/
#

#%%global _prefix /opt
Name:           bluegriffon
Version:        3.1
Release:        0
Summary:        WYSIWYG Editor based on the Mozilla Gecko Engine
Summary(de):    WYSIWYG Editor basirend auf Mozillas Gecko Engine
License:        GPL-2.0
URL:            http://www.bluegriffon.org/
Source0:        http://bluegriffon.org/freshmeat/%{version}/%{name}-%{version}.Ubuntu18.04-x86_64.tar.bz2
Source2:        %{name}_icons.tar.bz2
BuildRequires:  fdupes
Provides:       blue-griffon = %{version}-%{release}
AutoReqProv:    no

%description
BlueGriffon is a new WYSIWYG content editor for the
World Wide Web. Powered by Gecko, the rendering engine
of Firefox 4, it's a modern and robust solution to
edit Web pages in conformance to the latest Web Standards.

%description -l de
BlueGriffon ist ein neuer WYSIWYG Editor für das Internet.
Angetrieben von  Gecko, der Renderingengine von Firefox 4,
ist es eine moderne und robuste Lösung um Webseiten in
Übereinstimmung mit den aktuellen Standards zu bearbeiten.

%prep
echo %{_libdir}
echo %{_bindir}
echo %{_datadir}
#Here we go!
%setup -q -n %{name}
tar --bzip2 -xf %{SOURCE2}

%build

%install

rm -rf %{buildroot}/*
mkdir -p %{buildroot}%{_libdir}/%{name}
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/32x32
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/16x16
mkdir -p %{buildroot}%{_datadir}/pixmaps
#icons
install -m 644 %{name}-16.png %{buildroot}%{_datadir}/icons/hicolor/16x16/%{name}.png
install -m 644 %{name}-32.png %{buildroot}%{_datadir}/icons/hicolor/32x32/%{name}.png
install -m 644 %{name}-48.png %{buildroot}%{_datadir}/pixmaps/%{name}.png
#%%fdupes -s .
cp -r ./* %{buildroot}%{_libdir}/%{name}/


#xdg menu
mkdir -p %{buildroot}%{_datadir}/applications
cat > %{buildroot}%{_datadir}/applications/%{name}.desktop << EOF
[Desktop Entry]
Name=Blue Griffon
Comment=WYSIWYG Web Editor
Exec=%{_bindir}/%{name}
Path=%{_libdir}/%{name}
Icon=%{name}
Terminal=false
Type=Application
Categories=Development;WebDevelopment;
X-Desktop-File-Install-Version=0.22
EOF

mkdir -p %{buildroot}%{_bindir}
ln -s %{_libdir}/%{name}/%{name}-bin %{buildroot}%{_bindir}/%{name}
#rm -f %%{_libdir}/%%{name}/%%{name}-??.png

%files
%dir %{_libdir}
%dir %{_datadir}
%dir %{_bindir}
%dir %{_datadir}/icons
%dir %{_libdir}/%{name}
%dir %{_datadir}/pixmaps/
%dir %{_datadir}/applications/
%{_bindir}/%{name}
%{_datadir}/icons
%{_libdir}/%{name}
%{_datadir}/pixmaps/%{name}.png
%{_datadir}/applications/%{name}.desktop

%changelog
openSUSE Build Service is sponsored by