Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > 5282dfa669f1db4d411c71137b764c2d > files > 5

canorus-0.7-3.mga3.src.rpm

%define	_subrel	R1002

Name:		canorus
Version:	0.7
Release:	%mkrel 3
License:	GPLv2
Url:		http://canorus.sourceforge.net
Source:		http://sourceforge.net/projects/canorus/files/0.7/%{name}_%{version}.%{_subrel}_source.tar.bz2
Source1:	%{name}-it.ts
Patch0:		%{name}-explicit-link.patch
Patch1:		%{name}-desktopfile.patch
Patch2:		%{name}-usersguide-makefile.patch
Group:		Education
Summary:	A music score editor

BuildRequires:	cmake
BuildRequires:	qt4-devel
BuildRequires:	desktop-file-utils
BuildRequires:	doxygen
BuildRequires:	graphviz
BuildRequires:	lyx
BuildRequires:	qt4-assistant
BuildRequires:	imagemagick

%description
Canorus is a free cross-platform music score editor.
It supports an unlimited number and length of staffs, polyphony, 
a MIDI playback of notes, chord markings, lyrics, import/export filters 
to formats like MIDI, MusicXML, ABC Music, MusiXTeX and LilyPond

%prep
%setup -q -n %{name}-%{version}.%{_subrel}
%patch0 -p1 -b .cmakezlib
%patch1 -p1 -b .desktopfile
%patch2 -p1 -b .usersguidemkfile

cp %{SOURCE1} src/lang/it.ts

%build
QTDIR="%qt4dir" ; export QTDIR ;
%setup_compile_flags
cmake . \
	-DCMAKE_INSTALL_PREFIX=%_prefix \
	-DNO_RUBY:BOOL=TRUE \
	-DNO_SWIG:BOOL=TRUE \
	-DNO_PYTHON:BOOL=TRUE
%make

sed -i -e 's|@USRLIB@|%{_libdir}|g' doc/usersguide/Makefile

pushd doc
pushd developersguide
%make
popd
pushd usersguide
%make all
popd
popd

%install
rm -fr %{buildroot}

install -D -d -m 755 %{buildroot}%{_bindir}
install -D -d -m 755 %{buildroot}%{_libdir}
install -D -d -m 755 %{buildroot}%{_datadir}/%{name}
install -D -d -m 755 %{buildroot}%{_datadir}/%{name}/doc
install -D -d -m 755 %{buildroot}%{_datadir}/applications
install -D -d -m 755 %{buildroot}%{_iconsdir}

install -m 755 src/%{name} %{buildroot}%{_bindir}/%{name}
install -m 755 %{name}.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop
install -m 755 doc/usersguide/images/canorushelpicon.png %{buildroot}%{_iconsdir}/%{name}.png

cp -R src/ui/images %{buildroot}%{_datadir}/%{name}
cp -R src/fonts %{buildroot}%{_datadir}/%{name}
cp -R src/plugins %{buildroot}%{_datadir}/%{name}
cp -R src/scripts %{buildroot}%{_datadir}/%{name}
cp -R src/lang %{buildroot}%{_datadir}/%{name}
cp -R doc/developersguide %{buildroot}%{_datadir}/%{name}/doc/
cp -R doc/usersguide %{buildroot}%{_datadir}/%{name}/doc/

find %{buildroot}%{_datadir}/%{name}/doc -name "Makefile*" -type f -delete
find %{buildroot}%{_datadir}/%{name}/doc -name "cmake*" -type f -delete

desktop-file-install --vendor="" \
		     --dir %{buildroot}%{_datadir}/applications \
		     --add-category="Education" \
		     %{buildroot}%{_datadir}/applications/%{name}.desktop

%find_lang %{name}

%files -f %{name}.lang
%doc LICENSE.GPL README NEWS AUTHORS DEVELOPERS
%{_bindir}/%{name}
%{_datadir}/%{name}/images/*
%{_datadir}/%{name}/fonts/*
%{_datadir}/%{name}/lang/*
%{_datadir}/%{name}/plugins/*
%{_datadir}/%{name}/scripts/*
%{_datadir}/applications/%{name}.desktop
%{_iconsdir}/%{name}.png

%package doc
Summary:	Canorus documentation
BuildArch:	noarch

%description doc
Canorus users guide and developers guide.
The documentation is available in many formats:
	* PDF
	* Html
	* Qt Help

%files doc
%doc doc/Readme-doc.txt
%{_datadir}/%{name}/doc/developersguide
%{_datadir}/%{name}/doc/usersguide


%changelog

* Fri Jan 11 2013 umeabot <umeabot> 0.7-3.mga3
+ Revision: 347382
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Mon Apr 02 2012 matteo <matteo> 0.7-2.mga2
+ Revision: 227951
- removed unuseful items into doc subpackage
- fixed missing buildrequire (imagemagick)
- added italian translations
- added missing buildrequire (graphviz)
- fixed missing application menu icon
- removed wrong directory into -doc subpackage
- added Education category to desktop file

* Fri Feb 10 2012 matteo <matteo> 0.7-1.mga2
+ Revision: 207073
- replaced partial cmake_zlib patch with explicit-link patch
- cmake added as br
- removed makefiles
- desktop file patch added
- usersguide makefile patch added
- doc subpackage added
- patch to add zlib to target_link_libraries
- commented items about python component that don't build with swing2
- imported package canorus