Search
SailfishOS Open Build Service
>
Projects
>
sailfishos
:
chum
:
testing
>
nethack
> _service:tar_git:nethack.spec
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File _service:tar_git:nethack.spec of Package nethack
# # Do NOT Edit the Auto-generated Part! # Generated by: spectacle version 0.32 # Name: nethack # >> macros # << macros %define sgid_group users %define nh_prefix %{_datadir}/%{name} %define nh_indir %{_prefix}/libexec/%{name} %define nh_vardir %{nh_prefix}/var %define kbd_ft_dir %{_datadir}/fingerterm/data %define kbd_ft_icon_dir %{_datadir}/fingerterm/icons Summary: The classic Roguelike Version: 3.6.7+obs2 Release: 1 Group: Amusements/Games License: NGPL URL: https://www.nethack.org/ Source0: %{name}-%{version}.tar.gz Source1: linux-sfos.hint Source2: nethackrc Source3: nethack.desktop Source100: nethack.yaml Patch0: %{name}_bison.patch Requires(pre): glibc-common BuildRequires: pkgconfig(ncurses) BuildRequires: bison BuildRequires: flex BuildRequires: desktop-file-utils Provides: openrepos-nethack = %{version} Conflicts: openrepos-nethack <= %{version} Obsoletes: openrepos-nethack < %{version} %description NetHack is a single player dungeon exploration game that runs on a wide variety of computer systems, with a variety of graphical and text interfaces all using the same game engine. Unlike many other Dungeons & Dragons-inspired games, the emphasis in NetHack is on discovering the detail of the dungeon and not simply killing everything in sight - in fact, killing everything in sight is a good way to die quickly. Each game presents a different landscape - the random number generator provides an essentially unlimited number of variations of the dungeon and its denizens to be discovered by the player in one of a number of characters: you can pick your race, your role, and your gender. %if "%{?vendor}" == "chum" PackageName: NetHack Type: console-application PackagerName: nephros Categories: - Game Custom: Repo: https://github.com/NetHack/NetHack PackagingRepo: https://gitlab.com/nephros/openrepos-nethack Icon: https://gitlab.com/nephros/openrepos-nethack/-/raw/obs/icons/nethack_256.png Url: Homepage: https://nethack.org Help: http://nethack.org/v367/Guidebook.html %endif %package keyboard Summary: Keyboard Layouts optimized for NetHack License: LGPLv2+ Group: System/Console Version: 3.6.7+obs2 Release: 2 URL: https://openrepos.net/content/nephros/terminal-keyboard-nethack BuildArch: noarch Requires: fingerterm Provides: openrepos-nethack-keyboard = %{version} Conflicts: openrepos-nethack-keyboard < %{version} %description keyboard A NetHack-optimized layout for ToeTerm/FingerTerm %if "%{?vendor}" == "chum" PackageName: NetHack Keyboard Type: console-application DeveloperName: nephros Categories: - Game - ConsoleOnly Custom: Repo: https://gitlab.com/nephros/openrepos-nethack %endif %prep %setup -q -n %{name}-%{version}/upstream # %{name}_bison.patch %patch0 -p1 # >> setup # << setup %build # >> build pre cp %{SOURCE1} linux-sfos.hint sed -i "s!@@PREFIX@@!%{nh_prefix}!" linux-sfos.hint #sed -i "s!@@PKGNAME@@!%%{name}!" linux-sfos.hint sed -i "s!@@VARDIR@@!%{nh_vardir}!" linux-sfos.hint sed -i "s!@@INSTDIR@@!%{nh_indir}!" linux-sfos.hint sys/unix/setup.sh linux-sfos.hint # << build pre # >> build post make %{?_smp_mflags} # << build post %install rm -rf %{buildroot} # >> install pre # << install pre # >> install post #TODO: this doesn't have a proper DESTDIR, so paths are all wrong. it also does rm -rf INSTDIR, which is bad... # %%{__make} install PREFIX="%%{buildroot}"/fakeinstall VARDIR="%%{buildroot}"/fakeinstall/var %{__make} -j1 all %{__install} -p -D -m 755 --strip src/nethack $RPM_BUILD_ROOT/%{nh_indir}/nethack %{__install} -p -D -m 755 --strip util/recover $RPM_BUILD_ROOT/%{nh_indir}/nethack-recover %{__install} -p -D -m 644 dat/nhdat $RPM_BUILD_ROOT/%{nh_vardir}/nhdat %{__install} -p -D -m 644 dat/symbols $RPM_BUILD_ROOT/%{nh_vardir}/symbols # this may contain debug settings if we are not on a release branch # using an empty one is okay. touch sysconf %{__install} -p -D -m 644 sysconf $RPM_BUILD_ROOT/%{nh_prefix}/sysconf %{__install} -p -D -m 644 sys/unix/sysconf $RPM_BUILD_ROOT/%{nh_prefix}/sysconf.build %{__install} -p -d -m 2770 $RPM_BUILD_ROOT/%{nh_vardir} %{__install} -p -d -m 2770 $RPM_BUILD_ROOT/%{nh_vardir}/save # create empty files and use install to set correct perissions: touch logfile perm record xlogfile paniclog %{__install} -p -D -m 660 logfile $RPM_BUILD_ROOT/%{nh_vardir}/logfile %{__install} -p -D -m 660 perm $RPM_BUILD_ROOT/%{nh_vardir}/perm %{__install} -p -D -m 660 record $RPM_BUILD_ROOT/%{nh_vardir}/record %{__install} -p -D -m 660 xlogfile $RPM_BUILD_ROOT/%{nh_vardir}/xlogfile %{__install} -p -D -m 660 xlogfile $RPM_BUILD_ROOT/%{nh_vardir}/paniclog # prepare and install launch script sed -i -e 's@/usr/games/lib/nethackdir@%{nh_vardir}@' sys/unix/nethack.sh sed -i -e 's@HACK=$HACKDIR/nethack@HACK=%{nh_indir}/nethack\nNETHACKOPTIONS=%{nh_prefix}/nethackrc\nexport NETHACKOPTIONS\n@' sys/unix/nethack.sh %{__install} -p -D -m 755 sys/unix/nethack.sh $RPM_BUILD_ROOT/%{_bindir}/nethack # custom nethackrc %{__install} -p -D -m 644 %{SOURCE2} $RPM_BUILD_ROOT/%{nh_prefix}/nethackrc # install desktop file %{__install} -p -D -m 644 %{SOURCE3} $RPM_BUILD_ROOT/%{_datadir}/applications/%{name}.desktop sed -i "s!@@BINPATH@@!%{_bindir}!;s!@@BINNAME@@!%{name}!" $RPM_BUILD_ROOT/%{_datadir}/applications/%{name}.desktop # install icons for r in 256 128 86; do %{__install} -p -D -m 644 %{_builddir}/%{name}-%{version}/icons/%{name}_${r}.png $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/${r}x${r}/apps/%{name}.png done # keyboard files %{__install} -p -D -m 644 %{_builddir}/%{name}-%{version}/keyboard/%{name}-keyboard.layout $RPM_BUILD_ROOT/%{kbd_ft_dir}/nethack.layout %{__install} -p -D -m 644 %{_builddir}/%{name}-%{version}/keyboard/%{name}-keyboard-side.layout $RPM_BUILD_ROOT/%{kbd_ft_dir}/nethack-side.layout pushd %{_builddir}/%{name}-%{version}/keyboard/icons for i in *png; do %{__install} -p -D -m 644 ${i} $RPM_BUILD_ROOT/%{kbd_ft_icon_dir}/${i} done popd # << install post desktop-file-install --delete-original \ --dir %{buildroot}%{_datadir}/applications \ %{buildroot}%{_datadir}/applications/*.desktop %pre # >> pre getent group %{sgid_group} >/dev/null || echo "error: group %{sgid_group} does not exist, refusing to create it" # << pre %post # >> post /usr/bin/update-desktop-database -q || : # << post %postun # >> postun /usr/bin/update-desktop-database -q || : # << postun %files %defattr(-,root,root,-) %license dat/license %{_datadir}/icons/hicolor/*/apps/%{name}.png %{_datadir}/applications/%{name}.desktop %{nh_prefix}/nethackrc %dir %{nh_indir} %{nh_vardir}/nhdat %{nh_vardir}/symbols %{nh_prefix}/sysconf* %attr(0755, root, root) %{_bindir}/%{name} %attr(2755, root, %{sgid_group}) %{nh_indir}/%{name} %attr(2755, root, %{sgid_group}) %{nh_indir}/%{name}-recover %attr(2770, root, %{sgid_group}) %dir %{nh_vardir} %attr(2770, root, %{sgid_group}) %dir %{nh_vardir}/save %attr(660, root, %{sgid_group}) %config(noreplace) %{nh_vardir}/logfile %attr(660, root, %{sgid_group}) %config(noreplace) %{nh_vardir}/xlogfile %attr(660, root, %{sgid_group}) %config(noreplace) %{nh_vardir}/perm %attr(660, root, %{sgid_group}) %config(noreplace) %{nh_vardir}/record %attr(660, root, %{sgid_group}) %config(noreplace) %{nh_vardir}/paniclog # >> files # << files %files keyboard %defattr(-,root,root,-) %{kbd_ft_dir}/nethack.layout %{kbd_ft_dir}/nethack-side.layout %{kbd_ft_icon_dir}/*.png # >> files keyboard # << files keyboard