File urfkill.spec of Package urfkill
#
# spec file for package urfkill
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: urfkill
Version: 0.3.0
Release: 1
Url: http://github.com/lcp/urfkill
License: GPL v2 or later
Group: System/Daemons
Summary: A daemon to control radio killswitches
Source: %{name}-%{version}.tar.xz
Patch0: urfkill-change-default-user.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: gettext
BuildRequires: gtk-doc
BuildRequires: intltool
BuildRequires: glib2-devel
BuildRequires: libgudev-1_0-devel
BuildRequires: dbus-1-glib-devel
BuildRequires: polkit-devel
BuildRequires: libexpat-devel
BuildRequires: gobject-introspection-devel
BuildRequires: xz
Requires: polkit
%description
Urfkill is a daemon to control radio killswitches through /dev/rfkill
and supports PolicyKit authorization mechanism.
Authors:
--------
glin@novell.com
%package -n liburfkill-glib0
License: GPL v2 or later
Summary: The glib binding library for urfkill
Group: System/Daemons
%description -n liburfkill-glib0
Urfkill add-on library to integrate the standard urfkill library with
the GLib thread abstraction and main loop.
Authors:
--------
glin@novell.com
%package -n liburfkill-glib-devel
License: GPL v2 or later
Summary: The glib binding library for urfkill
Group: Development/Libraries/Other
Requires: liburfkill-glib0 = %{version}-%{release}
Requires: glib2-devel
Requires: dbus-1-glib-devel
Provides: %{name}-devel = %{version}
%description -n liburfkill-glib-devel
Urfkill add-on library to integrate the standard urfkill library with
the GLib thread abstraction and main loop.
http://freedesktop.org/wiki/Software/urfkill
Authors:
--------
glin@novell.com
%prep
%setup -n %{name}-%{version} -q
%patch0 -p1
%build
%configure\
--disable-static \
--libexecdir=%{_libexecdir}/urfkill \
%if 0%{?_crossbuild}
--disable-introspection \
%endif
--enable-gtk-doc
make %{?jobs:-j%jobs}
%install
%makeinstall
rm -f %{buildroot}%{_libdir}/*.la
%clean
rm -rf %{buildroot}
%pre
/usr/sbin/groupadd -r urfkill 2> /dev/null || :
/usr/sbin/useradd -r -o -g urfkill -s /bin/false \
-c "killswitch control daemon" -d /var/lib/urfkill urfkill 2> /dev/null || :
/usr/sbin/usermod -g urfkill -G urfkill -s /bin/false urfkill 2> /dev/null
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%post -n liburfkill-glib0 -p /sbin/ldconfig
%postun -n liburfkill-glib0 -p /sbin/ldconfig
%files
%defattr(-,root,root)
%doc AUTHORS COPYING NEWS README
%dir %{_libexecdir}/urfkill
%{_libexecdir}/urfkill/urfkilld
%{_datadir}/dbus-1/system-services/*.service
%{_datadir}/polkit-1/actions/org.freedesktop.*.policy
%doc %{_mandir}/man?/*.*
%config %{_sysconfdir}/dbus-1/system.d/*.conf
%config %{_sysconfdir}/urfkill
%files -n liburfkill-glib0
%defattr(-,root,root)
%{_libdir}/liburfkill-glib.so.*
%if !0%{?_crossbuild}
%{_libdir}/girepository-1.0/Urfkill-*.typelib
%endif
%files -n liburfkill-glib-devel
%defattr(-,root,root)
%{_datadir}/dbus-1/interfaces/*.xml
%if !0%{?_crossbuild}
%{_datadir}/gir-1.0/Urfkill-*.gir
%endif
%doc %{_datadir}/gtk-doc/html/urfkill
%{_includedir}/liburfkill-glib
%{_libdir}/liburfkill-glib.so
%{_libdir}/pkgconfig/urfkill-glib.pc
%changelog