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

timidity-patch-eawpatches-12-1kkr2009.0.spec

%define name              timidity-patch-eawpatches
%define version           12
%define release           %mkrel 1

%define patch_pkg_version 2
%define eaw_name          eawpats
%define instdir           %{_datadir}/timidity

%define __find            /bin/find
%define __sort            /bin/sort


Summary:        Eric Welsh's GUS patches for TiMidity++
Summary(ja):    Eric Welsh氏によるTiMidity++向けのGUSパッチ群
Name:           %{name}
Version:        %{version}
Release:        %{release}
License:        Freeware-like
URL:            http://web.archive.org/web/20040403175404/http://www.stardate.bc.ca/eawpatches/html/default.htm
Source0:        %{eaw_name}%{version}_full.tar.gz
  # Size  : 32,047,230
  # MD5   : 8ebcf0583f3077346ebace93c8ea166f
  # SHA-1 : 838fa08e405a65e988f4d576b086a3e4d99a4da0
Source1:        timidity-eawpatches.cfg
  # Size  : 234
  # MD5   : 013a394e68871e2e54afabb6cc0bec52
  # SHA-1 : d2b904edeb37baeffecb24765a2ac3c856f485c1
Provides:       timidity-instruments = %{patch_pkg_version}
Obsoletes:      timidity-instruments
Group:          Sound
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-buildroot
BuildRequires:  findutils coreutils
BuildArch:      noarch


%description
Eawpatches is the best GUS patch set for TiMidity++. Eawpatches is maintained (tweaked and tuned) by Eric A Welsh.

%description -l ja
EawpatchesはTiMidity++向けに作られた最高のGUSパッチセットです。
Eric A Welsh氏によりメンテナンス(調整)されました。


%prep
%setup -q -n eawpats


%install
# clean
%{__rm} %{buildroot} -fr
# doc
for f in $(%{__find} . -name \*.txt); do
	%{__lzma} ${f}
done
# cfg
%{__sed} 's:dir /home/user/eawpats/:dir %{instdir}/eawpatches:' \
	linuxconfig/timidity.cfg > eawpatches.cfg
%{__install} -d %{buildroot}/%{_sysconfdir}/timidity/eawpatches
%{__install} -p -m 644 *.cfg %{buildroot}/%{_sysconfdir}/timidity/eawpatches/
%{__install} -p -m 644 %{SOURCE1} %{buildroot}/%{_sysconfdir}/timidity/
%{__rm} linuxconfig/ winconfig/ -fr
# pat
for d in $(%{__find} . -type f -name \*.pat | %{__sed} 's,/[^/]*$,,' | %{__sort} -u); do
	%{__install} -d %{buildroot}/%{instdir}/eawpatches/${d}
	%{__install} -p -m 644 ${d}/*.pat %{buildroot}/%{instdir}/eawpatches/${d}/
done


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


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


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


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


%files
%defattr(-, root, root)
%{instdir}/eawpatches/
%dir %{_sysconfdir}/timidity/eawpatches/
%config(noreplace) %{_sysconfdir}/timidity/eawpatches/*.cfg
%config(noreplace) %{_sysconfdir}/timidity/timidity-eawpatches.cfg
%doc $(%{__find} . -name \*.txt.lzma)


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