File drgeo.spec of Package drgeo
#
# spec file for package gambas2
#
# 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/
#
Name: drgeo
Version: 12.10a
Release: 0
License: GPL-2.0+
Summary: Interactive Geometry Program
Url: http://www.ofset.org/drgeo
Group: Productivity/Graphics/CAD
Source0: DrGeo.app-%{version}.zip
Source1: drgeo.desktop
BuildRequires: fdupes
BuildRequires: unzip
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
An interactive geometry program that allows the construction of
interactive geometric figures. It is oriented towards education.
%prep
%setup -q -n DrGeo.app
%build
#
%install
mkdir -p %{buildroot}%{_datadir}/%{name}
mkdir -p %{buildroot}%{_bindir}
cp -r * %{buildroot}%{_datadir}/%{name}/
for i in ChangeLog LICENSE drgeo.exe *.dll Contents/MacOS ; do
rm -rf %{buildroot}%{_datadir}/%{name}/$i
done
install -D -m 644 %{SOURCE1} %{buildroot}/%{_datadir}/applications/%{name}.desktop
install -D -m 644 Contents/Resources/drgeo.png %{buildroot}/%{_datadir}/pixmaps/%{name}.png
cat > %{buildroot}%{_bindir}/%{name} <<EOF
#!/bin/sh
#
cd %{_datadir}/%{name}
sh drgeo.sh
cd ..
EOF
chmod +x %{buildroot}%{_bindir}/%{name}
%fdupes -s %{buildroot}
%find_lang DrGeoII
%find_lang pharo
cat DrGeoII.lang pharo.lang > %{name}.lang
%clean
rm -rf %{buildroot}
%files -f %{name}.lang
%defattr(-,root,root)
%doc ChangeLog LICENSE
%dir %{_datadir}/%{name}
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png
%{_datadir}/%{name}/*
%changelog