Sophie

Sophie

distrib > Mandriva > 9.0 > i586 > media > contrib-src > by-pkgid > 6799ec45f902ed00ce2cdc36c950aa7c > files > 2

boson-0.6.1-1mdk.src.rpm

%define name boson
%define version 0.6.1
%define release 1mdk

Summary:	Boson : a Real-Time Strategy Game (RTS) for the KDE project
Name:		%name
Version:	%version
Release:	%release
License:	GPL
Group:		Games/Strategy
Source:		http://belnet.dl.sourceforge.net/sourceforge/boson/boson-all-0.6.1.tar.bz2
URL:		http://boson.sourceforge.net
BuildRoot:	%{_tmppath}/boson-%{version}-root
BuildRequires:	kdelibs-devel, kdegames-devel, kdemultimedia-devel
BuildRequires:  zlib-devel, libaudiofile-devel, libalsa2-devel, libpng-devel, libjpeg-devel
#arts-devel, libfame-devel, xfree86-devel are also required as BuildRequires but it don't work if I put them at this time.
Requires: 	kdelibs, kdegames
Prefix: /usr

%description
Boson is a real-time strategy game, like Command&Conquer(tm) or StarCraft(tm).
It is designed to run on Unix (Linux) computers and uses the Qt
Toolkit and QwSpriteField. A minimum of two players is required, since there is
no artificial intelligence (yet?).

Boson's Code and Graphics are published under the GNU General Public License.

If you want to know more about Boson, have a look at the Web site.

%prep
rm -rf $RPM_BUILD_ROOT

%setup -n boson

%build
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" ./configure \
              --prefix=$KDEDIR --disable-rpath


%make

%install
if [ -d $RPM_BUILD_ROOT ]; then rm -rf $RPM_BUILD_ROOT ; fi
make prefix=$RPM_BUILD_ROOT%{prefix} install

#menu
(cd $RPM_BUILD_ROOT
mkdir -p ./usr/lib/menu
cat > ./usr/lib/menu/%{name} <<EOF
?package(%{name}):\
command="/usr/bin/boson"\ 
title="Boson"\
longtitle="RTS Game"\
needs="x11"\
icon="strategy_section.png"\
section="Amusement/Strategy"
EOF
)

{
  pushd $RPM_BUILD_ROOT
  find . -type d | egrep -v '(/usr$|/usr/include$|/usr/include/kde$|/usr/bin$|/usr/lib$|/usr/lib/kde2$|/usr/share$|/usr/share/applnk$|/usr/share/apps$|/usr/share/doc$|/usr/share/doc/HTML$|/usr/share/doc/HTML/en$|/usr/share/icons|/usr/share/mimelnk|/usr/share/services|/usr/share/servicetypes)' | sed '1,2d;s,^\.,\%attr(-\,root\,root) \%dir ,' > \
    $RPM_BUILD_DIR/file.list.%{name}
  find . -type f | grep -v '/usr/include' | sed -e 's,^\.,\%attr(-\,root\,root) ,' \
    -e '/\/config\//s|^|%config|' >> \
  $RPM_BUILD_DIR/file.list.%{name}
  find . -type l | sed 's,^\.,\%attr(-\,root\,root) ,' >> \
    $RPM_BUILD_DIR/file.list.%{name}
 popd
}

%post
%update_menus

%postun
%clean_menus


%clean
rm -rf %{builddir}
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT

%files -f ../file.list.%{name} 

%changelog
* Thu Aug 22 2002 Lenny Cartier <lenny@mandrakesoft.com> 0.6.1-1mdk
- from Florent BERANGER <cosmic.flo@libertysurf.fr> :
	- first Mdk release based on author works