mirror of
https://abf.rosa.ru/djam/colord.git
synced 2025-02-23 22:13:00 +00:00
242 lines
6.5 KiB
RPMSpec
242 lines
6.5 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.5
|
|
Release: 1
|
|
License: GPLv2+ and LGPLv2+
|
|
Group: System/X11
|
|
Url: http://www.freedesktop.org/software/colord/
|
|
Source0: http://www.freedesktop.org/software/colord/releases/%{name}-%{version}.tar.xz
|
|
|
|
BuildRequires: docbook-utils
|
|
BuildRequires: docbook-dtd41-sgml
|
|
BuildRequires: locales
|
|
BuildRequires: gettext
|
|
BuildRequires: gtk-doc
|
|
BuildRequires: intltool
|
|
BuildRequires: vala-tools
|
|
%if %{with sane}
|
|
BuildRequires: sane-devel
|
|
%endif
|
|
BuildRequires: pkgconfig(dbus-1)
|
|
BuildRequires: pkgconfig(glib-2.0)
|
|
BuildRequires: pkgconfig(bash-completion)
|
|
BuildRequires: pkgconfig(gobject-introspection-1.0)
|
|
BuildRequires: pkgconfig(gudev-1.0)
|
|
BuildRequires: pkgconfig(gusb)
|
|
BuildRequires: pkgconfig(lcms2)
|
|
BuildRequires: pkgconfig(libusb-1.0)
|
|
BuildRequires: pkgconfig(polkit-gobject-1)
|
|
BuildRequires: pkgconfig(sqlite3)
|
|
BuildRequires: pkgconfig(systemd)
|
|
BuildRequires: pkgconfig(libudev)
|
|
BuildRequires: meson
|
|
%if %{with print_profiles}
|
|
BuildRequires: argyllcms
|
|
%endif
|
|
|
|
Requires: systemd-units
|
|
Requires(post): systemd
|
|
Requires(pre,postun): rpm-helper
|
|
|
|
Obsoletes: %{girname} < 1.0.4
|
|
Provides: %{girname} = %{EVRD}
|
|
Obsoletes: shared-color-profiles < 0.1.6-3
|
|
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
|
|
/lib/udev/rules.d/*.rules
|
|
%{_bindir}/*
|
|
%{_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
|
|
%{_presetdir}/86-colord.preset
|
|
%{_unitdir}/*.service
|
|
%{_prefix}/lib/systemd/user/colord-session.service
|
|
%{_tmpfilesdir}/*.conf
|
|
|
|
%pre
|
|
%_pre_useradd colord /var/lib/colord /sbin/nologin
|
|
%_pre_groupadd colord colord
|
|
|
|
%post
|
|
%tmpfiles_create %{_tmpfilesdir}/colord.conf
|
|
|
|
%postun
|
|
%_postun_userdel colord
|
|
%_postun_groupdel colord
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%package -n %{libname}
|
|
Summary: Library package for %{name}
|
|
Group: System/Libraries
|
|
Obsoletes: %{_lib}%{name}1 < 1.2.0
|
|
|
|
%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
|
|
Obsoletes: %{_lib}%{name}private1 < 1.2.0
|
|
|
|
%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
|
|
Obsoletes: %{_lib}%{name}hug1 < 1.2.0
|
|
|
|
%description -n %{libhug}
|
|
Main library for %{name}.
|
|
|
|
%files -n %{libhug}
|
|
%{_libdir}/libcolorhug.so.%{major}*
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%package -n %{devname}
|
|
Summary: Development package for %{name}
|
|
Group: Development/C
|
|
Requires: %{libname} = %{EVRD}
|
|
Requires: %{libprivate} = %{EVRD}
|
|
Requires: %{libhug} = %{EVRD}
|
|
Requires: %{girname} = %{version}-%{release}
|
|
Requires: %{girhug} = %{version}-%{release}
|
|
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
|
|
|
|
#----------------------------------------------------------------------------
|
|
%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
|
|
|
|
%prep
|
|
%setup -q
|
|
|
|
%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" || cat meson-logs/meson-log.txt
|
|
|
|
%meson_build
|
|
|
|
%install
|
|
%meson_install
|
|
|
|
# databases
|
|
touch %{buildroot}%{_localstatedir}/lib/colord/mapping.db
|
|
touch %{buildroot}%{_localstatedir}/lib/colord/storage.db
|
|
|
|
install -d %{buildroot}%{_presetdir}
|
|
cat > %{buildroot}%{_presetdir}/86-colord.preset << EOF
|
|
enable colord.service
|
|
EOF
|
|
|
|
%find_lang %{name}
|