Blob Blame History Raw
Name:           swami
Version:        0.9.4
Release:        7%{?dist}
Summary:        MIDI instrument and sound editor
Group:          Applications/Multimedia
License:        GPLv2+
URL:            http://swami.resonance.org/
Source0:        http://downloads.sourceforge.net/swami/%{name}-%{version}.tar.bz2
# These files are from upstream trunk (.desktop file is slightly modified)
# http://swami.resonance.org/trac/browser/trunk/swami
Source1:        %{name}.svg
Source2:        %{name}.desktop
Source3:        %{name}.xml
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  audiofile-devel 
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  desktop-file-utils
BuildRequires:  fluidsynth-devel
BuildRequires:  gnome-libs-devel
BuildRequires:  ImageMagick
BuildRequires:  libpng-devel
BuildRequires:  libsndfile-devel
BuildRequires:  libtool
BuildRequires:  popt-devel

Requires:       hicolor-icon-theme

%description
The Swami Project - Sampled Waveforms And Musical Instruments - is a collection
of free software for editing and sharing MIDI instruments and sounds. Swami
aims to provide an instrument editing and sharing software for instrument 
formats such as SoundFont, DLS and GigaSampler. 

%prep
%setup -q

# Fix libdir
sed -i 's|/lib/|/%{_lib}/|g' configure.ac

%build
autoreconf -v -i -f
%configure --disable-static
make %{?_smp_mflags} 


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

# kill .la files
rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/*.la

# desktop file
install -dm 755 $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/scalable/apps
install -pm 644 %{SOURCE1} \
        $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/scalable/apps

# icon
install -dm 755 $RPM_BUILD_ROOT/%{_datadir}/applications
desktop-file-install                                    \
   --dir=${RPM_BUILD_ROOT}%{_datadir}/applications      \
   %{SOURCE2}

# mime-type file
install -dm 755 $RPM_BUILD_ROOT/%{_datadir}/mime/packages
install -pm 644 %{SOURCE3} $RPM_BUILD_ROOT/%{_datadir}/mime/packages/

# to avoid filename conflicts
for file in AUTHORS ChangeLog README; do
   mv src/libinstpatch/$file $file.libinstpatch
done

%clean
rm -rf $RPM_BUILD_ROOT


%post
touch --no-create %{_datadir}/icons/hicolor &>/dev/null
update-desktop-database &> /dev/null
update-mime-database %{_datadir}/mime &> /dev/null || :

%postun
if [ $1 -eq 0 ] ; then
    touch --no-create %{_datadir}/icons/hicolor &>/dev/null
    gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null
fi
update-desktop-database &> /dev/null
update-mime-database %{_datadir}/mime &> /dev/null || :

%posttrans
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :


%files
%defattr(-,root,root,-)
%doc AUTHORS* ChangeLog* COPYING NEWS README*
%{_libdir}/%{name}/
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
%{_datadir}/mime/packages/%{name}.xml

%changelog
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.4-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Wed Aug 05 2009 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> - 0.9.4-6
- Update .desktop file

* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.4-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Sun Apr 12 2009 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> - 0.9.4-4
- Add Requires: hicolor-icon-theme

* Fri Mar 27 2009 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> - 0.9.4-3
- Initial Fedora build

* Sun Jul 27 2008 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 0.9.4-2
- updated for new fluidsynth libraries (1.0.8) on fc8

* Wed Nov 14 2007 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu>
- updated desktop categories
- add popt-devel build requirement for f8

* Fri Sep 14 2007 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 0.9.4-1
- updated to 0.9.4

* Tue May  8 2007 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 0.9.3-2
- build on fc7, use autogen.sh to use the newer versions of auto* tools
- add MKINSTALLDIRS explicitly in make invocation

* Mon Apr 16 2007 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 0.9.3-2
- spec file tweaks, build on fc6

* Mon May 29 2006 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 0.9.3-1
- added Planet CCRMA categories to desktop file, spec file cleanups
- updated to 0.9.3

* Fri Nov 18 2005 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 0.9.2-3
- rebuild for new version of fluidsynth (1.0.6)
- build requires lash (name change from ladcca)
- change all references from ladcca to lash
- added autotools build requirement (for change to lash), needs
  automake17

* Fri Dec 31 2004 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu>
- spec file cleanup

* Fri Sep 24 2004 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 0.9.2-2
- built for new fluidsynth libraries
- set libfluidsynth require to be for the exact version, swami is
  very picky and won't work with newer versions than the one it was
  compiled with

* Thu May 20 2004 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu>
- added code to recognize libpng12.pc in configure

* Wed May 12 2004 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu>
- added buildrequires

* Sun Feb 29 2004 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 0.9.2-1
- updated to 0.9.2
- patched config.status to force recognition of libpng
- erased and obsoleted old libswami and libswami-devel packages

* Mon Nov 17 2003 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 0.9.1a-3
- spec file tweaks, autogen ommited, does not work on FC1

* Fri Jul 25 2003 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 0.9.1-3
- rebuilt for fluidsynth 1.0.3
- added release tags and an explicit dependency with the current
  version of libfluidsynth

* Fri Jul 25 2003 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 0.9.1-2
- rebuilt for fluidsynth 1.0.2

* Thu May  8 2003 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 0.9.1-1
- updated to 0.9.1a

* Thu Mar  6 2003 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 0.9.0-1.cvs
- cvs: 20030306.185320

* Thu Feb 27 2003 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 0.9.0-1.cvs
- adapted from mandrake spec file
- switched over to cvs swami

* Fri Jan 31 2003 Austin Acton <aacton@yorku.ca> 0.9.0-1mdk
- adapted spec file from Torbjorn Turpeinen <tobbe@nyvalls.se>