File ddcutil-service.spec of Package ddcutil-service

# spec file for package ddcutil-service
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2024 Michael Hamilton <>
# 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

Name:           ddcutil-service
Version:        1.0.7
Release:        0
Summary:        D-Bus service for libddcutil VESA DDC Monitor Virtual Control Panel
License:        GPL-2.0-or-later
%if %{defined fedora_version}
Group:          Hardware/Other
%if %{defined suse_version}
Group:          System/GUI/Other
BuildRequires:  gcc-c++
BuildRequires:  libddcutil-devel >= 1.4.0
BuildRequires:  make
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(glib-2.0) >= 2.40
%if %{defined fedora_version}
Requires:       dbus-1-daemon
%if %{defined suse_version}
Requires:       dbus-1
Recommends:     ddcutil-i2c-udev-rules

ddcutil-service is D-Bus service wrapper for libddcutil which
implements the VESA DDC Monitor Control Command Set. In general,
most things that can be controlled using a monitor's on-screen
display can be controlled by this service.



install -d -m 0755 %{buildroot}%{_bindir} \
                   %{buildroot}%{_mandir}/man1/ \
                   %{buildroot}%{_mandir}/man7/ \
                   %{buildroot}%{_datadir}/%{name}/examples \
install -m 0755 %{name} %{buildroot}/%{_bindir}/%{name}
install -m 0644 com.ddcutil.DdcutilService.service %{buildroot}%{_datadir}/dbus-1/services/
install -m 0755 examples/* %{buildroot}%{_datadir}/%{name}/examples/
install -m 0644 %{name}.1 %{buildroot}%{_mandir}/man1/
install -m 0644 %{name}.7 %{buildroot}%{_mandir}/man7/
install -m 0644 -D -t %{buildroot}%{_prefix}/lib/modules-load.d/ i2c-dev/%{name}.conf

# The post modprobe is helpful for the user, but not really necessary, don't error if it fails
%{_prefix}/sbin/modprobe i2c-dev ||:

%license COPYING
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/examples
%dir %{_datadir}/dbus-1
%dir %{_datadir}/dbus-1/services
%dir %{_prefix}/lib/modules-load.d

openSUSE Build Service is sponsored by