mirror of
https://abf.rosa.ru/djam/colord.git
synced 2025-02-23 22:13:00 +00:00
249 lines
6.9 KiB
RPMSpec
249 lines
6.9 KiB
RPMSpec
%define major 2
|
|
%define api 1.0
|
|
%define libname %mklibname %{name} %{major}
|
|
%define libprivate %mklibname colordprivate %{major}
|
|
%define libhug %mklibname colorhug %{major}
|
|
%define girname %mklibname %{name}-gir %{api}
|
|
%define girhug %mklibname colorhug-gir %{api}
|
|
%define devname %mklibname %{name} -d
|
|
|
|
# Building the extra print profiles requires colprof, +4Gb of RAM and
|
|
# quite a lot of time. Don't enable this for test builds.
|
|
%bcond_without print_profiles
|
|
|
|
%define _disable_ld_no_undefined 1
|
|
|
|
# SANE is pretty insane when it comes to handling devices, and we get AVCs
|
|
# popping up all over the place.
|
|
%bcond_without sane
|
|
%bcond_with docs
|
|
|
|
Summary: Color daemon
|
|
Name: colord
|
|
Version: 1.4.7
|
|
Release: 3
|
|
License: GPLv2+ and LGPLv2+
|
|
Group: System/X11
|
|
Url: https://github.com/hughsie/colord
|
|
Source0: http://www.freedesktop.org/software/colord/releases/%{name}-%{version}.tar.xz
|
|
Source1: colord.sysusers
|
|
Patch1: https://github.com/hughsie/colord/commit/08a32b2379fb5582f4312e59bf51a2823df56276.patch
|
|
Patch2: https://github.com/hughsie/colord/commit/9283abd9c00468edb94d2a06d6fa3681cae2700d.patch
|
|
Patch3: https://github.com/hughsie/colord/commit/7435d9c23a1d3bc138dcae0e05ea06fb244568fe.patch
|
|
Patch4: https://github.com/hughsie/colord/commit/d8076a16ea1f4437cca3799d414faf40cddae955.patch
|
|
Patch5: https://github.com/hughsie/colord/commit/f4fdb66d0399e3223c068c663e7621ea19b71a7b.patch
|
|
%if %{with print_profiles}
|
|
BuildRequires: argyllcms
|
|
%endif
|
|
BuildRequires: docbook-utils
|
|
BuildRequires: docbook-dtd41-sgml
|
|
BuildRequires: gettext
|
|
BuildRequires: gtk-doc
|
|
BuildRequires: intltool
|
|
BuildRequires: locales
|
|
BuildRequires: meson
|
|
BuildRequires: vala-tools
|
|
%if %{with sane}
|
|
BuildRequires: sane-devel
|
|
%endif
|
|
BuildRequires: pkgconfig(bash-completion)
|
|
BuildRequires: pkgconfig(dbus-1)
|
|
BuildRequires: pkgconfig(glib-2.0)
|
|
BuildRequires: pkgconfig(gobject-introspection-1.0)
|
|
BuildRequires: pkgconfig(gudev-1.0)
|
|
BuildRequires: pkgconfig(gusb)
|
|
BuildRequires: pkgconfig(lcms2)
|
|
BuildRequires: pkgconfig(libudev)
|
|
BuildRequires: pkgconfig(libusb-1.0)
|
|
BuildRequires: pkgconfig(polkit-gobject-1)
|
|
BuildRequires: pkgconfig(sqlite3)
|
|
BuildRequires: pkgconfig(systemd)
|
|
%if %{mdvver} >= 202310
|
|
Requires(pre): /usr/bin/systemd-sysusers
|
|
%else
|
|
Requires(pre): /bin/systemd-sysusers
|
|
%endif
|
|
Provides: shared-color-profiles = %{EVRD}
|
|
|
|
%description
|
|
colord is a low level system activated daemon that maps color devices
|
|
to color profiles in the system context.
|
|
|
|
%files -f %{name}.lang
|
|
%doc AUTHORS NEWS
|
|
%{_datadir}/bash-completion/completions/colormgr
|
|
%{_datadir}/dbus-1/system.d/org.freedesktop.ColorManager.conf
|
|
%{_udevrulesdir}/*.rules
|
|
%{_bindir}/cd-create-profile
|
|
%{_bindir}/cd-fix-profile
|
|
%{_bindir}/cd-iccdump
|
|
%{_bindir}/cd-it8
|
|
%{_bindir}/colormgr
|
|
%{_libexecdir}/colord
|
|
%if %{with sane}
|
|
%{_libexecdir}/colord-sane
|
|
%endif
|
|
%{_libexecdir}/colord-session
|
|
%{_libdir}/colord-plugins/*.so
|
|
%{_libdir}/colord-sensors/*.so
|
|
%dir %{_datadir}/color/icc/colord
|
|
%{_datadir}/color/icc/colord/*.ic?
|
|
%{_datadir}/colord/icons/*.svg
|
|
%{_datadir}/colord/ti1/*.ti1
|
|
%{_datadir}/colord/illuminant
|
|
%{_datadir}/colord/cmf
|
|
%{_datadir}/colord/ref
|
|
%{_datadir}/dbus-1/interfaces/org.freedesktop.ColorHelper.xml
|
|
%{_datadir}/dbus-1/interfaces/org.freedesktop.ColorManager*.xml
|
|
%{_datadir}/dbus-1/services/org.freedesktop.ColorHelper.service
|
|
%{_datadir}/dbus-1/system-services/org.freedesktop.ColorManager.service
|
|
%{_datadir}/glib-2.0/schemas/org.freedesktop.ColorHelper.gschema.xml
|
|
%{_datadir}/polkit-1/actions/org.freedesktop.color.policy
|
|
%if %{with docs}
|
|
%{_mandir}/man1/*.1.*
|
|
%endif
|
|
%attr(755,colord,colord) %dir %{_localstatedir}/lib/colord
|
|
%attr(755,colord,colord) %dir %{_localstatedir}/lib/colord/icc
|
|
%ghost %{_localstatedir}/lib/colord/*.db
|
|
%{_unitdir}/colord.service
|
|
%{_userunitdir}/colord-session.service
|
|
%{_tmpfilesdir}/colord.conf
|
|
%{_sysusersdir}/colord.conf
|
|
|
|
%pre
|
|
%sysusers_create_package colord %{SOURCE1}
|
|
|
|
%post
|
|
%tmpfiles_create colord.conf
|
|
%systemd_post colord.service
|
|
%systemd_user_post colord-session.service
|
|
|
|
%preun
|
|
%systemd_preun colord.service
|
|
%systemd_user_preun colord-session.service
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%package -n %{libname}
|
|
Summary: Library package for %{name}
|
|
Group: System/Libraries
|
|
|
|
%description -n %{libname}
|
|
Main library for %{name}.
|
|
|
|
%files -n %{libname}
|
|
%{_libdir}/libcolord.so.%{major}*
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%package -n %{libprivate}
|
|
Summary: Library package for %{name}
|
|
Group: System/Libraries
|
|
|
|
%description -n %{libprivate}
|
|
Main library for %{name}.
|
|
|
|
%files -n %{libprivate}
|
|
%{_libdir}/libcolordprivate.so.%{major}*
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%package -n %{libhug}
|
|
Summary: Library package for %{name}
|
|
Group: System/Libraries
|
|
|
|
%description -n %{libhug}
|
|
Main library for %{name}.
|
|
|
|
%files -n %{libhug}
|
|
%{_libdir}/libcolorhug.so.%{major}*
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%package -n %{girhug}
|
|
Summary: GObject Introspection interface description for ColorHug
|
|
Group: System/Libraries
|
|
|
|
%description -n %{girhug}
|
|
GObject Introspection interface description for ColorHug
|
|
|
|
%files -n %{girhug}
|
|
%{_libdir}/girepository-1.0/Colorhug-%{api}.typelib
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%package -n %{girname}
|
|
Summary: GObject Introspection interface description for %{name}
|
|
Group: System/Libraries
|
|
|
|
%description -n %{girname}
|
|
GObject Introspection interface description for %{name}.
|
|
|
|
%files -n %{girname}
|
|
%{_libdir}/girepository-1.0/Colord-%{api}.typelib
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%package -n %{devname}
|
|
Summary: Development package for %{name}
|
|
Group: Development/C
|
|
Requires: %{libname} = %{EVRD}
|
|
Requires: %{libprivate} = %{EVRD}
|
|
Requires: %{libhug} = %{EVRD}
|
|
Requires: %{girname} = %{EVRD}
|
|
Requires: %{girhug} = %{EVRD}
|
|
Provides: %{name}-devel = %{EVRD}
|
|
|
|
%description -n %{devname}
|
|
Files for development with %{name}.
|
|
|
|
%files -n %{devname}
|
|
%{_includedir}/colord-1
|
|
%{_libdir}/lib*.so
|
|
%{_libdir}/pkgconfig/*.pc
|
|
%{_datadir}/gir-1.0/*.gir
|
|
%{_datadir}/vala/vapi/*.vapi
|
|
%{_datadir}/vala/vapi/colord.deps
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%prep
|
|
%autosetup -p1
|
|
|
|
%build
|
|
# Set ~2 GiB limit so that colprof is forced to work in chunks when
|
|
# generating the print profile rather than trying to allocate a 3.1 GiB
|
|
# chunk of RAM to put the entire B-to-A tables in.
|
|
ulimit -Sv 2000000
|
|
export CC=%{__cc}
|
|
export CXX=%{__cxx}
|
|
|
|
%meson \
|
|
-Dlibcolordcompat=true \
|
|
-Dvapi=true \
|
|
-Dtests=false \
|
|
%if !%{with docs}
|
|
-Dman=false \
|
|
-Ddocs=false \
|
|
%endif
|
|
%if %{with print_profiles}
|
|
-Dprint_profiles=true \
|
|
%endif
|
|
%if %{with sane}
|
|
-Dsane=true \
|
|
%endif
|
|
-Ddaemon_user="colord"
|
|
|
|
%meson_build
|
|
|
|
%install
|
|
%meson_install
|
|
|
|
mkdir -p %{buildroot}%{_sysusersdir}
|
|
install -m644 %{SOURCE1} %{buildroot}%{_sysusersdir}/colord.conf
|
|
|
|
# databases
|
|
touch %{buildroot}%{_localstatedir}/lib/colord/mapping.db
|
|
touch %{buildroot}%{_localstatedir}/lib/colord/storage.db
|
|
|
|
%find_lang %{name}
|