サイトトップMandriva Linux向けパッケージ ≫ timidity-patch-eawplus-12.1-1

timidity-patch-eawplus-12.1-1kkr2009.0.spec

%define name               timidity-patch-eawplus
%define version            12.1
%define release            %mkrel 1

%define patch_pkg_version  2
%define eawplus_name       eawplus
%define izumopatch_name    guspat
%define izumopatch_version 20000706
%define instdir            %{_datadir}/timidity

%define __zcat             %{__gzip} -dc
%define __egrep            %{__grep} -E
%define __find             /bin/find


Summary:        GUS/patch collection based on Eawpatches
Summary(ja):    EawpatchesをもとにしたGUS/patch集
Name:           %{name}
Version:        %{version}
Release:        %{release}
License:        Freeware-like
URL:            http://web.archive.org/web/20060513095333/http://www.linet.gr.jp/~tamuki/timidity/eawplus/
Source0:        %{izumopatch_name}-%{izumopatch_version}-required.tar.gz
  # Size  : 18,928,720
  # MD5   : 3fd3b519e7862bf9a07c5ba52c6766e4
  # SHA-1 : 20e385a62f8b01f9e42dfbab6947a7818fd4c8da
Source1:        %{izumopatch_name}-%{izumopatch_version}-optional.tar.gz
  # Size  : 8,541,003
  # MD5   : 63d75aba7bd27589c6e8f5401ccb856c
  # SHA-1 : 4f977909cba920634556f48f011d6fb512f09878
Source2:        %{eawplus_name}-%{version}.tar.gz
  # Size  : 3,967,952
  # MD5   : 49620780fcf097c0776cee4865b3e4b7
  # SHA-1 : 3cd8022122929f28088ae6ab2a4fa290b7edb1bd
Source3:        timidity-eawplus.cfg
  # Size  : 251
  # MD5   : f9a48d791e8e62d3d5c8501cdfd38c25
  # SHA-1 : 3866d6847912f1d8e279f7e3d318c2dd7fc628c1
Provides:       timidity-instruments = %{patch_pkg_version}
Obsoletes:      timidity-instruments
Group:          Sound
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Requires:       timidity-patch-eawpatches
BuildRequires:  findutils
BuildArch:      noarch


%description
This is, tuned by Shoichi Tamuki, Eric A. Welsh's collection of Gravis UltraSound MIDI patches configured for use with the TiMidity++ MIDI player.  A configuration file for TiMidity++ to use these patches is also included.

%description -l ja
これは、TiMidity++ MIDIプレーヤ向けに設定されたEric A. Welsh氏のGravis UltraSound MIDIパッチをShoichi Tamuki(田向 正一)氏が調整したものです。このパッチ群を使用するためのTiMidity++用の設定ファイルも含まれています。


%prep
%setup    -q -c -T -a 0
%setup -D -q -c -T -a 1
%setup -D -q -c -T -a 2
%{__sed} \
	-e 's:/usr/share/timidity$:%{instdir}/eawplus:' \
	-e 's:eawpats:eawpatches:' timidity/timidity.cfg > timidity/eawplus.cfg


%install
# clean
%{__rm} %{buildroot} -fr
# doc
for f in $(%{__find} . -type f | %{__egrep} 'txt$|doc$'); do
	%{__lzma} ${f}
	%{__mv} ${f}.lzma doc/
done
for f in doc/*/*.txt.gz; do
	%{__zcat} ${f} | %{__lzma} > ${f%.gz}.lzma
	%{__mv} ${f%.gz}.lzma doc/
	%{__rm} ${f} -f
done
# cfg
%{__install} -d %{buildroot}/%{_sysconfdir}/timidity/eawplus
%{__install} -p -m 644 %{SOURCE3} %{buildroot}/%{_sysconfdir}/timidity/
%{__mv} timidity/*.cfg %{buildroot}/%{_sysconfdir}/timidity/eawplus/
# pat
%{__install} -d %{buildroot}/%{instdir}/eawplus
%{__mv} timidity/inst/ %{buildroot}/%{instdir}/eawplus/


%post
%{_sbindir}/update-alternatives --install %{_sysconfdir}/timidity/timidity.cfg timidity.cfg %{_sysconfdir}/timidity/timidity-eawplus.cfg 30


%postun
if [ ${1} -eq 0 ]; then
  %{_sbindir}/update-alternatives --remove timidity.cfg %{_sysconfdir}/timidity/timidity-eawplus.cfg
fi


%triggerpostun -- TiMidity++ <= 2.13.2-1mdk
%{_sbindir}/update-alternatives --install %{_sysconfdir}/timidity/timidity.cfg timidity.cfg %{_sysconfdir}/timidity/timidity-eawplus.cfg 30


%clean
%{__rm} %{buildroot} -fr


%files
%defattr(-, root, root)
%{instdir}/eawplus/
%dir %{_sysconfdir}/timidity/eawplus/
%config(noreplace) %{_sysconfdir}/timidity/eawplus/*.cfg*
%config(noreplace) %{_sysconfdir}/timidity/timidity-eawplus.cfg
%doc doc/*.lzma


%changelog
* Fri Nov 28 2008 kakurasan <kakurasan AT gmail DOT com> 12.1-1kkr2009.0
- Initial build based on timidity-patch-gravis-1.0-26mdv2009.0