SHA256
1
0
forked from pool/hugin
hugin/hugin.spec

151 lines
4.4 KiB
RPMSpec

#
# spec file for package hugin
#
# Copyright (c) 2011 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: hugin
BuildRequires: OpenEXR-devel SDL-devel boost-devel cmake fftw3-devel freeglut-devel gcc-c++ glew-devel libexiv2-devel libpano-devel libxml2 update-desktop-files vigra zip
%if %suse_version > 1130
BuildRequires: python-wxWidgets wxWidgets-devel
%else
BuildRequires: python-wxGTK wxGTK-devel
%endif
%if %suse_version > 1020
BuildRequires: fdupes
%endif
License: GPLv2+
Group: Productivity/Graphics/Other
Summary: Toolchain for Stitching of Images and Creating Panoramas
Version: 2010.0.0
Release: 11
Source: %{name}-%{version}.tar.bz2
# For SVN snapshot:
# svn co https://hugin.svn.sourceforge.net/svnroot/hugin/hugin/trunk hugin
#Source: %{name}-svn2008xxxx.tar.bz2
Source1: %{name}-svn-dummy
Patch0: hugin-libpng14.patch
# PATCH-FIX-UPSTREAM hugin-fix-gcc46.patch idoenmez@suse.de -- Fix compilation with gcc 4.6
Patch1: hugin-fix-gcc46.patch
Url: http://hugin.sourceforge.net/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: make
# Optional package, if missing, it could cause unexpected errors:
Requires: enblend-enfuse >= 3.2
# Optional third party package:
Recommends: autopano-sift exiftool
%if %suse_version > 1130
%define _use_internal_dependency_generator 0
%define __find_requires %wx_requires
%endif
%description
Hugin can be used to stitch multiple images together. The resulting
image can span 360 degrees. Another common use is the creation of very
high resolution pictures by combining multiple images.
Other tools in this package can correct lens distortion, vignetting and
chromatic abberation, create HDR images, provide automatic feature
detection and extraction of key points.
Authors:
--------
Pablo d'Angelo <pablo.dangelo@web.de>
Kai-Uwe Behrmann <ku.b@gmx.de>
Douglas Wilkins
Ed Halley
Ippei Ukai
Bruno Postle
Alexandre Jenny
Ziv Yaniv
John Navas
Luca Vascon
Fabian Wetzel
%prep
%setup -q
%patch0
%patch1 -p1
# For SVN snapshot:
#setup -q -n %{name}
# Rename Catalan in Spain to Catalan.
mv src/translations/ca_ES.po src/translations/ca.po
# Rename Czech in Czech Republic to Czech.
mv src/translations/cs_CZ.po src/translations/cs.po
#sed -i "s/ca_ES/ca/;s/cs_CZ/cs/" src/hugin/po/LINGUAS
# Convert Japanese documentation to UTF-8 and delete note about Shift-JIS:
iconv -f shift-jis -t utf-8 <README_JP >README_JP.new
sed 1,4d <README_JP.new >README_JP.new2
touch -r README_JP README_JP.new2
mv README_JP.new2 README_JP
rm README_JP.new
# For SVN snapshot:
#mkdir bin
#cp %{S:1} bin/svn
#chmod +x bin/svn
%build
export PATH=$PWD/bin:$PATH
LIB_SUFFIX=%{_lib}
LIB_SUFFIX=${LIB_SUFFIX#lib}
cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} -DLIB_SUFFIX=$LIB_SUFFIX .
make %{?jobs:-j%jobs}
%install
%makeinstall
%suse_update_desktop_file hugin 2DGraphics
%suse_update_desktop_file PTBatcherGUI 2DGraphics
# locales
%{find_lang} %{name}
# Use better place for MIME icons.
mv $RPM_BUILD_ROOT%{_datadir}/icons/gnome $RPM_BUILD_ROOT%{_datadir}/icons/hicolor
%if %suse_version > 1020
%fdupes $RPM_BUILD_ROOT%{_datadir}
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%post
/sbin/ldconfig
if test -x usr/bin/update-mime-database ; then
usr/bin/update-mime-database usr/share/mime >/dev/null
fi
%postun
/sbin/ldconfig
if test -x usr/bin/update-mime-database ; then
usr/bin/update-mime-database usr/share/mime >/dev/null
fi
%files -f %{name}.lang
%defattr(-,root,root)
%doc AUTHORS authors.txt COPYING ChangeLog LICENCE_VIGRA README README_JP TODO
%{_bindir}/*
%{_datadir}/hugin
%{_datadir}/applications/*.desktop
%{_datadir}/icons/hicolor/48x48/mimetypes/*.png
%{_datadir}/mime/packages/*.xml
%{_datadir}/pixmaps/*.png
%{_libdir}/*.so
%{_libdir}/*.so.*
%doc %{_mandir}/man?/*
%changelog