]> git.pld-linux.org Git - packages/ddcutil.git/blame_incremental - ddcutil.spec
- release 3 (by relup.sh)
[packages/ddcutil.git] / ddcutil.spec
... / ...
CommitLineData
1#
2# Conditional build:
3%bcond_without cython # Python extension based on Cython
4
5Summary: Query and change Linux monitor settings using DDC/CI and USB
6Summary(pl.UTF-8): Odczyt i zmiana ustawień monitora spod Linuksa przy użyciu DDC/CI i USB
7Name: ddcutil
8Version: 0.9.7
9Release: 3
10License: GPL v2+
11Group: X11/Applications
12#Source0Download: https://github.com/rockowitz/ddcutil/releases
13#TODO: use named tarballs: https://github.com/rockowitz/ddcutil/archive/v%{version}/%{name}-%{version}.tar.gz
14Source0: https://github.com/rockowitz/ddcutil/archive/v%{version}.tar.gz
15# Source0-md5: 427c956956ac8c9afdc8e18c76a8e3b0
16Patch0: %{name}-python.patch
17URL: http://www.ddcutil.com/
18BuildRequires: autoconf >= 2.69
19BuildRequires: automake >= 1:1.11
20BuildRequires: glib2-devel >= 1:2.32
21BuildRequires: libdrm-devel >= 2.4.67
22BuildRequires: libtool >= 2:2
23BuildRequires: libusb-devel >= 1.0.15
24BuildRequires: pkgconfig
25%if %{with cython}
26BuildRequires: python-Cython
27BuildRequires: python-devel >= 1:2.6
28BuildRequires: python3-Cython
29BuildRequires: python3-devel >= 1:3.2
30%endif
31BuildRequires: xorg-lib-libX11-devel
32BuildRequires: xorg-lib-libXrandr-devel
33BuildRequires: zlib-devel
34Requires: libdrm >= 2.4.67
35Requires: libusb >= 1.0.15
36BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38%description
39ddcutil is a program for querying and changing monitor settings, such
40as brightness and color levels.
41
42ddcutil uses DDC/CI to communicate with monitors implementing MCCS
43(Monitor Control Command Set) over I2C. Normally, the video driver for
44the monitor exposes the I2C channel as devices named /dev/i2c-n. There
45is also support for monitors (such as Apple Cinema and Eizo
46ColorEdge) that implement MCCS using a USB connection.
47
48A particular use case for ddcutil is as part of color profile
49management. Monitor calibration is relative to the monitor color
50settings currently in effect, e.g. red gain. ddcutil allows color
51related settings to be saved at the time a monitor is calibrated, and
52then restored when the calibration is applied.
53
54%description -l pl.UTF-8
55ddcutil to program do odczytu i zmiany ustawień monitora, takich jak
56jasność i poziomy kolorów.
57
58ddcutil wykorzystuje DDC/CI do komunikacji z monitorami obsługującymi
59MCCS (Monitor Control Command Set) po I2C. Zwykle sterownik obrazu dla
60monitora udostępnia kanał I2C jako urządzenia o nazwie /dev/i2c-n.
61Jest także obsługa monitorów obsługujących MCCS po połączeniu USB (jak
62Apple Cinema czy Eizo ColorEdge).
63
64Szczególnym przypadkiem użycia ddcutil jest część zarządzania
65profilami kolorów. Kalibracja monitora jest względem obecnych ustawień
66kolorów monitora, np. współczynnika czerwieni. ddcutil pozwala na
67zapisanie ustawień związanych z kolorami w czasie kalibracji monitora,
68a następnie odtwarzanie ich przy aplikowaniu kalibracji.
69
70%package devel
71Summary: ddcutil header files
72Summary(pl.UTF-8): Pliki nagłówkowe ddcutil
73Group: X11/Development/Libraries
74Requires: %{name} = %{version}-%{release}
75Requires: glib2-devel >= 1:2.32
76Requires: xorg-lib-libX11-devel
77Requires: xorg-lib-libXrandr-devel
78
79%description devel
80ddcutil header files.
81
82%description devel -l pl.UTF-8
83Pliki nagłówkowe ddcutil.
84
85%package -n python-cyddc
86Summary: Python 2 interface for ddcutil library
87Summary(pl.UTF-8): Interfejs Pythona 2 do biblioteki ddcutil
88Group: Libraries/Python
89Requires: %{name} = %{version}-%{release}
90
91%description -n python-cyddc
92Python 2 (Cython based) interface for ddcutil library.
93
94%description -n python-cyddc -l pl.UTF-8
95Interfejs Pythona 2 do biblioteki ddcutil, oparty na Cythonie.
96
97%package -n python3-cyddc
98Summary: Python 3 interface for ddcutil library
99Summary(pl.UTF-8): Interfejs Pythona 3 do biblioteki ddcutil
100Group: Libraries/Python
101Requires: %{name} = %{version}-%{release}
102
103%description -n python3-cyddc
104Python 3 (Cython based) interface for ddcutil library.
105
106%description -n python3-cyddc -l pl.UTF-8
107Interfejs Pythona 3 do biblioteki ddcutil, oparty na Cythonie.
108
109%prep
110%setup -q
111%patch0 -p1
112
113%build
114%{__libtoolize}
115%{__aclocal} -I m4
116%{__autoconf}
117%{__autoheader}
118%{__automake}
119# no --enable-gobject-api: "GObject implementation has been mothballed. TODO: delete or comment out this section"
120%configure \
121 --disable-silent-rules \
122 %{?with_cython:--enable-cython} \
123 --enable-drm \
124 --enable-lib \
125 --enable-usb \
126 --enable-x11
127%{__make}
128
129%install
130rm -rf $RPM_BUILD_ROOT
131
132%{__make} install \
133 DESTDIR=$RPM_BUILD_ROOT \
134 resfiles=
135
136# distribute "resfiles" over destinations
137install -d $RPM_BUILD_ROOT%{_datadir}/cmake/Modules \
138 $RPM_BUILD_ROOT/etc/{X11/xorg.conf.d,udev/rules.d}
139cp -p data/usr/share/cmake/Modules/FindDDCUtil.cmake $RPM_BUILD_ROOT%{_datadir}/cmake/Modules
140# need customization if ever used
141#cp -p data/etc/udev/rules.d/*.rules $RPM_BUILD_ROOT/etc/udev/rules.d
142# xorg-driver-* package?
143#cp -p data/etc/X11/xorg.conf.d/*.conf $RPM_BUILD_ROOT/etc/X11/xorg.conf.d
144
145%if %{with cython}
146%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/*.la
147%{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/*.la
148%endif
149
150%clean
151rm -rf $RPM_BUILD_ROOT
152
153%post -p /sbin/ldconfig
154%postun -p /sbin/ldconfig
155
156%files
157%defattr(644,root,root,755)
158%doc AUTHORS NEWS.md README.md data/etc/udev/rules.d/*.rules data/etc/X11/xorg.conf.d/*.conf
159%attr(755,root,root) %{_bindir}/ddcutil
160%attr(755,root,root) %{_libdir}/libddcutil.so.*.*.*
161%attr(755,root,root) %ghost %{_libdir}/libddcutil.so.1
162%{_mandir}/man1/ddcutil.1*
163
164%files devel
165%defattr(644,root,root,755)
166%attr(755,root,root) %{_libdir}/libddcutil.so
167%{_includedir}/ddcutil*.h
168%{_pkgconfigdir}/ddcutil.pc
169%{_datadir}/cmake/Modules/FindDDCUtil.cmake
170
171%if %{with cython}
172%files -n python-cyddc
173%defattr(644,root,root,755)
174%attr(755,root,root) %{py_sitedir}/cyddc2.so
175
176%files -n python3-cyddc
177%defattr(644,root,root,755)
178%attr(755,root,root) %{py3_sitedir}/cyddc3.so
179%endif
This page took 0.035206 seconds and 4 git commands to generate.