diff --git a/qsynth-fix-locale-path.patch b/qsynth-fix-locale-path.patch new file mode 100644 index 0000000..aa80d52 --- /dev/null +++ b/qsynth-fix-locale-path.patch @@ -0,0 +1,39 @@ +diff -rupN qsynth-0.3.3.old/Makefile.in qsynth-0.3.3/Makefile.in +--- qsynth-0.3.3.old/Makefile.in 2008-06-22 15:36:31.000000000 -0400 ++++ qsynth-0.3.3/Makefile.in 2009-04-06 22:30:05.000000000 -0400 +@@ -81,19 +81,19 @@ install: $(name) icons/$(name).png $(tra + @install -d -v -m 0755 $(DESTDIR)$(prefix)/bin + @install -d -v -m 0755 $(DESTDIR)$(prefix)/share/pixmaps + @install -d -v -m 0755 $(DESTDIR)$(prefix)/share/applications +- @install -d -v -m 0755 $(DESTDIR)$(prefix)/share/locale ++ @install -d -v -m 0755 $(DESTDIR)$(prefix)/share/$(name)/locale + @install -v -m 0755 $(name) $(DESTDIR)$(prefix)/bin/$(name) + @install -v -m 0644 icons/$(name).png $(DESTDIR)$(prefix)/share/pixmaps/$(name).png + @install -v -m 0644 $(name).desktop $(DESTDIR)$(prefix)/share/applications/$(name).desktop +- @install -v -m 0644 $(translations_targets) $(DESTDIR)$(prefix)/share/locale ++ @install -v -m 0644 $(translations_targets) $(DESTDIR)$(prefix)/share/$(name)/locale + + uninstall: $(DESTDIR)$(prefix)/bin/$(name) + @rm -vf $(DESTDIR)$(prefix)/bin/$(name) + @rm -vf $(DESTDIR)$(prefix)/share/pixmaps/$(name).png + @rm -vf $(DESTDIR)$(prefix)/share/applications/$(name).desktop +- @rm -vf $(DESTDIR)$(prefix)/share/locale/$(translations_targets) ++ @rm -vf $(DESTDIR)$(prefix)/share/$(name)/locale/$(translations_targets) + @for x in $(translations_targets); do \ +- rm -vf $(DESTDIR)$(prefix)/share/locale/`basename $$x`; done ++ rm -vf $(DESTDIR)$(prefix)/share/$(name)/locale/`basename $$x`; done + + clean: $(name).mak + @make -f $(name).mak clean +diff -rupN qsynth-0.3.3.old/src/main.cpp qsynth-0.3.3/src/main.cpp +--- qsynth-0.3.3.old/src/main.cpp 2008-07-10 13:11:48.000000000 -0400 ++++ qsynth-0.3.3/src/main.cpp 2009-04-06 22:30:05.000000000 -0400 +@@ -77,7 +77,7 @@ public: + if (m_pMyTranslator->load(sLocName, sLocPath)) { + QApplication::installTranslator(m_pMyTranslator); + } else { +- sLocPath = CONFIG_PREFIX "/share/locale"; ++ sLocPath = CONFIG_PREFIX "/share/qsynth/locale"; + if (m_pMyTranslator->load(sLocName, sLocPath)) { + QApplication::installTranslator(m_pMyTranslator); + } else { diff --git a/qsynth.spec b/qsynth.spec index 257bdd5..fc708fd 100644 --- a/qsynth.spec +++ b/qsynth.spec @@ -1,20 +1,22 @@ -%define desktop_vendor fedora - -Summary: Qt based Fluidsynth GUI front end -Name: qsynth -Version: 0.3.3 -Release: 4%{?dist} -URL: http://qsynth.sourceforge.net -Source0: http://dl.sourceforge.net/qsynth/qsynth-%{version}.tar.gz +%global desktop_vendor fedora + +Summary: Qt based Fluidsynth GUI front end +Name: qsynth +Version: 0.3.3 +Release: 5%{?dist} +URL: http://qsynth.sourceforge.net +Source0: http://dl.sourceforge.net/qsynth/qsynth-%{version}.tar.gz #Source1: qsynth.desktop # Fedora qt4 binaries have -qt4 suffix -Patch0: qsynth-0.3.3-qt4.patch +Patch0: qsynth-0.3.3-qt4.patch # Fix close button not shown with Qt 4.5 (#494470) -Patch1: qsynth-0.3.3-qt45.patch -License: GPLv2+ -Group: Applications/Multimedia -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -Requires: hicolor-icon-theme +Patch1: qsynth-0.3.3-qt45.patch +# We don't want .qm files in the default locale dir +Patch2: qsynth-fix-locale-path.patch +License: GPLv2+ +Group: Applications/Multimedia +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +Requires: hicolor-icon-theme BuildRequires: fluidsynth-devel qt-devel desktop-file-utils @@ -30,12 +32,16 @@ synthesiser based on the Soundfont specification. %setup -q %patch0 -p1 -b .qt4 %patch1 -p1 -b .qt45 -iconv --from=ISO88591 --to=UTF8 AUTHORS -o AUTHORS +%patch2 -p1 -b .localedir + +iconv --from=ISO88591 --to=UTF8 AUTHORS -o AUTHORS.tmp +touch -r AUTHORS AUTHORS.tmp +mv -f AUTHORS.tmp AUTHORS %build %configure -%{__make} # doesn't understand %{?_smp_mflags} +%{__make} # doesn't understand %%{?_smp_mflags} %install @@ -55,21 +61,33 @@ desktop-file-install --vendor %{desktop_vendor} \ `for c in ${BASE} ${XTRA} ; do echo "--add-category $c " ; done` \ %{buildroot}%{_datadir}/applications/qsynth.desktop +# Create the lang file. %%find_lang does not handle .qm files +for file in %{buildroot}%{_datadir}/qsynth/locale/*.qm; do + language=$(basename $file|cut -f 2 -d _|sed 's|\..*||') + echo %%lang\($language\) %{_datadir}/qsynth/locale/qsynth_$language.qm >> qsynth.lang +done + %clean %{__rm} -rf %{buildroot} -%files -%defattr(-,root,root) +%files -f qsynth.lang +%defattr(-,root,root,-) %doc AUTHORS ChangeLog COPYING README TODO %{_bindir}/qsynth %{_datadir}/pixmaps/qsynth.png -%{_datadir}/locale/qsynth_*.qm +%dir %{_datadir}/qsynth/ %{_datadir}/applications/%{desktop_vendor}-qsynth.desktop %changelog +* Fri Apr 17 2009 Orcan Ogetbil 0.3.3-5 +- Fix locale path (#494470) +- Fix mixed spaces&tabs warnings +- Preserve timestamp of the file AUTHORS +- Replace %%define with %%global per new guidelines + * Fri Apr 10 2009 Kevin Kofler 0.3.3-4 - Fix close button not shown with Qt 4.5 (#494470)