On 02/21/2010 05:57 AM, D. Michael McIntyre wrote:
> On Saturday 20 February 2010, Dave Plater wrote:
>
>   
>> This thread has prompted me to clean up my spec file which I will post
>> (once the heavily congested ATM build service has finished) when I'm
>> happy with it and your comments on the %install and %files section will
>> be welcome.
>>     
> All of this is a bit much to digest on my limited time budget.  The whole 
> MIMEtypes icons and .desktop thing is something I did trying to read some 
> Freedesktop docs, and I never really got clear feedback from anyone on how 
> well I had achieved compliance.
>
> If you guys can sort it out and figure out just exactly what's broken, I'll 
> be 
> happy to patch the .desktop file, the install target, whatever is required.
>   
Here's the attached spec file and desktop patch.
Regards
Dave P
#
# spec file for package rosegarden4 (Version 10.02)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/

# norootforbuild

Name:           rosegarden4
BuildRequires:  libjack-devel
BuildRequires:  libqt4-devel >= 4.4.0
BuildRequires:  alsa-devel ladspa-devel dssi-devel lirc-devel liblrdf-devel 
libxml2-devel fftw3-devel
BuildRequires:  libsamplerate-devel libsndfile-devel
BuildRequires:  liblo-devel shared-mime-info update-desktop-files fdupes
Version:        10.02
Release:        1
License:        GPL v2 or later
Source:         rosegarden-%{version}.tar.bz2
#Source1:       rosegarden.desktop
Source2:        rosegarden.xpm
# See bnc #574650 for an explanation of rosegarden4rpmlintrc
Source4:        rosegarden4rpmlintrc
Patch0:         rosegarden-10.02-rpmoptflags.patch
Patch1:         rosegarden-10.02-plugin-lib64path.patch
# This patch enables rosegarden.desktop to pass the desktop-file-validate test
Patch2:         rosegarden-10.02-desktop.patch
Group:          Productivity/Multimedia/Sound/Midi
Summary:        Midi, audio and notation editor
Icon:           rosegarden.xpm
Url:            http://www.rosegardenmusic.com/
AutoReqProv:    on
Provides:       rosegarden-qt4 = %{version}-%{release}
Obsoletes:      rosegarden-qt4 < %{version}-%{release}
Recommends:     lilypond

BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Rosegarden is a well-rounded audio and MIDI sequencer,
score editor, and general-purpose music composition and
editing environment. Rosegarden is an easy-to-learn,
attractive application that runs on Linux, ideal for
composers, musicians, music students, and small studio or
home recording environments.
This is a complete rewrite of the old 1.7.x series of
rosegarden and has many new features and enhancements.
See the changelog for details.

Authors:
--------
    Chris Cannam <[email protected]>
    Richard Bown <[email protected]>
    Guillaume Laurent <[email protected]>


%prep
%setup -q -n rosegarden-%{version}
%patch0
%patch1
%patch2 -p 1
sh bootstrap.sh
%{?suse_update_config:%{suse_update_config -f}}

%build
export DEBUG_LADSPA
export QTDIR=/usr/
export CFLAGS="-fmessage-length=0 -O2 -fno-strict-aliasing -Wall 
-D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables 
-fasynchronous-unwind-tables -g -ggdb"
export CXXFLAGS="$CFLAGS"
#sh bootstrap.sh
%configure --enable-debug --localedir=%{_datadir}/rosegarden/locale/
%__make %{?jobs:-j%{jobs}}
# This translation handling make section is possibly only necessary when 
building svn
make ts
make ts-noobsolete
make locale


