File swami.spec of Package swami

#
# spec file for package swami (Version 0.9.3)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           swami
BuildRequires:  alsa-devel audiofile-devel flac-devel fluidsynth-devel gtk-devel jack-devel libpng-devel libsndfile-devel popt-devel update-desktop-files
Summary:        A SoundFont Editor
Version:        0.9.3
Release:        143
License:        GPL v2 or later
Group:          Productivity/Multimedia/Sound/Editors and Convertors
Source:         %{name}-%{version}.tar.bz2
Source1:        %{name}.desktop
Source2:        swami.png
Patch:          %{name}-configure.dif
Patch1:         swami-type-fix.dif
Patch2:         swami-compile-fix.diff
Url:            http://swami.sourceforge.net
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Swami (Sample Waveforms and Audio for Magical Instruments) is a
SoundFont editor. SoundFont files are a collection of audio samples and
other data that describe instruments for the purpose of composing
music. Swami is a successor of Smurf SoundFont editor.



Authors:
--------
    Josh Green <jgreen@users.sourceforge.net>

%prep
%setup -q
%patch -p1
%patch1
%patch2

%build
autoreconf --force --install
test -f po/Makevars || mv po/Makevars.template po/Makevars
CFLAGS="$RPM_OPT_FLAGS" \
%configure --disable-static --with-pic
make

%install
make DESTDIR=$RPM_BUILD_ROOT install
# remove static libs
rm -f $RPM_BUILD_ROOT%{_libdir}/swami/*.a
rm -f $RPM_BUILD_ROOT%{_libdir}/swami/*.la
# rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
# rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
%if %suse_version > 820
%suse_update_desktop_file -i %name AudioVideo AudioVideoEditing
%endif
mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps
cp %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/pixmaps
%find_lang %{name}

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files -f %{name}.lang
%defattr(-,root,root)
%doc AUTHORS COPYING CVS-HOWTO ChangeLog NEWS README
%{_bindir}/*
%if %suse_version > 820
%{_datadir}/applications/*.desktop
%endif
%{_datadir}/pixmaps/*.png
%dir %{_libdir}/swami
%{_libdir}/swami/*.so

%changelog
* Sun Mar 16 2008 crrodriguez@suse.de
- fix file-not-in-lang errors
* Wed Apr 25 2007 tiwai@suse.de
- fix desktop file (add missing GenericName)
* Thu May 18 2006 tiwai@suse.de
- updated to version 0.9.3:
  * fix messages about saved files
  * fix for spash screen
  * fix endianness problems
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Wed Oct 05 2005 tiwai@suse.de
- added flac and flac-devel to neededforbuild (required by the new
  libsndfile)
- fixed critical compile warnings.
* Tue Apr 12 2005 ro@suse.de
- added audiofile-devel to neededforbuild
* Fri Apr 16 2004 tiwai@suse.de
- fixed the type punning warnings.
- disabled the removal of $RPM_BUILD_ROOT in %%install.
* Sat Jan 10 2004 adrian@suse.de
- add %%run_ldconfig
* Tue Nov 18 2003 tiwai@suse.de
- updated to version 0.9.2.
* Mon Sep 15 2003 tiwai@suse.de
- fixed categories.
- added desktop icon.
* Fri Aug 15 2003 adrian@suse.de
- add desktop file
* Fri Jun 20 2003 ro@suse.de
- build with current gettext
* Fri Jun 06 2003 tiwai@suse.de
- updated to version 0.9.1a.
* Mon Jan 20 2003 ro@suse.de
- added jack,jack-devel to neededforbuild
* Mon Nov 25 2002 tiwai@suse.de
- fixed neededforbuild: xf86 -> x-devel-packages.
* Tue Nov 19 2002 mmj@suse.de
- Add AM_GNU_GETTEXT_VERSION
* Fri Sep 20 2002 tiwai@suse.de
- updated to version 0.9.0 final.
* Tue Jun 25 2002 tiwai@suse.de
- initial version: 0.9.0pre1.
openSUSE Build Service is sponsored by