File gnustep-Puzzles.spec of Package gnustep-Puzzles
#
# spec file for package gnustep-Puzzles
#
# Copyright (c) 2017 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/
#
%define _name Puzzles
Name: gnustep-Puzzles
Version: 20180227.2adf005
Release: 0
Summary: Portable Puzzle Collection
License: MIT
Group: Amusements/Games/Logic
Url: https://www.chiark.greenend.org.uk/~sgtatham/puzzles
Source: puzzles-%{version}.tar.gz
BuildRequires: gcc-objc
BuildRequires: gnustep-base-devel
BuildRequires: gnustep-gui-devel
BuildRequires: gnustep-make
BuildRequires: hicolor-icon-theme
Requires: gnustep-back
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Simon Tatham's Portable Puzzle Collection.
%prep
%setup -q -n puzzles-%{version}
%build
ln -s Makefile.gnustep GNUmakefile
. %{_datadir}/GNUstep/Makefiles/GNUstep.sh
make %{?_smp_mflags}
%install
#. %%{_datadir}/GNUstep/Makefiles/GNUstep.sh
#%%make_install GNUSTEP_INSTALLATION_DOMAIN=SYSTEM
install -dm 0755 %{buildroot}%{_bindir}
ln -s %{_libdir}/GNUstep/Applications/%{_name}.app/%{_name} %{buildroot}%{_bindir}/
install -dm 0755 %{buildroot}%{_libdir}/GNUstep/Applications
cp -a %{_name}.app %{buildroot}%{_libdir}/GNUstep/Applications/
cat > %{buildroot}%{_libdir}/GNUstep/Applications/%{_name}.app/%{_name}.desktop <<-EOF
[Desktop Entry]
Encoding=UTF-8
Type=Application
Categories=X-GNUstep;Game;LogicGame;
Name=%{_name}
Comment=Simon Tatham's Portable Puzzle Collection
Icon=%{_libdir}/GNUstep/Applications/%{_name}.app/Resources/%{_name}.icns
Exec=%{_bindir}/openapp %{_name}
FilePattern=Puzzles.app;Puzzles;
EOF
%files
%defattr(-,root,root)
%license LICENCE
%doc README puzzles.txt
%{_bindir}/%{_name}
%{_libdir}/GNUstep
%changelog