Sophie

Sophie

distrib > Mandriva > 10.0-com > i586 > by-pkgid > c156cf40fe51ef57db1a43381a46bb91 > files > 4

civil-0.82-4mdk.src.rpm

%define name    civil
%define Name    Civil
%define version	0.82
%define release	4mdk
%define pyver	%(python -V 2>&1 | cut -f2 -d" " | cut -f1,2 -d".")

Name:		%{name}
Version:	%{version}
Release:	%{release}
Summary:	Civil is a game that simulates battles in the American Civil War
License:	GPL
Group:		Games/Strategy
Source0:	%{name}_%{version}-2.tar.bz2
Source1:	%{name}-16.png.bz2
Source2:	%{name}-32.png.bz2
Source3:	%{name}-48.png.bz2
URL:		http://civil.sourceforge.net
Requires:	SDL >= 1.2
Requires:	python >= 2.1
Requires:	pygame >= 1.5.3
Requires:	%{name}-graphics = %{version}
Requires:	%{name}-sounds = %{version}
Buildrequires:	python
BuildRoot:	%{_tmppath}/%{name}-buildroot

%description
Civil is a game that simulates battles in the American Civil War. It is 
playable by two players over a network. Civil aims to be able to recreate
battles in great detail.

%package graphics
Summary:	Civil graphics
Group:		Games/Strategy
Requires:	%{name} = %{version}

%description graphics
Graphics for Civil, a simulation of the American Civil War.

%package sounds
Summary:	Civil sounds
Group:		Games/Strategy
Requires:	%{name} = %{version}

%description sounds
Sounds for Civil, a simulation of the American Civil War.

%package scenarios
Summary:	Civil sample scenarios
Group:		Games/Strategy
Requires:	%{name} = %{version}

%description scenarios
Some example scenarios for Civil, a simulation of the American Civil
War.

%package editor
Summary:	Civil scenario editor
Group:		Games/Strategy
Requires:	%{name} = %{version}
Requires:	python-PQueue

%description editor
Scenario editor for civil, a simulation of the American Civil War.

%prep
%setup -q -n %{name}
bzcat %{SOURCE1} > %{name}-16.png
bzcat %{SOURCE2} > %{name}-32.png
bzcat %{SOURCE3} > %{name}-48.png
# fix perms
for file in AUTHORS BUGS ChangeLog INSTALL LICENSE README TODO; do
	chmod 644 $file; 
done
# fix python version
perl -pi -e 's/python2.2/python%pyver/' src/map/los/ccivil.c
# clean-up build files included in tarball
rm -rf src/map/los/build

%build
%configure 	--with-python=python
%make

%install
rm -rf $RPM_BUILD_ROOT
%makeinstall_std
# help
install -d $RPM_BUILD_ROOT%{_gamesdatadir}/%{name}/doc/help
install -m 644 doc/help/*.xml $RPM_BUILD_ROOT%{_gamesdatadir}/%{name}/doc/help

# icons
install -D -m 644 %{name}-48.png $RPM_BUILD_ROOT%{_liconsdir}/%{name}.png 
install -D -m 644 %{name}-32.png $RPM_BUILD_ROOT%{_iconsdir}/%{name}.png 
install -D -m 644 %{name}-16.png $RPM_BUILD_ROOT%{_miconsdir}/%{name}.png
# menu
install -d -m 755 $RPM_BUILD_ROOT%{_menudir}
cat >$RPM_BUILD_ROOT%{_menudir}/%{name} <<EOF
?package(%{name}): \
	command="%{_gamesbindir}/%{name}"\\
	needs="X11"\\
	section="Amusement/Strategy"\\
	icon="%{name}.png"\\
	title="%{Name}"\\
	longtitle="%{summary}"
EOF

%clean
rm -rf $RPM_BUILD_ROOT 

%post
%{update_menus}

%postun
%{clean_menus}

%files
%defattr(-,root,root)
%doc AUTHORS BUGS ChangeLog INSTALL LICENSE README TODO
%{_gamesbindir}/%{name}
%{_gamesbindir}/%{name}-ai
%{_gamesbindir}/%{name}-lounge
%dir %{_gamesdatadir}/%{name}
%{_gamesdatadir}/%{name}/src
%{_gamesdatadir}/%{name}/doc
%{_mandir}/man6/*
%{_menudir}/%{name}
%{_iconsdir}/%{name}.png
%{_miconsdir}/%{name}.png
%{_liconsdir}/%{name}.png

%files graphics
%defattr(-,root,root)
%{_gamesdatadir}/%{name}/fonts
%{_gamesdatadir}/%{name}/gfx

%files sounds
%defattr(-,root,root)
%{_gamesdatadir}/%{name}/sound

%files scenarios
%defattr(-,root,root)
%{_gamesdatadir}/%{name}/scenarios

%files editor
%defattr(-,root,root)
%{_gamesbindir}/%{name}-editor

%changelog
* Mon Jan 12 2004 Guillaume Rousse <guillomovitch@mandrake.org> 0.82-4mdk
- buildrequires (slbd)

* Sat Aug 30 2003 Guillaume Rousse <guillomovitch@linux-mandrake.com> 0.82-3mdk
- rebuild for latest python
- this is not a noarch package, they are python extension inside

* Mon Jun 16 2003 Per Øyvind Karlsen <peroyvind@sintrax.net> 0.82-2mdk
- fix problem with help files (from David Coe <david.coe@dsl.pipex.com>)

* Wed Jun 11 2003 Per Øyvind Karlsen <peroyvind@sintrax.net> 0.82-1mdk
- 0.82
- quiet setup
- rm -rf $RPM_BUILD_ROOT in the correct stage

* Sat Jan 04 2003 Guillaume Rousse <g.rousse@linux-mandrake.com> 0.81-2mdk
- rebuild

* Mon Sep 09 2002 Guillaume Rousse <g.rousse@linux-mandrake.com> 0.81-1mdk  
- 0.8.1
- splitted package to takes cares of poor guys with low bandwidth
- fixed missing doc files

* Wed Sep 04 2002 Guillaume Rousse <g.rousse@linux-mandrake.com> 0.80-3mdk  
- require pygame >= 1.5.3 
- menu entry

* Sat Aug 31 2002 Guillaume Rousse <g.rousse@linux-mandrake.com> 0.80-2mdk  
- scenario included in main package
- included missing fonts
- requires python-PQueue

* Sat Aug 31 2002 Guillaume Rousse <g.rousse@linux-mandrake.com> 0.80-1mdk
- first mdk release