LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File genesis-mime-type.spec of Package genesis-mime-type (Project home:Kenzy:packages)

Name:		genesis-mime-type
Version:	1.0
Release:	1
License:	GPL3
Summary:	Create mime type for Genesis ROM.
Source0:	genesis.png
Source1:	genesis.xml
Group:		utils
BuildRequires:  ImageMagick ghostscript-core
Requires(pre):	shared-mime-info
Requires:		gens
BuildArch:	noarch

%description

%prep

%install
# Install icon
for res in 16x16 22x22 24x24 32x32 36x36 48x48 64x64 72x72 96x96; do \
  %{__mkdir_p} %{buildroot}%{_datadir}/icons/hicolor/{${res},scalable}/mimetypes
  convert -size 32x32 %{SOURCE0} -resize ${res} %{buildroot}/%{_datadir}/icons/hicolor/${res}/mimetypes/genesis.png
done;

# Create mime type file
install -D -m 644 %{SOURCE1} %{buildroot}%{_datadir}/mime/packages/genesis.xml

%clean

%post
/usr/bin/update-mime-database %{_datadir}/mime &> /dev/null || :
echo 'MimeType=application/x-genesis-rom;application/x-cd-genesis;' >> /usr/share/applications/dribble-gens.desktop

%preun
/usr/bin/update-mime-database %{_datadir}/mime &> /dev/null || :

%files
%defattr(-,root,root)
%{_datadir}/icons/hicolor/*/mimetypes/genesis.png
%{_datadir}/mime/packages/genesis.xml

%changelog
* Sat Mar 23 2013 Muhammad Shaban <Mr.Muhammad@linuxac.org> 1.0-1
- Initial Release