#
# Conditional build:
%bcond_without selinux # without SELinux support
+%bcond_with apidocs # with API docs
Summary: Device manager for the Linux kernel
Summary(pl.UTF-8): Zarządca urządzeń dla jądra Linuksa
Name: udev
Version: 2.1.1
-Release: 0.1
+Release: 0.2
Epoch: 2
License: GPL v2+ (udev), LGPL v2.1+ (the rest)
Group: Base
BuildRequires: glibc-misc
BuildRequires: gobject-introspection-devel >= 1.31.1
BuildRequires: gperf
-BuildRequires: gtk-doc >= 1.18
+%{?with_apidocs:BuildRequires: gtk-doc >= 1.18}
BuildRequires: kmod-devel >= 14
BuildRequires: libblkid-devel >= 2.20
%{?with_selinux:BuildRequires: libselinux-devel >= 2.1.9}
%patch1 -p1
%build
+%if %{with apidocs}
%{__gtkdocize}
+%endif
%{__libtoolize}
%{__aclocal} -I m4
%{__autoconf}
--libexecdir=/lib \
--bindir=%{_sbindir} \
%{?debug:--enable-debug} \
+ %{__enable_disable gtk-doc} \
%{__enable_disable selinux} \
--disable-silent-rules \
--enable-introspection \
--enable-blkid \
--enable-gudev \
- --enable-gtk-doc \
--enable-keymap \
--enable-libkmod \
--enable-manpages \
%{_pkgconfigdir}/libudev.pc
%{_npkgconfigdir}/udev.pc
+%if %{with apidocs}
%files apidocs
%defattr(644,root,root,755)
%{_gtkdocdir}/libudev
+%endif
%files glib
%defattr(644,root,root,755)
%{_pkgconfigdir}/gudev-1.0.pc
%{_datadir}/gir-1.0/GUdev-1.0.gir
+%if %{with apidocs}
%files glib-apidocs
%defattr(644,root,root,755)
%{_gtkdocdir}/gudev
+%endif