From 761e09ee82ff769a59cf6337226d46fc208d2aad Mon Sep 17 00:00:00 2001 From: Yuanhong Peng Date: Fri, 14 Apr 2023 12:39:41 +0800 Subject: [PATCH] Refactor the specfile Signed-off-by: Yuanhong Peng --- v4l-utils.spec | 173 ++++++++++++++++++++++++------------------------- 1 file changed, 84 insertions(+), 89 deletions(-) diff --git a/v4l-utils.spec b/v4l-utils.spec index b427fb1..d5551e2 100644 --- a/v4l-utils.spec +++ b/v4l-utils.spec @@ -1,74 +1,56 @@ -%define anolis_release 1 +%define anolis_release 2 +%bcond_without bpf + Name: v4l-utils Version: 1.24.1 Release: %{anolis_release}%{?dist} Summary: Utilities for video4linux and DVB devices -# libdvbv5, dvbv5 utils, ir-keytable and v4l2-sysfs-path are GPLv2 only License: GPLv2+ and GPLv2 URL: http://www.linuxtv.org/downloads/v4l-utils/ - Source0: http://linuxtv.org/downloads/v4l-utils/v4l-utils-%{version}.tar.bz2 Patch1: 0001-utils-v4l2-TPG-Update-use-of-typeof.patch -BuildRequires: alsa-lib-devel -BuildRequires: desktop-file-utils -BuildRequires: doxygen -BuildRequires: gettext -BuildRequires: kernel-headers -BuildRequires: libjpeg-devel -BuildRequires: make -BuildRequires: qt5-qtbase-devel -BuildRequires: systemd-devel +BuildRequires: make kernel-headers +BuildRequires: alsa-lib-devel desktop-file-utils qt5-qtbase-devel +BuildRequires: doxygen gettext systemd-devel libjpeg-devel -# BPF decoder dependencies -%define with_bpf 1 - -%if %{with_bpf} +%if %{with bpf} BuildRequires: elfutils-libelf-devel clang %endif -# For /lib/udev/rules.d ownership -Requires: systemd-udev -Requires: libv4l = %{version}-%{release} +Requires: systemd-udev libv4l = %{EVR} %description -v4l-utils is a collection of various video4linux (V4L) and DVB utilities. The -main v4l-utils package contains cx18-ctl, ir-keytable, ivtv-ctl, v4l2-ctl and -v4l2-sysfs-path. - +Linux utilities and libraries to handle media devices (TV devices, capture +devices, radio devices, remote controllers). %package doc Summary: Documentation files for %{name} -Requires: %{name} = %{version}-%{release} +Requires: %{name} = %{EVR} BuildArch: noarch %description doc The %{name}-doc package contains documentation files for %{name}. - %package devel-tools Summary: Utilities for v4l2 / DVB driver development and debugging -# decode_tm6000 is GPLv2 only License: GPLv2+ and GPLv2 -Requires: libv4l = %{version}-%{release} +Requires: libv4l = %{EVR} %description devel-tools Utilities for v4l2 / DVB driver authors: decode_tm6000, v4l2-compliance and v4l2-dbg. - %package -n qv4l2 Summary: QT v4l2 test control and streaming test application License: GPLv2+ -Requires: libv4l = %{version}-%{release} +Requires: libv4l = %{EVR} %description -n qv4l2 QT v4l2 test control and streaming test application. - %package -n libv4l -Summary: Collection of video4linux support libraries -# Some of the decompression helpers are GPLv2, the rest is LGPLv2+ +Summary: Collection of video4linux support libraries License: LGPLv2+ and GPLv2 URL: http://hansdegoede.livejournal.com/3636.html @@ -79,104 +61,105 @@ easy for application writers to support a wide variety of devices without having to write separate code for different devices in the same class. libv4l consists of 3 different libraries: libv4lconvert, libv4l1 and libv4l2. -libv4lconvert offers functions to convert from any (known) pixel-format -to V4l2_PIX_FMT_BGR24 or V4l2_PIX_FMT_YUV420. - -libv4l1 offers the (deprecated) v4l1 API on top of v4l2 devices, independent -of the drivers for those devices supporting v4l1 compatibility (which many -v4l2 drivers do not). - -libv4l2 offers the v4l2 API on top of v4l2 devices, while adding for the -application transparent libv4lconvert conversion where necessary. - - %package -n libdvbv5 Summary: Libraries to control, scan and zap on Digital TV channels License: GPLv2 %description -n libdvbv5 -Libraries to control, scan and zap on Digital TV channels - +This library is meant to be used by digital TV applications that need to talk +with media hardware. %package -n libv4l-devel Summary: Development files for libv4l License: LGPLv2+ URL: http://hansdegoede.livejournal.com/3636.html -Requires: libv4l = %{version}-%{release} +Requires: libv4l = %{EVR} %description -n libv4l-devel -The libv4l-devel package contains libraries and header files for -developing applications that use libv4l. - +This package provides libraries and header files for developing applications +that use libv4l. %package -n libdvbv5-devel Summary: Development files for libdvbv5 License: GPLv2 -Requires: libdvbv5 = %{version}-%{release} +Requires: libdvbv5 = %{EVR} %description -n libdvbv5-devel -The libdvbv5-devel package contains libraries and header -files for developing applications that use libdvbv5. - +This package provides libraries and header files for developing applications +that use libdvbv5. %prep %autosetup -p1 %build export CXXFLAGS="-std=c++14 $RPM_OPT_FLAGS" -%configure --disable-static --enable-libdvbv5 --enable-doxygen-man -# Don't use rpath! +%configure --disable-static \ + --enable-libdvbv5 \ + --enable-doxygen-man \ + --with-udevdir="/usr/lib/udev/" sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool %make_build make doxygen-run - %install %make_install -find $RPM_BUILD_ROOT -name '*.la' -delete -rm -f $RPM_BUILD_ROOT%{_libdir}/{v4l1compat.so,v4l2convert.so} -mkdir -p $RPM_BUILD_ROOT%{_mandir}/man3/ -cp -arv %{_builddir}/%{name}-%{version}/doxygen-doc/man/man3 $RPM_BUILD_ROOT%{_mandir}/ -rm $RPM_BUILD_ROOT%{_mandir}/man3/_*3 -cp %{_builddir}/%{name}-%{version}/lib/libdvbv5/README %{_builddir}/%{name}-%{version}/README.libdvbv5 -desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/qv4l2.desktop -%find_lang %{name} -%find_lang libdvbv5 +find %{buildroot} -name '*.la' -delete +rm -f %{buildroot}%{_libdir}/{v4l1compat.so,v4l2convert.so} -%ldconfig_scriptlets -n libv4l +mkdir -p %{buildroot}%{_mandir}/man3/ +cp -arv %{_builddir}/%{name}-%{version}/doxygen-doc/man/man3 %{buildroot}%{_mandir}/ +rm %{buildroot}%{_mandir}/man3/_*3 +install -p %{_builddir}/%{name}-%{version}/lib/libdvbv5/README %{_builddir}/%{name}-%{version}/README.libdvbv5 -%ldconfig_scriptlets -n libdvbv5 +desktop-file-validate %{buildroot}%{_datadir}/applications/qv4l2.desktop +%find_lang %{name} +%find_lang libdvbv5 %generate_compatibility_deps %files -f %{name}.lang %dir %{_sysconfdir}/rc_keymaps %config(noreplace) %{_sysconfdir}/rc_maps.cfg -%dir %{abidir} %{_udevrulesdir}/70-infrared.rules %{_udevrulesdir}/../rc_keymaps/* + %{_bindir}/cx18-ctl -%{abidir}/cx18-ctl-option.list -%{_bindir}/cec* -%{abidir}/cec*-option.list -%{_bindir}/dvb* -%{abidir}/dvb*-option.list +%{_bindir}/cec-compliance +%{_bindir}/cec-ctl +%{_bindir}/cec-follower +%{_bindir}/dvb-fe-tool +%{_bindir}/dvb-format-convert +%{_bindir}/dvbv5-daemon +%{_bindir}/dvbv5-scan +%{_bindir}/dvbv5-zap %{_bindir}/ir-ctl -%{abidir}/ir-ctl-option.list %{_bindir}/ir-keytable -%{abidir}/ir-keytable-option.list %{_bindir}/ivtv-ctl -%{abidir}/ivtv-ctl-option.list %{_bindir}/media-ctl -%{abidir}/media-ctl-option.list %{_bindir}/rds-ctl -%{abidir}/rds-ctl-option.list %{_bindir}/v4l2-ctl -%{abidir}/v4l2-ctl-option.list %{_bindir}/v4l2-sysfs-path + +%dir %{abidir} +%{abidir}/cx18-ctl-option.list +%{abidir}/cec-compliance-option.list +%{abidir}/cec-ctl-option.list +%{abidir}/cec-follower-option.list +%{abidir}/dvb-fe-tool-option.list +%{abidir}/dvb-format-convert-option.list +%{abidir}/dvbv5-daemon-option.list +%{abidir}/dvbv5-scan-option.list +%{abidir}/dvbv5-zap-option.list +%{abidir}/ir-ctl-option.list +%{abidir}/ir-keytable-option.list +%{abidir}/ivtv-ctl-option.list +%{abidir}/media-ctl-option.list +%{abidir}/rds-ctl-option.list +%{abidir}/v4l2-ctl-option.list %{abidir}/v4l2-sysfs-path-option.list + %{_mandir}/man1/*.1* %{_mandir}/man5/*.5* %exclude %{_mandir}/man1/qv4l2.1* @@ -184,14 +167,16 @@ desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/qv4l2.desktop %files devel-tools %{_bindir}/decode_tm6000 -%{abidir}/decode_tm6000-option.list %{_bindir}/v4l2-compliance -%{_mandir}/man1/v4l2-compliance.1* %{_sbindir}/v4l2-dbg + +%{abidir}/decode_tm6000-option.list %{abidir}/v4l2-dbg-option.list +%{_mandir}/man1/v4l2-compliance.1* %files doc -%doc TODO ChangeLog README.md README.libv4l README.lib-multi-threading README.libdvbv5 +%doc README.* +%doc ChangeLog TODO %files -n qv4l2 %{_bindir}/qv4l2 @@ -204,12 +189,19 @@ desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/qv4l2.desktop %{_mandir}/man1/qvidcap.1* %files -n libv4l -%license COPYING.libv4l COPYING %{_libdir}/libv4l -%{_libdir}/libv4l*.so.* +%{_libdir}/libv4l1.so.0 +%{_libdir}/libv4l1.so.0.0.0 +%{_libdir}/libv4l2.so.0 +%{_libdir}/libv4l2.so.0.0.0 +%{_libdir}/libv4l2rds.so.0 +%{_libdir}/libv4l2rds.so.0.0.0 +%{_libdir}/libv4lconvert.so.0 +%{_libdir}/libv4lconvert.so.0.0.0 %{abidir}/libv4l*.dump %{abidir}/v4l1compat.dump %{abidir}/v4l2convert.dump +%license COPYING.libv4l COPYING %files -n libv4l-devel %{_includedir}/libv4l*.h @@ -217,18 +209,21 @@ desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/qv4l2.desktop %{_libdir}/pkgconfig/libv4l*.pc %files -n libdvbv5 -f libdvbv5.lang -%license COPYING -%{_libdir}/libdvbv5*.so.* +%{_libdir}/libdvbv5.so.0 +%{_libdir}/libdvbv5.so.0.0.0 %{abidir}/libdvbv5*.dump +%license COPYING %files -n libdvbv5-devel +%{_libdir}/libdvbv5.so +%{_libdir}/pkgconfig/libdvbv5.pc %{_includedir}/libdvbv5/*.h -%{_libdir}/libdvbv5*.so -%{_libdir}/pkgconfig/libdvbv5*.pc %{_mandir}/man3/*.3* - %changelog +* Fri Apr 14 2023 Yuanhong Peng - 1.24.1-2 +- Refactor the specfile + * Sat Mar 04 2023 Shawn Wang - 1.24.1-1 - update to 1.24.1 -- Gitee