127 lines
4.1 KiB
RPMSpec
127 lines
4.1 KiB
RPMSpec
Name: ularn
|
|
Version: 1.5p4
|
|
Release: 8%{?dist}
|
|
Summary: Simple roguelike game
|
|
|
|
Group: Amusements/Games
|
|
License: GPL
|
|
URL: http://www.ularn.org
|
|
Source0: http://downloads.sourceforge.net/ularn/Ularn-1.5ishPL4.tar.gz
|
|
Source1: config.sh.in
|
|
Source2: ularn.desktop
|
|
Source3: ularn.png
|
|
Patch0: ularn-build.patch
|
|
Patch1: ularn-euid.patch
|
|
Patch2: ularn-datadir.patch
|
|
Patch3: ularn-drop-setgid.patch
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
|
BuildRequires: ncurses-devel
|
|
BuildRequires: desktop-file-utils
|
|
Requires: ncompress
|
|
|
|
%description
|
|
A text-based roguelike game based on the original Larn. Travel through
|
|
dungeons collecting weapons, killing monsters, in order to find and sell the
|
|
Eye of Larn to save your sick daughter.
|
|
|
|
%prep
|
|
%setup -q -n Ularn
|
|
|
|
# The configure script for this package is interactive. However, it
|
|
# produces a config.sh script that can be customized if necessary.
|
|
# a pre-built config.sh script is used to avoid running an interactive
|
|
# configure script, but still must be customized slightly.
|
|
sed -e 's#@bindir@#%{_bindir}#' \
|
|
-e 's#@datadir@#%{_datadir}#' \
|
|
-e 's#@var@#%{_var}#' < %{SOURCE1} > config.sh
|
|
chmod +x config.h.SH
|
|
%patch0 -p1
|
|
%patch1 -p1
|
|
%patch2 -p1
|
|
%patch3 -p1
|
|
|
|
%build
|
|
# Keep track of where we are. Some of the configuration scripts change
|
|
# the current working directory.
|
|
builddir=`pwd`
|
|
. config.h.SH
|
|
${builddir}/Makefile.u.SH
|
|
cd ${builddir}
|
|
mv Makefile.u Makefile
|
|
CC="gcc $RPM_OPT_FLAGS" make %{?_smp_mflags}
|
|
|
|
%install
|
|
rm -rf $RPM_BUILD_ROOT
|
|
make install DESTDIR=$RPM_BUILD_ROOT
|
|
mkdir -p $RPM_BUILD_ROOT/%{_var}/games
|
|
touch $RPM_BUILD_ROOT/%{_var}/games/Ularn-scoreboard
|
|
|
|
desktop-file-install --vendor fedora \
|
|
--dir ${RPM_BUILD_ROOT}%{_datadir}/applications \
|
|
%{SOURCE2}
|
|
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/32x32/apps/
|
|
install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/32x32/apps/
|
|
|
|
%clean
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
%post
|
|
touch --no-create %{_datadir}/icons/hicolor || :
|
|
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
|
|
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
|
|
fi
|
|
|
|
%postun
|
|
touch --no-create %{_datadir}/icons/hicolor || :
|
|
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
|
|
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
|
|
fi
|
|
|
|
|
|
# Note that the game is setgid games, and the score file is group writable.
|
|
%files
|
|
%defattr(-,root,root,-)
|
|
%attr(2755,root,games) %{_bindir}/Ularn
|
|
%{_datadir}/%{name}
|
|
%config(noreplace) %attr (0664,root,games) %{_var}/games/Ularn-scoreboard
|
|
%{_datadir}/applications/fedora-%{name}.desktop
|
|
%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
|
|
%doc README README.spoilers GPL CHANGES.text Ularnopts
|
|
|
|
|
|
%changelog
|
|
* Sat Mar 3 2007 Wart <wart at kobold.org> 1.5p4-8
|
|
- Update .desktop file categories
|
|
- Use new upstream file location at Sourceforge
|
|
|
|
* Mon Aug 28 2006 Wart <wart at kobold.org> 1.5p4-7
|
|
- Fixed BR: ncurses -> ncurses-devel
|
|
|
|
* Mon Aug 28 2006 Wart <wart at kobold.org> 1.5p4-6
|
|
- Rebuild for Fedora Extras
|
|
|
|
* Sat Apr 15 2006 Wart <wart at kobold.org> 1.5p4-5
|
|
- Update setgid patch to prevent closing the scoreboard file after writing
|
|
it. This file might get written multiple times during the game.
|
|
|
|
* Fri Mar 17 2006 Wart <wart at kobold.org> 1.5p4-4
|
|
- Updated setgid patch to prevent someone from regaining setgid
|
|
privileges.
|
|
- Own /usr/share/ularn directory
|
|
|
|
* Thu Mar 16 2006 Wart <wart at kobold.org> 1.5p4-3
|
|
- Added a patch to use the effective uid in determining the players name,
|
|
or more precisely, don't use the id of the controlling terminal's user.
|
|
- Added a patch to look for game files in /usr/share/ularn and move the
|
|
scoreboard to /var/games.
|
|
- Added a patch to drop setgid privileges after opening the scoreboard file
|
|
for writing.
|
|
|
|
* Mon Mar 13 2006 Wart <wart at kobold.org> 1.5p4-2
|
|
- Added icon for .desktop file.
|
|
- Change default permissions so that only critical files are owned by 'games'
|
|
- Add missing scoreboard file.
|
|
|
|
* Sat Feb 25 2006 Wart <wart at kobold.org> 1.5p4-1
|
|
- Initial spec file.
|