diff --git a/find-hugin-provides.prov b/find-hugin-provides.prov new file mode 100644 index 0000000..4e5cfc1 --- /dev/null +++ b/find-hugin-provides.prov @@ -0,0 +1,46 @@ +#!/bin/sh +# +# Combined library.prov, desktop-file.prov and appdata.prov for hugin +# +# Transform appdata xml file into RPM appdata(filename) provides +# Author: Michael Schroeder +# +# Transform desktop mimetype info into RPM mimehandler(type) provides +# Author: Richard Hughes +# +# Also based on library provides scripts from RPM + +OLD_IFS="$IFS" +mark64=$(uname -m |grep -o 64) + +while read instfile ; do + case "$instfile" in + *.desktop) + if ! grep -q '^Type=Application$' "$instfile"; then continue; fi + if ! grep -q '^Exec=' "$instfile"; then continue; fi + echo "application()" + echo "application(${instfile##*/applications/})" + mime=`grep '^MimeType=' "$instfile" | cut -d'=' -f2` + IFS=';' + for type in $mime ; do + echo 'mimehandler('$type')' + done + ;; + *.appdata.xml) + echo "appdata()" + echo "appdata(${instfile##*/appdata/})" + ;; + */usr/lib$mark64/*.so.?.?) + soname=$(objdump -p $instfile | awk '/SONAME/ {print $2}') + if [ $mark64 -eq 64 ] ; then + lib64="()(64bit)" ; + else + lib64="" ; + fi + echo "$soname$lib64" + ;; + esac + done + +IFS=$OLD_IFS + diff --git a/hugin.appdata.patch b/hugin.appdata.patch new file mode 100644 index 0000000..575973f --- /dev/null +++ b/hugin.appdata.patch @@ -0,0 +1,39 @@ +Index: platforms/linux/appdata/PTBatcherGUI.appdata.xml +=================================================================== +--- platforms/linux/appdata/PTBatcherGUI.appdata.xml.orig ++++ platforms/linux/appdata/PTBatcherGUI.appdata.xml +@@ -3,7 +3,7 @@ + + PTBatcherGUI.desktop + GFDL +- Hugin batch processor ++ Hugin Batch Processor + A GUI queue manager for stitching multiple hugin projects + +

+Index: platforms/linux/appdata/calibrate_lens_gui.appdata.xml +=================================================================== +--- platforms/linux/appdata/calibrate_lens_gui.appdata.xml.orig ++++ platforms/linux/appdata/calibrate_lens_gui.appdata.xml +@@ -3,7 +3,7 @@ + + calibrate_lens_gui.desktop + GFDL +- Hugin calibrate lens ++ Hugin Calibrate Lens +

Automatic lens calibration + +

+Index: platforms/linux/appdata/hugin.appdata.xml +=================================================================== +--- platforms/linux/appdata/hugin.appdata.xml.orig ++++ platforms/linux/appdata/hugin.appdata.xml +@@ -3,7 +3,7 @@ + + hugin.desktop + GFDL +- hugin ++ Hugin Panorama Creator +

A panoramic photo stitcher and more + +

diff --git a/hugin.changes b/hugin.changes index 86268bc..9c6bc93 100644 --- a/hugin.changes +++ b/hugin.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Tue Feb 2 17:04:05 UTC 2016 - davejplater@gmail.com + +- Added hugin.appdata.patch to fix appdata.xml and desktop file + consistency. see boo#952324 and boo#962214 +- Added find-hugin-provides.prov to enable hugin to provide + appdata.xml and desktop files to fix installation system problems. + hugin didn't provide them due to the internal dependency generator + having to be disabled to deal with complex wxWidget requires. + ------------------------------------------------------------------- Sun Jan 17 18:54:02 UTC 2016 - p.drouand@gmail.com diff --git a/hugin.spec b/hugin.spec index 3f78e6f..df20d67 100644 --- a/hugin.spec +++ b/hugin.spec @@ -1,7 +1,7 @@ # # spec file for package hugin # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -58,14 +58,20 @@ Source: http://downloads.sourceforge.net/project/%{name}/%{name}/%{name} # svn co https://hugin.svn.sourceforge.net/svnroot/hugin/hugin/trunk hugin #Source: %%{name}-svn2008xxxx.tar.bz2 Source1: %{name}-svn-dummy +# This script is a combined appdata.prov and desktop-file.prov to enable hugin to provide appdata.xml and desktop files see boo#952324 +Source2: find-hugin-provides.prov +Patch0: hugin.appdata.patch Requires: enblend-enfuse >= 3.2 # needed for photo stiching (bnc#822775) Requires: make Recommends: autopano-sift Recommends: exiftool BuildRoot: %{_tmppath}/%{name}-%{version}-build + %define _use_internal_dependency_generator 0 +%define __find_provides %{SOURCE2} %define __find_requires %wx_requires +#%%debug_package %description Hugin can be used to stitch multiple images together. The resulting @@ -78,6 +84,7 @@ detection and extraction of key points. %prep %setup -q +%patch0 # For SVN snapshot: #setup -q -n %%{name} @@ -96,6 +103,7 @@ rm README_JP.new #mkdir bin #cp %%{SOURCE1} bin/svn #chmod +x bin/svn +chmod 0755 %{SOURCE2} %build export PATH=$PWD/bin:$PATH @@ -121,7 +129,7 @@ make VERBOSE=1 %{?_smp_mflags} -j1 # locales %{find_lang} %{name} # Use better place for MIME icons. -mv %{buildroot}%{_datadir}/icons/gnome %{buildroot}%{_datadir}/icons/hicolor +mv -f %{buildroot}%{_datadir}/icons/gnome %{buildroot}%{_datadir}/icons/hicolor mkdir -p %{buildroot}%{_docdir}/%{name} cp -a AUTHORS authors.txt COPYING ChangeLog README README_JP TODO %{buildroot}%{_docdir}/%{name}/ chmod -x %{buildroot}%{_docdir}/%{name}/*