]> git.pld-linux.org Git - packages/ddcutil.git/blame - ddcutil.spec
- no release tarballs since 0.9.6, so let's use at least properly named ones
[packages/ddcutil.git] / ddcutil.spec
CommitLineData
d7783ebb
JB
1#
2# Conditional build:
3%bcond_without cython # Python extension based on Cython
4
ee308c4a 5Summary: Query and change Linux monitor settings using DDC/CI and USB
d7783ebb 6Summary(pl.UTF-8): Odczyt i zmiana ustawień monitora spod Linuksa przy użyciu DDC/CI i USB
ee308c4a 7Name: ddcutil
8f571a3f 8Version: 0.9.7
69a0585e 9Release: 1
ee308c4a
JP
10License: GPL v2+
11Group: X11/Applications
d7783ebb 12#Source0Download: https://github.com/rockowitz/ddcutil/releases
4ea8e712 13#TODO: use named tarballs: https://github.com/rockowitz/ddcutil/archive/v%{version}/%{name}-%{version}.tar.gz
ee308c4a 14Source0: https://github.com/rockowitz/ddcutil/archive/v%{version}.tar.gz
8f571a3f 15# Source0-md5: 427c956956ac8c9afdc8e18c76a8e3b0
d7783ebb 16Patch0: %{name}-python.patch
ee308c4a
JP
17URL: http://www.ddcutil.com/
18BuildRequires: autoconf >= 2.69
19BuildRequires: automake >= 1:1.11
d7783ebb 20BuildRequires: glib2-devel >= 1:2.32
ee308c4a 21BuildRequires: libdrm-devel >= 2.4.67
d7783ebb 22BuildRequires: libtool >= 2:2
ee308c4a
JP
23BuildRequires: libusb-devel >= 1.0.15
24BuildRequires: pkgconfig
d7783ebb
JB
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
ee308c4a 32BuildRequires: xorg-lib-libXrandr-devel
d7783ebb 33BuildRequires: zlib-devel
ee308c4a
JP
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
d7783ebb 45is also support for monitors (such as Apple Cinema and Eizo
ee308c4a
JP
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
d7783ebb
JB
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
ee308c4a
JP
70%package devel
71Summary: ddcutil header files
d7783ebb 72Summary(pl.UTF-8): Pliki nagłówkowe ddcutil
ee308c4a
JP
73Group: X11/Development/Libraries
74Requires: %{name} = %{version}-%{release}
d7783ebb
JB
75Requires: glib2-devel >= 1:2.32
76Requires: xorg-lib-libX11-devel
77Requires: xorg-lib-libXrandr-devel
ee308c4a
JP
78
79%description devel
80ddcutil header files.
81
d7783ebb
JB
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
ee308c4a
JP
109%prep
110%setup -q
d7783ebb 111%patch0 -p1
ee308c4a
JP
112
113%build
114%{__libtoolize}
d7783ebb 115%{__aclocal} -I m4
ee308c4a
JP
116%{__autoconf}
117%{__autoheader}
118%{__automake}
d7783ebb 119# no --enable-gobject-api: "GObject implementation has been mothballed. TODO: delete or comment out this section"
ee308c4a
JP
120%configure \
121 --disable-silent-rules \
d7783ebb 122 %{?with_cython:--enable-cython} \
ee308c4a
JP
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 \
d7783ebb
JB
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
ee308c4a
JP
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)
d7783ebb 158%doc AUTHORS NEWS.md README.md data/etc/udev/rules.d/*.rules data/etc/X11/xorg.conf.d/*.conf
ee308c4a
JP
159%attr(755,root,root) %{_bindir}/ddcutil
160%attr(755,root,root) %{_libdir}/libddcutil.so.*.*.*
25f38447 161%attr(755,root,root) %ghost %{_libdir}/libddcutil.so.1
ee308c4a 162%{_mandir}/man1/ddcutil.1*
ee308c4a
JP
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
d7783ebb
JB
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.182605 seconds and 4 git commands to generate.