From bf660b0b1ed3fdda4bf3216d9560a8b15b27be1a Mon Sep 17 00:00:00 2001 From: B Stack Date: Fri, 5 Apr 2019 20:23:52 -0400 Subject: add 7w-0.0.1 rpm and add btt scalable icon --- 7w/7w.spec | 122 +++++++++++++++++++++++++++++++++++++++++++++++++ 7w/7w.svg | 152 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 274 insertions(+) create mode 100644 7w/7w.spec create mode 100644 7w/7w.svg (limited to '7w') diff --git a/7w/7w.spec b/7w/7w.spec new file mode 100644 index 0000000..0e0d554 --- /dev/null +++ b/7w/7w.spec @@ -0,0 +1,122 @@ +%global use_master 1 +%if 0%{use_master} +%global vername master +%else +%global vername %{version} +%endif + +# turn off debug package +%define debug_package %{nil} + +Name: 7w +Version: 0.0.1 +Release: 1%{?dist} +Summary: Ncurses-based implementation of 7 Wonders + +Group: Games/Boardgame +License: GPL2 +#OriginalURL: https://github.com/NathanRVance/7w +URL: https://gitlab.com/bgstack15/%{name} +Source0: %{URL}/-/archive/%{vername}/%{name}-%{vername}.tar.gz +Source1: %{name}.svg + +Packager: B Stack +BuildRequires: gcc +BuildRequires: ncurses-devel +Requires: ncurses +# do not require the icon theme. the rpm can make the dirs, and it won't hurt on terminal-only systems to have the directories with just these icons. +#Requires: hicolor-icon-theme + +%description +7 Wonders is a drafting card game by Antoine Bauza and adapted for ncurses-based gameplay by Nathan Vance. Other works by the computer adaptation author include cettlers, an ncurses adapation of Settlers of Catan. + +%prep +#%%setup -n %%{name}-%%{vername} +tar -zxf %{SOURCE0} +cp -p %{SOURCE1} . + +%build +cd %{name}-* +cd Release +%make_build + +%install +pushd %{name}-* +#%%make_install +# upstream has no install instructions +install -d %{buildroot}%{_licensedir}/%{name} %{buildroot}%{_bindir} +install -m0644 LICENSE %{buildroot}%{_licensedir}/%{name}/ +install -m0755 Release/%{name} %{buildroot}%{_bindir}/ + +# desktop files +install -d %{buildroot}%{_datadir}/applications +cat < %{buildroot}%{_datadir}/applications/%{name}.desktop +#!/usr/bin/xdg-open +[Desktop Entry] +Name=7 Wonders +Exec=%{_bindir}/%{name} +Type=Application +StartupNotify=true +Path=%{_bindir} +Icon=%{name} +StartupWMClass=_7wonders +Comment=Drafting card game +Terminal=true +Categories=Game;BoardGame; +EOF + +# application start script +# none + +# man pages +# none + +# mimetypes +# none + +# icons +popd +for res in 16 22 24 32 48 64 96 128 256 ;do + dir=%{buildroot}%{_datadir}/icons/hicolor/${res}x${res}/apps + mkdir -p ${dir} + for icon in %{name} ; do + convert ${icon}.svg -filter Lanczos -resize ${res}x${res} \ + ${dir}/${icon}.png + done +done +scalable_dir="%{buildroot}%{_datadir}/icons/hicolor/scalable/apps" +install -d "${scalable_dir}" +install -m0644 "%{name}.svg" "${scalable_dir}" + +%clean +%{__rm} -rf %{buildroot} || : + +%post +touch --no-create %{_datadir}/icons/hicolor 1>/dev/null 2>&1 || : +update-desktop-database 1>/dev/null 2>&1 || : + +%preun +# is it a final removal? +#if test "$1" = "0" ; +#then +#fi + +%postun +update-desktop-database &> /dev/null || : + +%posttrans +gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : + +%files +#%license %attr(444, -, -) NONE.txt +#%doc %attr(444, -, -) NONE.txt +%license %attr(444, -, -) %{_licensedir}/* +#%doc %attr(444, -, -) %%{_docdir}/*/* +%{_bindir}/%{name} +%{_datadir}/applications/*.desktop +%{_datadir}/icons/hicolor/*/apps/* +#%%{_datadir}/%%{name} + +%changelog +* Fri Apr 5 2019 B Stack - 0.0.1-1 +- Initial rpm built diff --git a/7w/7w.svg b/7w/7w.svg new file mode 100644 index 0000000..4a3aa6f --- /dev/null +++ b/7w/7w.svg @@ -0,0 +1,152 @@ + + + + + 7w icon + + + + + + + + + + + image/svg+xml + + 7w icon + 2019-04-05 + + + bgstack15 + + + + + + + + + + + + + + + + + + + + + + + + 7w + + -- cgit