File lprof.spec of Package lprof
#
# spec file for package lprof
#
# Copyright (c) 2013 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/
#
Name: lprof
BuildRequires: libdrm-devel
BuildRequires: libtiff-devel
BuildRequires: qt3-devel-doc
BuildRequires: qt3-devel-tools
BuildRequires: scons
BuildRequires: update-desktop-files
BuildRequires: vigra-devel
Version: 1.11.4.1
Release: 0
Url: http://lprof.sourceforge.net/
Summary: ICC Profiler
License: GPL-2.0+
Group: Productivity/Graphics/Other
Source: %{name}-%{version}.tar.bz2
Patch: lprof-desktop.patch
Patch1: lprof-lcms.patch
Patch2: lprof-scons.patch
Patch3: argyll-typo.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
LPROF is the only open source ICC profiler with a graphical user
interface. It can be used to create profiles for cameras, scanners, and
monitors, and fills a necessary niche in the emerging open source color
management effort.
Authors:
--------
Hal Engel <hvengel@users.sourceforge.net>
Marti Maria <marti@littlecms.com>
%prep
%setup
%patch
%patch1
%patch2
%patch3
sed -i /includehint/d */*/*.ui
(
find -name SConstruct
find -name SConscript
echo lprof.pro build_config.py
find -name Makefile
) | while read ; do
sed -i "
s:/lib:/%_lib:g
s:\(os.path.join\|qtdir\)\(.*\)'lib':\1\2'%_lib':g
s:src/%_lib:src/lib:g
s:usr/%_lib/qt3:usr/lib/qt3:g
s/%{_lib}lprof/liblprof/g
s:%{_lib}qtlcmswidgets:libqtlcmswidgets:g
" $REPLY
done
%build
export QTDIR=/usr/lib/qt3
cat >lprof.conf <<EOF
PREFIX = '%{_prefix}'
ccflags = [$(echo $RPM_OPT_FLAGS | sed -e "s/[^ ]*/'&'/g" -e "s/ /,/g")]
cxxflags = [$(echo $RPM_OPT_FLAGS | sed -e "s/[^ ]*/'&'/g" -e "s/ /,/g")]
EOF
scons %{?jobs:-j %jobs}
%install
mkdir -p $RPM_BUILD_ROOT/usr/{bin,share/{applications,pixmaps}}
PREFIX=$RPM_BUILD_ROOT/usr scons PREFIX=$RPM_BUILD_ROOT/usr install
%suse_update_desktop_file lprof
find $RPM_BUILD_ROOT/usr/share/lprof/data -type f -print0 | xargs -0 chmod 644
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr (-, root, root)
%doc COPYING KNOWN_BUGS README sRGB_profile_License
/usr/bin/*
/usr/share/lprof
/usr/share/applications/*.desktop
/usr/share/pixmaps/*.png
%changelog