File yed.spec of Package yEd
#
# spec file for package yEd
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2018 PERLUR Group
# Copyright (c) 2018 Mark Stopka <mark.stopka@perlur.cloud>
#
# 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 _edition optional
%define _name squirrelsql
Name: yEd
Version: 3.9.0
Release: 0
License: https://www.yworks.com/resources/yed/license.html
Summary: A Graphing Tool.
Url: https://www.yworks.com/products/yed
Group: Office
#Source: %{_name}-%{version}-%{_edition}.zip
BuildArch: noarch
BuildRequires: update-desktop-files
#BuildRequires: unzip
BuildRequires: fdupes
#Conflicts: squirrelsql
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
SQuirreL SQL Client is a graphical SQL client written in Java
that will allow you to view the structure of a JDBC compliant database,
browse the data in tables, issue SQL commands etc.
%prep
%setup -q -n %{_name}-%{version}-%{_edition}
%build
%suse_update_desktop_file -c %{name} "SQuirreL SQL" "SQuirreL SQL Client" %_bindir/%{name} %_datadir/%name/icons/acorn.ico Development Tools IDE
%install
install -dm 0755 "%buildroot/%_datadir/%name"
install -m 0644 %{name}.jar "%buildroot/%_datadir/%name/"
install -m 0755 %{name}.sh "%buildroot/%_datadir/%name/"
install -dm 0755 "%buildroot/%_bindir/"
#install -m 0755 %{name}.sh "%buildroot/%_bindir/%name"
echo '#!/bin/bash' >> "%buildroot/%_bindir/%name"
echo bash "%_datadir/%name/%name.sh" >> "%buildroot/%_bindir/%name"
chmod 0755 "%buildroot/%_bindir/%name"
install -dm 0755 "%buildroot/%_datadir/%name/icons"
cp -rp icons/* "%buildroot/%_datadir/%name/icons/"
install -dm 0755 "%buildroot/%_datadir/%name/plugins"
cp -rp plugins/* "%buildroot/%_datadir/%name/plugins/"
install -dm 0755 "%buildroot/%_datadir/%name/lib"
cp -rp lib/* "%buildroot/%_datadir/%name/lib/"
install -dm 0755 "%buildroot/%_datadir/%name/squirrelcli"
cp -rp squirrelcli/* "%buildroot/%_datadir/%name/squirrelcli/"
%fdupes -s "%buildroot/%_datadir/%name"
#%fdupes -s "%buildroot/%_bindir/%name"
#%post
%files
%defattr(-,root,root)
%{_bindir}/%{name}
%{_datadir}/%{name}
/usr/share/applications/%{name}.desktop
%changelog