Blob Blame Raw
Name:		dgae
Version:	1.1
Release:	6%{?dist}
Summary:	DG, a short AGI adventure game

Group:		Amusements/Games
License:	Public Domain
URL:		http://membres.lycos.fr/agisite/agisite.htm
Source0:	dgae.zip
#Original from http://membres.lycos.fr/agisite/dgae.zip includes
#copyrighted executables. Generated new source by unzipping, removing
#DOS-related content, running dos2unix on the text file, and changing
#all filenames to lowercase for agistudio compatibility.
Source1:	dgae.desktop
Source2:	dgae-wrapper.sh
Source3:	dgae.xpm
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:	noarch

BuildRequires:	desktop-file-utils
Requires:	nagi, hicolor-icon-theme

%description
Help DG to seek out his twin brother's stick.
This game is a public domain: you can look out the codes and make your own
AGI game.

%prep
%setup -q -c

%build
iconv -f IBM850 -t UTF8 readme.txt > readme.txt.tmp
mv readme.txt.tmp readme.txt

%install
rm -rf $RPM_BUILD_ROOT

mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}
mkdir -p $RPM_BUILD_ROOT%{_bindir}
install -D -m0644 -p * $RPM_BUILD_ROOT%{_datadir}/%{name}
install -D -m0755 -p %{SOURCE2} $RPM_BUILD_ROOT/%{_bindir}

# desktop file
desktop-file-install --vendor fedora \
	--dir $RPM_BUILD_ROOT%{_datadir}/applications \
	%{SOURCE1}

# icon
install -d %{buildroot}%{_datadir}/icons/hicolor/32x32/apps
install -p -m 0644 %{SOURCE3} %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/%{name}.xpm

%post   
touch --no-create %{_datadir}/icons/hicolor || :
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :

%postun
touch --no-create %{_datadir}/icons/hicolor || :   
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%doc readme.txt
%{_datadir}/dgae
%{_datadir}/applications/fedora-dgae.desktop
%{_datadir}/icons/hicolor/32x32/apps/dgae.xpm
%{_bindir}/dgae-wrapper.sh

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

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

* Fri Jun 13 2008 Jon Ciesla <limb@jcomserv.net> 1.1-4
- Rebuild to fix vendor tag, BZ 451294.

* Tue May 22 2007 Jon Ciesla <limb@jcomserv.net> 1.1-3
- Import error.

* Thu May 17 2007 Jon Ciesla <limb@jcomserv.net> 1.1-2
- Fixed URL.
- Dropped bad setup arg.
- Corrected readme.txt charset.
- Improved wrapper script.

* Tue May 15 2007 Jon Ciesla <limb@jcomserv.net> 1.1-1
- Initial packaging.