Blob Blame History Raw
Summary:      Advanced drum machine for GNU/Linux
Name:         hydrogen
Version:      0.9.3
Release:      12%{?dist}
URL:          http://www.hydrogen-music.org/
Source0:      http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
Patch0:       hydrogen-0.9.3-g++4.patch
Patch1:       hydrogen-0.9.3-flac113.patch
Patch3:       hydrogen-0.9.3-wasp.patch
Patch4:       hydrogen-0.9.3-libdir.patch
Patch5:       hydrogen-0.9.3-null-sample.patch
Patch6:       hydrogen-0.9.3-gcc43.patch
License:      GPLv2+
Group:        Applications/Multimedia
BuildRoot:    %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires: flac-devel jack-audio-connection-kit-devel liblrdf-devel
BuildRequires: qt-devel libsndfile-devel alsa-lib-devel
BuildRequires: libxml2-devel desktop-file-utils

%description
Hydrogen is an advanced drum machine for GNU/Linux. It's main goal is
to bring professional yet simple and intuitive pattern-based drum
programming.

%prep
%setup -q
%patch0 -p0 -b .g++4
%patch1 -p0 -b .flac133
%patch3 -p1 -b .wasp
%patch4 -p1 -b .libdir
%patch5 -p0 -b .null-sample
%patch6 -p1 -b .gcc43

%build
unset QTDIR || : ; . /etc/profile.d/qt.sh
export QTLIB=${QTDIR}/lib QTINC=${QTDIR}/include
%configure --disable-oss-support
# Not using _smp_mflags macro: Dependencies are not tracked correctly in
# Makefiles, concurrency problems would occur
make

%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install
# Reinstall hydrogen.desktop properly.
rm $RPM_BUILD_ROOT%{_datadir}/applications/hydrogen.desktop
desktop-file-install --vendor fedora              \
  --dir ${RPM_BUILD_ROOT}%{_datadir}/applications \
  --remove-category Application                   \
  --remove-category Sound                         \
  --add-category X-Drumming                       \
  --add-category X-MIDI                           \
  --add-category X-Jack                           \
  --remove-mime-type text/xml                     \
  hydrogen.desktop

%clean
rm -rf $RPM_BUILD_ROOT

%post
touch --no-create %{_datadir}/icons/hicolor
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
  %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi

%postun
touch --no-create %{_datadir}/icons/hicolor
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
  %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi

%files
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING README
%{_bindir}/hydrogen*
%{_libdir}/hydrogen
%{_datadir}/hydrogen
%{_datadir}/applications/fedora-hydrogen.desktop

%changelog
* Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.9.3-12
- Autorebuild for GCC 4.3

* Thu Jan 03 2008 Lubomir Kundrak <lkundrak@redhat.com> 0.9.3-11
- Previous change was not a good idea
- Adding missing includes to fix build with gcc-4.3

* Sun Oct 14 2007 Lubomir Kundrak <lkundrak@redhat.com> 0.9.3-10
- Remove unneeded dependencies on desktop-file-utils

* Mon Oct 09 2007 Lubomir Kundrak <lkundrak@redhat.com> 0.9.3-9
- Incorporate fixes from #190040, thanks to Hans de Goede
- Removed useless LIBDIR introduced in previous revision
- Fixed desktop file installation
- Call gtk-update-icon-cache only if it is present

* Sun Oct 07 2007 Lubomir Kundrak <lkundrak@redhat.com> 0.9.3-8
- Remove -j from make to fix concurrency problems
- Handle libdir on 64bit platforms correctly
- Rename patches

* Sat Oct 06 2007 Lubomir Kundrak <lkundrak@redhat.com> 0.9.3-7.1
- Fix desktop file
- Fix compatibility with new FLAC
- Fix linking for Build ID use

* Mon Mar 26 2007 Anthony Green <green@redhat.com> 0.9.3-7
- Improve Source0 link.
- Add %%post(un) scriptlets for MimeType update.
- Add update-desktop-database scriptlets.

* Sat Jul 22 2006 Anthony Green <green@redhat.com> 0.9.3-6
- Add hydrogen-null-sample.patch to fix crash.

* Sun Jul 02 2006 Anthony Green <green@redhat.com> 0.9.3-5
- Clean up BuildRequires.
- Configure with --disable-oss-support
- Don't run ldconfig (not needed)
- Remove post/postun scriptlets.

* Sat May 13 2006 Anthony Green <green@redhat.com> 0.9.3-4
- BuildRequire libxml2-devel.
- Remove explicit Requires for some runtime libraries.
- Set QTDIR via /etc/profile.d/qt.sh.
- Update desktop icons and icon cache in post and postun.
- Don't use __rm or __make macros.

* Sat May 13 2006 Anthony Green <green@redhat.com> 0.9.3-3
- Conditionally apply ardour-lib64-ladspa.patch.

* Sat May 13 2006 Anthony Green <green@redhat.com> 0.9.3-2
- Build fixes for x86_64.

* Wed Apr 26 2006 Anthony Green <green@redhat.com> 0.9.3-1
- Created.