%install
mkdir -p %{buildroot}%{_datadir}/rosegarden/scripts
cp -p scripts/* %{buildroot}%{_datadir}/rosegarden/scripts/

make DESTDIR=%buildroot install
cp -r data/* %{buildroot}%{_datadir}/rosegarden/
#mkdir %{buildroot}
#rm -f %{buildroot}%{_datadir}/rosegarden/locale/*.ts
rm -rf %{buildroot}%{_datadir}/rosegarden/desktop
rm -rf %{buildroot}%{_datadir}/rosegarden/r*
rm -rf %{buildroot}%{_datadir}/rosegarden/mime
rm -f %{buildroot}%{_datadir}/rosegarden/*.cpp
rm -f %{buildroot}%{_datadir}/rosegarden/*.o
chmod 755 %{buildroot}%{_datadir}/rosegarden/scripts/*
chmod 644 %{buildroot}%{_datadir}/rosegarden/scripts/lircrc.rosegarden
chmod 644 %{buildroot}%{_datadir}/rosegarden/scripts/README
chmod 644 %{buildroot}%{_datadir}/rosegarden/scripts/color-list
chmod 644 %{buildroot}%{_datadir}/rosegarden/scripts/simple-makefile

%__install -D -m 0644 "%{SOURCE2}" 
"%{buildroot}%{_datadir}/pixmaps/rosegarden.xpm"
%suse_update_desktop_file 
%{buildroot}/%{_datadir}/applications/rosegarden.desktop
#This is a workaround to fix bnc#549870 install rosegarden wrapper script
# %__install -D -m 0755 "%{SOURCE4}" "%{buildroot}%{_bindir}/rosegarden"
%fdupes -s $RPM_BUILD_ROOT%{_datadir}/
#cp
%post
/usr/bin/update-mime-database "%{_datadir}/mime" >/dev/null

%postun
/usr/bin/update-mime-database "%{_datadir}/mime" >/dev/null

%clean
rm -rf %buildroot

%files
%defattr(-,root,root)
%dir %{_datadir}/icons/hicolor
%dir %{_datadir}/rosegarden/
%dir %{_datadir}/rosegarden/autoload
%dir %{_datadir}/rosegarden/chords
%dir %{_datadir}/rosegarden/examples
%dir %{_datadir}/rosegarden/fonts
%dir %{_datadir}/rosegarden/library
%dir %{_datadir}/rosegarden/locale
%dir %{_datadir}/rosegarden/profile
%dir %{_datadir}/rosegarden/scripts
%dir %{_datadir}/rosegarden/styles
%dir %{_datadir}/rosegarden/templates
%dir %{_datadir}/rosegarden/templates
%{_datadir}/icons/hicolor/*
%{_datadir}/pixmaps/rosegarden.xpm
%{_datadir}/applications/rosegarden.desktop
%{_bindir}/rosegarden
# %{_bindir}/rosegarden.bin
%{_datadir}/rosegarden/*
%{_datadir}/rosegarden/presets/*
%{_datadir}/rosegarden/pixmaps/*
%{_datadir}/rosegarden/autoload/*
%{_datadir}/rosegarden/chords/*
%{_datadir}/rosegarden/examples/*
%{_datadir}/rosegarden/fonts/*
%{_datadir}/rosegarden/library/*
%{_datadir}/rosegarden/locale/*
%{_datadir}/rosegarden/profile/*
%{_datadir}/rosegarden/scripts/*
%{_datadir}/rosegarden/styles/*
%{_datadir}/rosegarden/templates/*
%{_datadir}/mime/packages/rosegarden.xml

%changelog
Index: rosegarden-10.02/data/desktop/rosegarden.desktop
===================================================================
--- rosegarden-10.02.orig/data/desktop/rosegarden.desktop
+++ rosegarden-10.02/data/desktop/rosegarden.desktop
@@ -5,8 +5,7 @@ Categories=AudioVideo;Audio;Midi;Sequenc
 Exec=rosegarden %f
 MimeType=audio/x-rosegarden-composition;audio/x-rosegarden-device;audio/x-rosegarden-project;audio/x-rosegarden-template;audio/x-wav;audio/midi;audio/ogg;audio/mp3;audio/x-flac;
 X-KDE-NativeMimeType=audio/x-rosegarden-composition
-Icon=rosegarden.png
-DocPath=http://rosegardenmusic.com
+Icon=rosegarden
 Comment=MIDI and Audio Sequencer and Notation Editor
 Comment[es]=Secuenciador de MIDI y de audio y editor de partitura
 Terminal=false
------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Rosegarden-devel mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to