Blob Blame History Raw
%global        desktop_vendor fedora

Summary:       Qt based Fluidsynth GUI front end
Name:          qsynth
Version:       0.3.3
Release:       5%{?dist}
URL:           http://qsynth.sourceforge.net
Source0:       http://dl.sourceforge.net/qsynth/qsynth-%{version}.tar.gz
#Source1: qsynth.desktop
# Fedora qt4 binaries have -qt4 suffix
Patch0:        qsynth-0.3.3-qt4.patch
# Fix close button not shown with Qt 4.5 (#494470)
Patch1:        qsynth-0.3.3-qt45.patch
# We don't want .qm files in the default locale dir
Patch2:        qsynth-fix-locale-path.patch
License:       GPLv2+
Group:         Applications/Multimedia
BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires:      hicolor-icon-theme

BuildRequires: fluidsynth-devel qt-devel desktop-file-utils

%description
QSynth is a fluidsynth GUI front-end application written in C++ around
the Qt4 toolkit using Qt Designer. Eventually it may evolve into a
softsynth management application allowing the user to control and
manage a variety of command line softsynth but for the moment it wraps
the excellent FluidSynth. FluidSynth is a command line software
synthesiser based on the Soundfont specification.

%prep
%setup -q
%patch0 -p1 -b .qt4
%patch1 -p1 -b .qt45
%patch2 -p1 -b .localedir

iconv --from=ISO88591 --to=UTF8 AUTHORS -o AUTHORS.tmp
touch -r AUTHORS AUTHORS.tmp
mv -f AUTHORS.tmp AUTHORS


%build
%configure
%{__make} # doesn't understand %%{?_smp_mflags}


%install
%{__rm} -rf %{buildroot}
%{__make} DESTDIR=%{buildroot} install

# desktop file categories
INCORRECT="Applications Multimedia MIDI JACK ALSA"
BASE="Audio"
XTRA="X-MIDI X-Jack X-Alsa X-Synthesis"

%{__mkdir} -p %{buildroot}%{_datadir}/applications
desktop-file-install --vendor %{desktop_vendor} \
  --delete-original \
  --dir %{buildroot}%{_datadir}/applications    \
  `for c in ${INCORRECT} ; do echo "--remove-category $c " ; done` \
  `for c in ${BASE} ${XTRA} ; do echo "--add-category $c " ; done` \
  %{buildroot}%{_datadir}/applications/qsynth.desktop

# Create the lang file. %%find_lang does not handle .qm files
for file in %{buildroot}%{_datadir}/qsynth/locale/*.qm; do
  language=$(basename $file|cut -f 2 -d _|sed 's|\..*||')
  echo %%lang\($language\) %{_datadir}/qsynth/locale/qsynth_$language.qm >> qsynth.lang
done


%clean
%{__rm} -rf %{buildroot}


%files -f qsynth.lang
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING README TODO
%{_bindir}/qsynth
%{_datadir}/pixmaps/qsynth.png
%dir %{_datadir}/qsynth/
%{_datadir}/applications/%{desktop_vendor}-qsynth.desktop


%changelog
* Fri Apr 17 2009 Orcan Ogetbil <oget[DOT]fedora[AT]gmail[DOT]com> 0.3.3-5
- Fix locale path (#494470)
- Fix mixed spaces&tabs warnings
- Preserve timestamp of the file AUTHORS
- Replace %%define with %%global per new guidelines

* Fri Apr 10 2009 Kevin Kofler <Kevin@tigcc.ticalc.org> 0.3.3-4
- Fix close button not shown with Qt 4.5 (#494470)

* Sun Mar 22 2009 Robert Scheck <robert@fedoraproject.org> 0.3.3-3
- Rebuilt without %%{?_smp_mflags} as it isn't supported

* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Fri Sep  5 2008 Michel Salim <salimma@fedoraproject.org> - 0.3.3-1
- Update to 0.3.3

* Wed Sep  3 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.2.5-8
- fix license tag

* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.2.5-7
- Autorebuild for GCC 4.3

* Thu Sep 14 2006 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 0.2.5-6
- mass rebuild
- added hicolor-icon-theme requirement

* Tue Jul 25 2006 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 0.2.5-5
- fluidsynth build dependency in extras changed to fluidsynth-devel

* Sun Jun 18 2006 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 0.2.5-4
- move icon to freedesktop location, don't use makeinstall macro, add
  icon cache scripts, fill in missing releases in changelog entries,
  fix source url

* Thu Jun  8 2006 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 0.2.5-3
- more tweaks for Fedora Extras, move desktop file to source1

* Fri May 12 2006 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 0.2.5-2
- spec file tweaks for Fedora Extras submission

* Wed May  3 2006 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 0.2.5-2
- add Planet CCRMA desktop categories

* Wed Apr  5 2006 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 0.2.5-1
- updated to 0.2.5

* Fri Mar 31 2006 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 0.2.4-1
- add fc5 dependencies

* Fri Nov 18 2005 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 0.2.4-1
- updated to 0.2.4

* Tue Jun 28 2005 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 0.2.3-1
- updated to 0.2.3

* Wed Dec 29 2004 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 0.2.2-1
- spec file cleanup

* Mon Oct 11 2004 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 0.2.2-1
- updated to 0.2.2
- bitmap is now png instead of xpm
- fix typo in desktop_vendor define

* Fri Sep 24 2004 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 0.2.1-1
- updated to 0.2.1

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

* Sun Feb 29 2004 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 0.1.3-1
- updated to 0.1.3

* Wed Jan 21 2004 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 0.1.0-1
- updated to 0.1.0

* Wed Nov 26 2003 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 0.0.2-1
- updated to 0.0.2
- use fmod when building under 7.3 (patch0)

* Wed Nov 26 2003 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 0.0.1-1
- initial build