libunicap/libunicap.spec

246 lines
8.9 KiB
RPMSpec
Raw Normal View History

%define _use_internal_dependency_generator 0
%{expand:%%define prev__find_provides %{__find_provides}}
%define __find_provides sh %{SOURCE1} %{prev__find_provides}
%{expand:%%define prev__find_requires %{__find_requires}}
%define __find_requires sh %{SOURCE1} %{prev__find_requires}
Summary: Library to access different kinds of (video) capture devices
Name: libunicap
Version: 0.9.12
Release: 21%{?dist}
License: GPLv2+
Group: System Environment/Libraries
URL: http://www.unicap-imaging.org/
Source0: http://www.unicap-imaging.org/downloads/%{name}-%{version}.tar.gz
Source1: %{name}-filter.sh
Patch0: libunicap-0.9.12-includes.patch
Patch1: libunicap-0.9.12-memerrs.patch
Patch2: libunicap-0.9.12-arraycmp.patch
Patch3: libunicap-0.9.12-warnings.patch
Patch4: libunicap-bz641623.patch
Patch5: libunicap-bz642118.patch
Patch6: libunicap-0.9.12-videodev.patch
Patch7: libunicap-0.9.12-datadirname.patch
BuildRequires: intltool, /usr/bin/perl, perl(XML::Parser), gettext, gtk-doc >= 1.4
BuildRequires: glib2-devel >= 2.10.0
%ifnarch s390 s390x
BuildRequires: libraw1394-devel >= 1.1.0
%endif
%if 0%{?rhel}%{?fedora} >= 6
BuildRequires: libv4l-devel >= 0.8.3-1, libtool, automake, autoconf
%endif
%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7
BuildRequires: systemd
%endif
Obsoletes: unicap <= 0.9.7-1
%description
Unicap provides a uniform interface to video capture devices. It allows
applications to use any supported video capture device via a single API.
The unicap library offers a high level of hardware abstraction while
maintaining maximum performance. Zero copy capture of video buffers is
possible for devices supporting it allowing fast video capture with low
CPU usage even on low-speed architectures.
%package devel
Summary: Development files for the unicap library
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}, pkgconfig
Obsoletes: unicap-devel <= 0.9.7-1
%description devel
The libunicap-devel package includes header files and libraries necessary
for for developing programs which use the unicap library. It contains the
API documentation of the library, too.
%prep
%setup -q
%patch0 -p1 -b .includes
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%if 0%{?rhel}%{?fedora} >= 7
%patch6 -p1
%endif
%patch7 -p1
# Needed to get rid of rpath
%if 0%{?rhel}%{?fedora} >= 6
libtoolize --force
# fixes for gtk-doc 1.26
sed -i -e '/^DOC_SOURCE_DIR/s/--source-dir=//g' doc/libunicap/Makefile.am
gtkdocize --copy
autoreconf --force --install
%endif
%build
%if 0%{?rhel}%{?fedora} >= 6
%configure --disable-rpath --enable-gtk-doc --enable-libv4l
%else
%configure --disable-rpath --enable-gtk-doc
%endif
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install
# Don't install any static .a and libtool .la files
rm -f $RPM_BUILD_ROOT%{_libdir}/{,unicap2/cpi/}*.{a,la}
# Use ATTRS rather SYSFS for udev where appropriate
%if 0%{?rhel}%{?fedora} >= 6
sed -e 's/\(SYSFS\|ATTRS\)/ATTRS/g' -i $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/50-euvccam.rules
%else
sed -e 's/\(SYSFS\|ATTRS\)/SYSFS/g' -i $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/50-euvccam.rules
%endif
touch -c -r {data,$RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d}/50-euvccam.rules
# Move udev rules file to appropriate rules directory
%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7
mkdir -p $RPM_BUILD_ROOT%{_udevrulesdir}/
mv -f $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/50-euvccam.rules $RPM_BUILD_ROOT%{_udevrulesdir}/
%endif
%find_lang unicap
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files -f unicap.lang
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING README
%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7
%{_udevrulesdir}/50-euvccam.rules
%else
%config %{_sysconfdir}/udev/rules.d/50-euvccam.rules
%endif
%{_libdir}/%{name}.so.*
%{_libdir}/unicap2
%files devel
%defattr(-,root,root,-)
%{_libdir}/%{name}.so
%{_libdir}/pkgconfig/%{name}.pc
%{_includedir}/unicap
%{_datadir}/gtk-doc/html/%{name}
%changelog
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.12-21
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.12-20
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.12-19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.12-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.12-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.12-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sun May 31 2015 Robert Scheck <robert@fedoraproject.org> 0.9.12-15
- Added patch to avoid a /usr/@DATADIRNAME@/locale/ directory
- Use %%{_udevrulesdir} macro rather /etc/udev/rules.d/ (#1226681)
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.12-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.12-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.12-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.12-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.12-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.12-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Sun Oct 09 2011 Robert Scheck <robert@fedoraproject.org> 0.9.12-8
- Added a patch to use the libv4l1compat header (#676470, #716118)
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.12-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Tue Nov 02 2010 Kamil Dudka <kdudka@redhat.com> 0.9.12-6
- fix a crasher bug introduced by libunicap-0.9.12-memerrs.patch (#647880)
* Fri Oct 29 2010 Robert Scheck <robert@fedoraproject.org> 0.9.12-5
- Use ATTRS rather SYSFS for udev where appropriate (#643729)
* Tue Oct 12 2010 Kamil Dudka <kdudka@redhat.com> 0.9.12-4
- do not use "private" as identifier in a public header (#642118)
* Sat Oct 09 2010 Kamil Dudka <kdudka@redhat.com> 0.9.12-3
- avoid SIGSEGV in v4l2_capture_start() (#641623)
* Thu Oct 07 2010 Kamil Dudka <kdudka@redhat.com> 0.9.12-2
- build the package in %%build
- fix tons of compile-time warnings
- fix some memory errors in the code
* Mon Oct 04 2010 Robert Scheck <robert@fedoraproject.org> 0.9.12-1
- Upgrade to 0.9.12 (#635377)
* Sun Feb 21 2010 Robert Scheck <robert@fedoraproject.org> 0.9.8-1
- Upgrade to 0.9.8 (#530702, #567109, #567110, #567111)
- Splitting of unicap into libunicap, libucil and libunicapgtk
* Sat Oct 24 2009 Robert Scheck <robert@fedoraproject.org> 0.9.7-1
- Upgrade to 0.9.7 (#530702)
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Thu Jun 18 2009 Dan Horak <dan[at]danny.cz> 0.9.5-2
- don't require libraw1394 on s390/s390x
* Sun May 03 2009 Robert Scheck <robert@fedoraproject.org> 0.9.5-1
- Upgrade to 0.9.5
* Mon Feb 23 2009 Robert Scheck <robert@fedoraproject.org> 0.9.3-2
- Rebuild against gcc 4.4 and rpm 4.6
* Mon Oct 13 2008 Robert Scheck <robert@fedoraproject.org> 0.9.3-1
- Upgrade to 0.9.3 (#466825, thanks to Hans de Goede)
- Enabled libv4l support for the new gspca kernel driver
* Sat Aug 09 2008 Robert Scheck <robert@fedoraproject.org> 0.2.23-4
- Rebuild to get missing dependencies back (#443015, #458527)
* Tue Aug 05 2008 Robert Scheck <robert@fedoraproject.org> 0.2.23-3
- Filter the unicap plugins which overlap with libv4l libraries
* Wed Jul 22 2008 Robert Scheck <robert@fedoraproject.org> 0.2.23-2
- Rebuild for libraw1394 2.0.0
* Mon May 19 2008 Robert Scheck <robert@fedoraproject.org> 0.2.23-1
- Upgrade to 0.2.23
- Corrected packaging of cpi/*.so files (thanks to Arne Caspari)
* Sat May 17 2008 Robert Scheck <robert@fedoraproject.org> 0.2.22-1
- Upgrade to 0.2.22 (#446021)
* Sat Feb 16 2008 Robert Scheck <robert@fedoraproject.org> 0.2.19-3
- Added patch to correct libdir paths (thanks to Ralf Corsepius)
* Mon Feb 04 2008 Robert Scheck <robert@fedoraproject.org> 0.2.19-2
- Changes to match with Fedora Packaging Guidelines (#431381)
* Mon Feb 04 2008 Robert Scheck <robert@fedoraproject.org> 0.2.19-1
- Upgrade to 0.2.19
- Initial spec file for Fedora and Red Hat Enterprise Linux