Blob Blame History Raw
%define svn 790

Summary:      Advanced drum machine for GNU/Linux
Name:         hydrogen
Version:      0.9.4
Release:      0.2.%{svn}svn%{?dist}
URL:          http://www.hydrogen-music.org/
Source0:      %{name}-%{version}-beta3-%{svn}svn.tar.bz2
# For convenience, to take the svn snapshot:
Source9:      hydrogen-snapshot.sh
# Use internal tinyxml instead of the one supplied by hydrogen:
# Sent upstream: 
# https://sourceforge.net/mailarchive/message.php?msg_name=e76492710901221851m3a285da8n9422642afe443124%40mail.gmail.com
Patch0:       hydrogen-internal-tinyxml.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: qt4-devel libsndfile-devel alsa-lib-devel portaudio-devel
BuildRequires: desktop-file-utils lash-devel libtar-devel scons tinyxml-devel
BuildRequires: portmidi-devel

%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 -n %{name}
patch -p0 < patches/portaudio.patch
patch -p0 < patches/portmidi.patch
%patch0 -p1 -b .tinyxml

%build
scons %{?_smp_flags} prefix=%{_prefix} portaudio=1 portmidi=1 lash=1 oss=0 optflags="$RPM_OPT_FLAGS"

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

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

# Move the icon to the proper place
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/scalable/apps
mv $RPM_BUILD_ROOT%{_datadir}/pixmaps/*.svg \
   $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/scalable/apps

%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.txt
# FIXME: The software still shows the old documentation internally.
# Remove these when this is fixed upstream:
%doc data/new_manual/* data/new_tutorial/*
%{_bindir}/hydrogen
%{_datadir}/hydrogen
%{_datadir}/applications/fedora-hydrogen.desktop
%{_datadir}/icons/hicolor/scalable/apps/*.svg

%changelog
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.4-0.2.790svn
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Fri Feb 13 2009 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> - 0.9.4-0.1.790svn
- Update to 0.9.4-beta3 (uses scons and qt4)

* Fri Apr 04 2008 Lubomir Kundrak <lkundrak@redhat.com> - 0.9.3-13
- QT3 changes by rdieter
- Fix build

* 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.