Sophie

Sophie

distrib > Fedora > 13 > x86_64 > by-pkgid > a38d1c4f8ff4edd7ea08bd98b074512e > files > 9

ularn-1.5p4-15.fc12.src.rpm

Name:           ularn
Version:        1.5p4
Release:        15%{?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
Requires(post): coreutils
Requires(postun): coreutils

%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
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5p4-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Sun Mar 01 2009 Caolán McNamara <caolanm@redhat.com> - 1.5p4-14
- . config.h.SH -> . ./config.h.SH for new bash

* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5p4-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Thu Dec 18 2008 Wart <wart at kobold.org> 1.5p4-12
- Add coreutils requirement for rpm post scripts (BZ #475915)

* Fri Feb 8 2008 Wart <wart at kobold.org> 1.5p4-11
- Rebuild for gcc 4.3

* Tue Aug 21 2007 Wart <wart at kobold.org> 1.5p4-10
- License tag clarification

* Sat Aug 11 2007 Wart <wart at kobold.org> 1.5p4-9
- Use correct .desktop file version

* 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.