File rfkill.spec of Package rfkill
#
# spec file for package rfkill
#
# Copyright (c) 2015 SUSE LINUX 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/
#
Name: rfkill
Version: 0.5
Release: 0
Summary: Tool for enabling and disabling wireless devices
License: ISC
Group: Productivity/Networking/Other
Url: http://wireless.kernel.org/en/users/Documentation/rfkill
Source0: https://www.kernel.org/pub/software/network/%{name}/%{name}-%{version}.tar.bz2
Source1: rfkill-block@.service
Source2: rfkill-unblock@.service
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
rfkill is a small tool for accessing the Linux rfkill device interface,
which is used to enable and disable wireless networking devices, typically
WLAN, Bluetooth and mobile broadband.
%prep
%setup -q
%build
make %{?_smp_mflags}
%install
install -Dm755 rfkill %{buildroot}%{_sbindir}/rfkill
install -Dm644 rfkill.8 %{buildroot}%{_mandir}/man8/rfkill.8
install -Dm644 %{S:1} %{buildroot}%{_unitdir}/rfkill-block@.service
install -Dm644 %{S:2} %{buildroot}%{_unitdir}/rfkill-unblock@.service
%pre
%service_add_pre rfkill-block@.service rfkill-unblock@.service
%post
%service_add_post rfkill-block@.service rfkill-unblock@.service
%preun
%service_del_preun rfkill-block@.service rfkill-unblock@.service
%postun
%service_del_postun rfkill-block@.service rfkill-unblock@.service
%files
%defattr(-,root,root)
%doc COPYING README
%{_sbindir}/rfkill
%{_mandir}/man8/rfkill.8*
%{_unitdir}/*
%changelog