File colorhug-client.spec of Package colorhug-client
# Copyright (c) 2012 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: colorhug-client
Version: 0.1.8
Summary: Tools for the Hughski Colorimeter
%if 0%{?suse_version}
Release: 0
%else
Release: 0.#BUILD#%{?alphatag}%{?dist}
%endif
License: GPL-2.0+
Url: http://www.hughski.com/
Source0: http://people.freedesktop.org/~hughsient/releases/%{name}-%{version}.tar.xz
%if 0%{?suse_version}
Group: Productivity/Graphics/Other
BuildRequires: update-desktop-files
BuildRequires: xz
%endif
BuildRequires: docbook-utils
BuildRequires: intltool
BuildRequires: pkgconfig(colord) >= 0.1.15
BuildRequires: pkgconfig(gio-2.0) >= 2.25.9
BuildRequires: pkgconfig(glib-2.0) >= 2.28.0
BuildRequires: pkgconfig(gmodule-2.0)
BuildRequires: pkgconfig(gobject-2.0)
BuildRequires: pkgconfig(gtk+-3.0) >= 2.91.0
BuildRequires: pkgconfig(gusb) >= 0.1.2
BuildRequires: pkgconfig(lcms2)
BuildRequires: pkgconfig(libcanberra-gtk3) >= 0.10
BuildRequires: pkgconfig(libsoup-2.4)
Recommends: %{name}-lang
%description
The Hughski ColorHug colorimeter is a low cost open-source hardware
sensor used to calibrate screens.
This package includes the client tools which allows the user to upgrade
the firmware on the sensor or to access the sensor from command line
scripts.
%package -n libcolorhug1
Summary: Library for the Hughski Colorimeter
Group: System/Libraries
%description -n libcolorhug1
A library to access the Hughski Colorimeter
%package -n libcolorhug-devel
Summary: Development files for libcolorhug
Group: Development/Libraries/C and C++
Requires: libcolorhug1 = %{version}
%description -n libcolorhug-devel
Development files for libcolorhug
%lang_package
%prep
%setup -q
%build
%configure --disable-static
make %{?_smp_mflags}
%install
%make_install
find %{buildroot}%{_libdir} -name '*.la' -type f -delete -print
%suse_update_desktop_file -u -r -G 'CCMX Loader' colorhug-ccmx Graphics Color
%suse_update_desktop_file -u -r -G 'Firmware Updater' colorhug-flash Graphics Color
%find_lang %{name}
%post
%if 0%{?suse_version} > 1130
%glib2_gsettings_schema_post
%desktop_database_post
%icon_theme_cache_post
%endif
%postun
%if 0%{?suse_version} > 1130
%glib2_gsettings_schema_postun
%desktop_database_postun
%icon_theme_cache_postun
%endif
%post -n libcolorhug1 -p /sbin/ldconfig
%postun -n libcolorhug1 -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%doc README AUTHORS NEWS COPYING
%dir %{_datadir}/colorhug-client
%{_datadir}/colorhug-client
%{_libexecdir}/colorhug*
%{_bindir}/colorhug*
%{_datadir}/applications/*.desktop
%{_datadir}/icons/hicolor/*/apps/colorhug.png
%{_datadir}/icons/hicolor/*/apps/colorhug-flash.png
%{_datadir}/icons/hicolor/*/apps/colorhug-ccmx.png
%{_datadir}/icons/hicolor/*/apps/colorimeter-colorhug-inactive.png
%{_datadir}/icons/hicolor/scalable/apps/colorhug.svg
%{_datadir}/icons/hicolor/*/mimetypes/application-x-ccmx.png
%{_datadir}/icons/hicolor/scalable/mimetypes/application-x-ccmx.svg
%{_datadir}/glib-2.0/schemas/com.hughski.colorhug-client.gschema.xml
%{_mandir}/man1/*.1%{?ext_man}
%config %{_sysconfdir}/bash_completion.d/*-completion.bash
%files -n libcolorhug1
%defattr(-,root,root)
%{_libdir}/libcolorhug.so.1
%{_libdir}/libcolorhug.so.1.0.0
%files -n libcolorhug-devel
%defattr(-,root,root)
%{_includedir}/libcolorhug/
%{_libdir}/libcolorhug.so
%{_libdir}/pkgconfig/colorhug.pc
%files lang -f %{name}.lang
%changelog