Summary: Integrated musical notation editor and MIDI sequencer
Summary(ja): 統合楽譜エディタ・MIDIシーケンサ

Name: rosegarden
Version: 2.1pl3
Release: 3%{?_dist_release}
License: GPL
Group: Applications/Multimedia
URL: http://www.bath.ac.uk/~masjpf/rose.html
Source0: http://www.cannam.demon.co.uk/%{name}/distribution/%{name}-%{version}.tar.gz
Source1: ftp://ftp.maths.bath.ac.uk/pub/dream/ROSE/rosegarden-2.1-manual.ps.gz
Patch0: rosegarden-2.1pl3.install.patch
Patch1: rosegarden-2.1pl2.ad.patch
Patch2: rosegarden-2.1pl2.help.patch
Requires: playmidi-X11
Requires: xorg-x11-jpfonts
BuildRequires: libXt-devel
BuildRequires: libXaw-devel
Buildroot: %{_tmppath}/%{name}-%{version}-root

%description
Rosegarden is a free integrated musical notation editor and MIDI
sequencer for Unix/X platforms, with specific support for Linux PCs
and SGI IRIX workstations.

%description -l ja
Rosegarden は Unix/X プラットフォームの楽譜エディタと MIDI シーケンサを
統合したフリーソフトウェアです。Linux と SGI IRIX ワークステーションを
サポートしています。

%package manual
Summary: Manual of Rosegarden 2.1
Group: Applications/Documentation
Summary(ja): Rosegarden 2.1 マニュアル

%description manual
This subpackage includes the manual of Rosegarden 2.1 (PostScript)

%description -l ja manual
このサブパッケージは Rosegarden 2.1 のマニュアル(ポストスクリプト形式)
を含んでいます。

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

cp %{SOURCE1} .

%build
%configure
make OPTFLAGS="${RPM_OPT_FLAGS}" clean all

%install
rm -fr %{buildroot}
./do-install

mkdir -p %{buildroot}/usr/share/rosegarden/bin
install -c ./bin/debug-aux  %{buildroot}/usr/share/rosegarden/bin
install -c ./bin/debug-edit %{buildroot}/usr/share/rosegarden/bin
install -c ./bin/debug-seq  %{buildroot}/usr/share/rosegarden/bin

rm -f rpm-files
touch rpm-files
if [ -d /etc/X11/wmconfig ]; then
	mkdir -p %{buildroot}/etc/X11/wmconfig
	cat << WMC >%{buildroot}/etc/X11/wmconfig/rosegarden
rosegarden name "Rosegarden"
rosegarden description "Integrated musical notation and MIDI sequencer."
rosegarden exec "rosegarden &"
rosegarden group Applications/Sound
WMC
	echo "%attr(-, root, root) %config /etc/X11/wmconfig/rosegarden" >rpm-files
fi

%clean
rm -fr %{buildroot}

%files -f rpm-files
%defattr(-, root, root)
%doc ANNOUNCEMENT CHANGES COPYING COPYRIGHT INSTALL PORTING README
/usr/share/X11/app-defaults/Rosegarden
/usr/bin/*
/usr/libexec/rosegarden/
%dir /usr/share/rosegarden/
/usr/share/rosegarden/bin
/usr/share/rosegarden/example
/usr/share/rosegarden/help
/usr/share/rosegarden/petal
/usr/share/rosegarden/rosepetal-filters
/usr/share/rosegarden/synth-patches

%files manual
%defattr(-, root, root)
%doc rosegarden-2.1-manual.ps.gz

%changelog
* Sun Sep 19 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.1pl3-3
- fix Patch0 (fix BTS:983)
- add BuildRequires: libXt-devel, libXaw-devel
- add Requires: xorg-x11-jpfonts

* Sun Nov 09 2008 Shu KONNO <owa@bg.wakwak.com> 2.1pl3-2vl5
- rebuild with libXaw.so.7 (libXaw-1.0.5)

* Fri Oct 10 2008 Shu KONNO <owa@bg.wakwak.com> 2.1pl3-1vl5
- applied new versioning policy, spec in utf-8

* Mon Dec 25 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.1pl3-0vl2
- rebuilt with new toolchains
- s/Copyright/License/
- changed manual Group to Applications/Documentation

* Sun Dec  9 2001 Jun Nishii <jun@vinelinux.org> 2.1pl3-0vl1
- ver.up

* Thu Jun 28 2001 Jun Nishii <jun@vinelinux.org>
- 2.1pl2-0vl1
- change spec to adapt Vine Linux

* Tue Jan 25 2000 Atsushi Yamagata <yamagata@plathome.co.jp>
- removed /usr/share/rosegarden/manual from the main package
- changed Group: Applications/Sound -> Applications/Multimedia

* Mon Nov 22 1999 Atsushi Yamagata <yamagata@plathome.co.jp>
- Updated to version 2.1pl2
- changed directries installed
- removed patch for glibc

* Tue Apr 21 1998 Atsushi Yamagata
- 2nd release
- built against glibc
- added wmconfig file
- corrected %files stage

* Tue Mar 24 1998 Atsushi Yamagata <yamagata@jwu.ac.jp>
- 1st release
