File faangband.spec of Package faangband

# Spec file for FAangband rpm

%define name        faangband
%define release     1
%define version     1.4.4

Name:               %{name}
Version:            %{version}
Release:            %{release}
Summary:            First Age Angband
License:            GPL
Source:             %{name}-%{version}.tar.gz
Prefix:             /usr/local
Group:              Amusements/Games/Other
%if %{undefined mdkversion}
BuildRequires:      ncurses-devel
BuildRequires:      xorg-x11-proto-devel
BuildRequires:      xorg-x11-xtrans-devel
%endif
%if %{defined mdkversion} || %{defined suse_version}
BuildRequires:      libSDL-devel
BuildRequires:      libSDL_ttf-devel
BuildRequires:      libSDL_image-devel
BuildRequires:      libSDL_mixer-devel
%endif
%if %{defined mdkversion}
BuildRequires:      smpeg-devel
%endif
BuildRoot:          %{buildroot}

%description
A variant of Angband set in First Age Beleriand during the War of the Jewels

%prep
%setup -q

%build
# ./autogen.sh
%if %{defined suse_version}
./configure --enable-sdl --disable-sdl-mixer --with-private-dirs
%else
./configure --enable-sdl --with-private-dirs
%endif
make

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

%files
%defattr(-,root,root)
/usr/local/games/faangband
%if %{undefined suse_version}
/usr/local/etc/faangband/edit/
/usr/local/etc/faangband/pref/
/usr/local/share/faangband/apex/
/usr/local/share/faangband/bone/
/usr/local/share/faangband/file/
/usr/local/share/faangband/help/
/usr/local/share/faangband/info/
/usr/local/share/faangband/save/
/usr/local/share/faangband/user/
/usr/local/share/faangband/xtra/font/
/usr/local/share/faangband/xtra/sound/
/usr/local/share/faangband/xtra/graf/
%endif
%if %{defined suse_version}
/usr/local/etc/
/usr/local/etc/faangband/
/usr/local/share/faangband/
/usr/local/share/faangband/xtra/
%endif