File lprof.spec of Package lprof
#
# spec file for package lprof
#
# Copyright (c) 2015 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
# 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
Version: 1.11.4.1
Release: 0
Summary: ICC Profiler
License: GPL-2.0+
Group: Productivity/Graphics/Other
Url: http://lprof.sourceforge.net/
Source: http://sourceforge.net/projects/lprof/files/lprof/lprof-1.11.4/%{name}-%{version}.tar.gz
Patch0: lprof-desktop.patch
Patch1: lprof-lcms.patch
Patch2: lprof-scons.patch
Patch3: argyll-typo.patch
BuildRequires: libdrm-devel
BuildRequires: liblcms-devel
BuildRequires: libtiff-devel
BuildRequires: qt3-devel-doc
BuildRequires: qt3-devel-tools
BuildRequires: scons
BuildRequires: update-desktop-files
BuildRequires: vigra-devel
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.
%prep
%setup -q
%patch0
%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=%{_libexecdir}/qt3
cat >lprof.conf <<EOF
PREFIX = '%{_prefix}'
ccflags = [$(echo %{optflags} | sed -e "s/[^ ]*/'&'/g" -e "s/ /,/g")]
cxxflags = [$(echo %{optflags} | sed -e "s/[^ ]*/'&'/g" -e "s/ /,/g")]
EOF
scons %{?_smp_mflags}
%install
mkdir -p %{buildroot}%{_prefix}/{bin,share/{applications,pixmaps}}
PREFIX=%{buildroot}%{_prefix} scons PREFIX=%{buildroot}%{_prefix} install
%suse_update_desktop_file lprof
find %{buildroot}%{_datadir}/lprof/data -type f -print0 | xargs -0 chmod 644
%files
%defattr (-, root, root)
%doc COPYING KNOWN_BUGS README sRGB_profile_License
%{_bindir}/*
%{_datadir}/lprof
%{_datadir}/applications/*.desktop
%{_datadir}/pixmaps/*.png
%changelog