a5c78e6
Name:           swami
a5c78e6
Version:        0.9.4
a5c78e6
Release:        4%{?dist}
a5c78e6
Summary:        MIDI instrument and sound editor
a5c78e6
Group:          Applications/Multimedia
a5c78e6
License:        GPLv2+
a5c78e6
URL:            http://swami.resonance.org/
a5c78e6
Source0:        http://downloads.sourceforge.net/swami/%{name}-%{version}.tar.bz2
a5c78e6
# These files are from upstream trunk (.desktop file is slightly modified)
a5c78e6
# http://swami.resonance.org/trac/browser/trunk/swami
a5c78e6
Source1:        %{name}.svg
a5c78e6
Source2:        %{name}.desktop
a5c78e6
Source3:        %{name}.xml
a5c78e6
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
a5c78e6
a5c78e6
BuildRequires:  audiofile-devel 
a5c78e6
BuildRequires:  autoconf
a5c78e6
BuildRequires:  automake
a5c78e6
BuildRequires:  desktop-file-utils
a5c78e6
BuildRequires:  fluidsynth-devel
a5c78e6
BuildRequires:  gnome-libs-devel
a5c78e6
BuildRequires:  ImageMagick
a5c78e6
BuildRequires:  libpng-devel
a5c78e6
BuildRequires:  libsndfile-devel
a5c78e6
BuildRequires:  libtool
a5c78e6
BuildRequires:  popt-devel
a5c78e6
a5c78e6
Requires:       hicolor-icon-theme
a5c78e6
a5c78e6
%description
a5c78e6
The Swami Project - Sampled Waveforms And Musical Instruments - is a collection
a5c78e6
of free software for editing and sharing MIDI instruments and sounds. Swami
a5c78e6
aims to provide an instrument editing and sharing software for instrument 
a5c78e6
formats such as SoundFont, DLS and GigaSampler. 
a5c78e6
a5c78e6
%prep
a5c78e6
%setup -q
a5c78e6
a5c78e6
# Fix libdir
a5c78e6
sed -i 's|/lib/|/%{_lib}/|g' configure.ac
a5c78e6
a5c78e6
%build
a5c78e6
autoreconf -v -i -f
a5c78e6
%configure --disable-static
a5c78e6
make %{?_smp_mflags} 
a5c78e6
a5c78e6
a5c78e6
%install
a5c78e6
rm -rf $RPM_BUILD_ROOT
a5c78e6
make install DESTDIR=$RPM_BUILD_ROOT
a5c78e6
a5c78e6
# kill .la files
a5c78e6
rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/*.la
a5c78e6
a5c78e6
# desktop file
a5c78e6
install -dm 755 $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/scalable/apps
a5c78e6
install -pm 644 %{SOURCE1} \
a5c78e6
        $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/scalable/apps
a5c78e6
a5c78e6
# icon
a5c78e6
install -dm 755 $RPM_BUILD_ROOT/%{_datadir}/applications
a5c78e6
desktop-file-install                                    \
a5c78e6
   --dir=${RPM_BUILD_ROOT}%{_datadir}/applications      \
a5c78e6
   %{SOURCE2}
a5c78e6
a5c78e6
# mime-type file
a5c78e6
install -dm 755 $RPM_BUILD_ROOT/%{_datadir}/mime/packages
a5c78e6
install -pm 644 %{SOURCE3} $RPM_BUILD_ROOT/%{_datadir}/mime/packages/
a5c78e6
a5c78e6
# to avoid filename conflicts
a5c78e6
for file in AUTHORS ChangeLog README; do
a5c78e6
   mv src/libinstpatch/$file $file.libinstpatch
a5c78e6
done
a5c78e6
a5c78e6
%clean
a5c78e6
rm -rf $RPM_BUILD_ROOT
a5c78e6
a5c78e6
a5c78e6
%post
a5c78e6
touch --no-create %{_datadir}/icons/hicolor &>/dev/null
a5c78e6
update-desktop-database &> /dev/null
a5c78e6
update-mime-database %{_datadir}/mime &> /dev/null || :
a5c78e6
a5c78e6
%postun
a5c78e6
if [ $1 -eq 0 ] ; then
a5c78e6
    touch --no-create %{_datadir}/icons/hicolor &>/dev/null
a5c78e6
    gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null
a5c78e6
fi
a5c78e6
update-desktop-database &> /dev/null
a5c78e6
update-mime-database %{_datadir}/mime &> /dev/null || :
a5c78e6
a5c78e6
%posttrans
a5c78e6
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
a5c78e6
a5c78e6
a5c78e6
%files
a5c78e6
%defattr(-,root,root,-)
a5c78e6
%doc AUTHORS* ChangeLog* COPYING NEWS README*
a5c78e6
%{_libdir}/%{name}/
a5c78e6
%{_bindir}/%{name}
a5c78e6
%{_datadir}/applications/%{name}.desktop
a5c78e6
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
a5c78e6
%{_datadir}/mime/packages/%{name}.xml
a5c78e6
a5c78e6
%changelog
a5c78e6
* Sun Apr 12 2009 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> - 0.9.4-4
a5c78e6
- Add Requires: hicolor-icon-theme
a5c78e6
a5c78e6
* Fri Mar 27 2009 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> - 0.9.4-3
a5c78e6
- Initial Fedora build
a5c78e6
a5c78e6
* Sun Jul 27 2008 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 0.9.4-2
a5c78e6
- updated for new fluidsynth libraries (1.0.8) on fc8
a5c78e6
a5c78e6
* Wed Nov 14 2007 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu>
a5c78e6
- updated desktop categories
a5c78e6
- add popt-devel build requirement for f8
a5c78e6
a5c78e6
* Fri Sep 14 2007 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 0.9.4-1
a5c78e6
- updated to 0.9.4
a5c78e6
a5c78e6
* Tue May  8 2007 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 0.9.3-2
a5c78e6
- build on fc7, use autogen.sh to use the newer versions of auto* tools
a5c78e6
- add MKINSTALLDIRS explicitly in make invocation
a5c78e6
a5c78e6
* Mon Apr 16 2007 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 0.9.3-2
a5c78e6
- spec file tweaks, build on fc6
a5c78e6
a5c78e6
* Mon May 29 2006 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 0.9.3-1
a5c78e6
- added Planet CCRMA categories to desktop file, spec file cleanups
a5c78e6
- updated to 0.9.3
a5c78e6
a5c78e6
* Fri Nov 18 2005 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 0.9.2-3
a5c78e6
- rebuild for new version of fluidsynth (1.0.6)
a5c78e6
- build requires lash (name change from ladcca)
a5c78e6
- change all references from ladcca to lash
a5c78e6
- added autotools build requirement (for change to lash), needs
a5c78e6
  automake17
a5c78e6
a5c78e6
* Fri Dec 31 2004 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu>
a5c78e6
- spec file cleanup
a5c78e6
a5c78e6
* Fri Sep 24 2004 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 0.9.2-2
a5c78e6
- built for new fluidsynth libraries
a5c78e6
- set libfluidsynth require to be for the exact version, swami is
a5c78e6
  very picky and won't work with newer versions than the one it was
a5c78e6
  compiled with
a5c78e6
a5c78e6
* Thu May 20 2004 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu>
a5c78e6
- added code to recognize libpng12.pc in configure
a5c78e6
a5c78e6
* Wed May 12 2004 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu>
a5c78e6
- added buildrequires
a5c78e6
a5c78e6
* Sun Feb 29 2004 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 0.9.2-1
a5c78e6
- updated to 0.9.2
a5c78e6
- patched config.status to force recognition of libpng
a5c78e6
- erased and obsoleted old libswami and libswami-devel packages
a5c78e6
a5c78e6
* Mon Nov 17 2003 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 0.9.1a-3
a5c78e6
- spec file tweaks, autogen ommited, does not work on FC1
a5c78e6
a5c78e6
* Fri Jul 25 2003 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 0.9.1-3
a5c78e6
- rebuilt for fluidsynth 1.0.3
a5c78e6
- added release tags and an explicit dependency with the current
a5c78e6
  version of libfluidsynth
a5c78e6
a5c78e6
* Fri Jul 25 2003 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 0.9.1-2
a5c78e6
- rebuilt for fluidsynth 1.0.2
a5c78e6
a5c78e6
* Thu May  8 2003 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 0.9.1-1
a5c78e6
- updated to 0.9.1a
a5c78e6
a5c78e6
* Thu Mar  6 2003 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 0.9.0-1.cvs
a5c78e6
- cvs: 20030306.185320
a5c78e6
a5c78e6
* Thu Feb 27 2003 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 0.9.0-1.cvs
a5c78e6
- adapted from mandrake spec file
a5c78e6
- switched over to cvs swami
a5c78e6
a5c78e6
* Fri Jan 31 2003 Austin Acton <aacton@yorku.ca> 0.9.0-1mdk
a5c78e6
- adapted spec file from Torbjorn Turpeinen <tobbe@nyvalls.se>