Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 3df41aece58dd02d97265070b360ea0a > files > 2

dopewars-1.5.12-9.1033svn.fc13.src.rpm

# State dir for savegames
%global _localstatedir /var/lib/games
# SVN release
%global rel 1033

Summary:	A drug dealing game
Name:		dopewars
Version:	1.5.12
Release:	9.%{rel}svn%{?dist}
URL:		http://dopewars.sourceforge.net/
License:	GPLv2+
Group:		Amusements/Games
#Source0:	http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
## The source tarball has been generated followingly:
# svn co https://svn.sourceforge.net/svnroot/dopewars/dopewars/trunk dopewars
# tar jcf dopewars-%{version}-%{rel}svn.tar.bz2
Source0:	%{name}-%{version}-%{rel}svn.tar.bz2
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:	esound-devel
BuildRequires:	desktop-file-utils
BuildRequires:	gtk2-devel
BuildRequires:	ncurses-devel
BuildRequires:	SDL_mixer-devel

# SVN stuff
BuildRequires:	automake
BuildRequires:	autoconf
BuildRequires:	gettext

%description
Based on John E. Dell's old Drug Wars game, dopewars is a simulation of an
imaginary drug market. dopewars is an All-American game which features
buying, selling, and trying to get past the cops!

The first thing you need to do is pay off your debt to the Loan Shark. After
that, your goal is to make as much money as possible (and stay alive)! You
have one month of game time to make your fortune.

dopewars supports multiple players via. TCP/IP. Chatting to and fighting
with other players (computer or human) is supported; check the command line
switches (via dopewars -h) for further information.

%package sdl
Summary:	SDL sound support for dopewars
Group:		Amusements/Games
Requires:	%{name} = %{version}-%{release}
%description sdl
This package adds a plugin to dopewars to allow sound to be output via.
the Simple DirectMedia Layer mixer (SDL_mixer).

%prep
#%setup -q
%setup -q -n %{name}
# Clean out svn stuff
find . -name .svn | xargs rm -rf;
# Fix documentation
iconv -f ISO-8859-1 -t UTF-8 ChangeLog > ChangeLog.new && \
mv ChangeLog.new ChangeLog
chmod 644 doc/*.html

%build
./autogen.sh
%configure \
	--enable-shared --disable-static \
	--enable-gui-server --enable-curses-client \
	--enable-gui-client --with-sdl --with-esd
make %{?_smp_mflags}

%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
%find_lang %{name}

# Fix desktop file install
mv %{buildroot}/%{_datadir}/gnome/apps/Games/dopewars.desktop .
iconv -f ISO-8859-1 -t UTF-8 dopewars.desktop > dopewars.desktop.new && \
mv dopewars.desktop{.new,}
desktop-file-install --vendor="" \
--dir=${RPM_BUILD_ROOT}%{_datadir}/applications dopewars.desktop

# Remove documentation installed by make install
rm -rf %{buildroot}%{_docdir}

%clean
rm -rf %{buildroot}

%post
%{_bindir}/dopewars -C %{_localstatedir}/dopewars.sco

%files -f %{name}.lang
%defattr(-,root,root,-)
%doc ChangeLog LICENCE NEWS README doc/*.html doc/example-cfg
# Score file needs to be writable by games group
%attr(0664,root,games) %{_localstatedir}/dopewars.sco
# Bin file needs to be able to write into score file
%attr(2755,root,games) %{_bindir}/dopewars
%{_mandir}/man6/*
%{_libdir}/dopewars
%exclude %{_libdir}/dopewars/libsound_sdl.so
%{_datadir}/applications/*
%{_datadir}/pixmaps/*
%{_datadir}/dopewars

%files sdl
%defattr(-,root,root)
%{_libdir}/dopewars/libsound_sdl.so

%changelog
* Fri Oct 09 2009 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.5.12-9.1033svn
- Increment release to be able to tag in F-12.

* Fri Oct 09 2009 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.5.12-8.1033svn
- Update to svn release to address security issues.

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.12-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.12-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Sat Nov 29 2008 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.5.12-5
- Also fix release tag.

* Sat Nov 29 2008 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.5.12-4
- Fix bug 473644, unowned directory.

* Fri Nov 07 2008 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.5.12-3
- Fix source URL.

* Tue Nov 04 2008 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.5.12-2
- Add BR desktop-file-utils.

* Tue Nov 04 2008 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.5.12-1
- Spec file cleanups for Fedora inclusion.

* Mon Jul 28 2003 Ben Webb <benwebb@users.sf.net>
- High score file moved to /var/lib/games for consistency with
  other packages

* Mon Oct 21 2002 Ben Webb <benwebb@users.sf.net>
- Dependency on SDL-devel added to properly build SDL plugin

* Fri Oct 18 2002 Ben Webb <benwebb@users.sf.net>
- ESD plugin incorporated into main package
- Sound files added to distribution

* Fri Jun 21 2002 Ben Webb <benwebb@users.sf.net>
- Description typos corrected
- A lot of hardcoded texts replaced with %%{name} etc.
- Redundant make arguments removed

* Mon May 13 2002 Ben Webb <benwebb@users.sf.net>
- SDL and ESD plugin subpackages added

* Sun Feb 03 2002 Ben Webb <benwebb@users.sf.net>
- Use of %%attr tidied up
- Rebuild with new version

* Wed Oct 17 2001 Ben Webb <benwebb@users.sf.net>
- Added in %%attrs to allow building by non-root users

* Wed Sep 26 2001 Ben Webb <benwebb@users.sf.net>
- Added support for a buildroot