Summary: Simple wireless roaming daemon Name: wlandetect Version: 0.3 Release: %mkrel 3 Url: http://jelmer.vernstok.nl/oss/wlandetect/ License: GPL Group: System/Configuration/Networking Source: %{name}-%{version}.tar.bz2 Patch1: wlandetect-init.d.patch.bz2 Patch2: wlandetect-pid.patch.bz2 BuildArch: noarch Buildroot: %_tmppath/%name-%version-buildroot Requires: wireless-tools %description Wlandetect is a very simple Perl script that checks which access points and other peers can be reached and executes some commands based on what it has found. It is very useful if you often switch between various wireless environments. %prep %setup -q %patch1 -p0 -b .init %patch2 -p0 -b .pid %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/%_mandir/man8 cp wlandetect.8 $RPM_BUILD_ROOT/%_mandir/man8 mkdir -p $RPM_BUILD_ROOT/%_sbindir cp wlandetect $RPM_BUILD_ROOT/%_sbindir mkdir -p $RPM_BUILD_ROOT/%_sysconfdir/rc.d/init.d perl -p -e 's,/usr/local/sbin,%{_sbindir},g' %{name}-init.d > $RPM_BUILD_ROOT/%_sysconfdir/rc.d/init.d/%{name} echo "# FORMAT: ESSID<tab><tab>commands" > $RPM_BUILD_ROOT/%_sysconfdir/wlandetect.conf echo "# use @DEV@ for device name" >> $RPM_BUILD_ROOT/%_sysconfdir/wlandetect.conf echo "default /sbin/iwconfig @DEV@ essid any key ""; /sbin/ifup @DEV@; dhclient @DEV@" >> $RPM_BUILD_ROOT/%_sysconfdir/wlandetect.conf echo "linksys /sbin/iwconfig @DEV@ essid any key ""; /sbin/ifup @DEV@; dhclient @DEV@" >> $RPM_BUILD_ROOT/%_sysconfdir/wlandetect.conf %clean rm -rf $RPM_BUILD_ROOT %post %_post_service %{name} %preun %_preun_service %{name} %files %defattr(-,root,root) %doc AUTHORS COPYING README wlandetect.conf.example %_sbindir/%name %attr(0755,root,root) %{_initrddir}/%{name} %config(noreplace) %_sysconfdir/wlandetect.conf %_mandir/man8/* %changelog * Mon Aug 22 2005 Leonardo Chiquitto Filho <chiquitto@mandriva.com> 0.3-3mdk - add chkconfig required fields to init.d/wlandetect (patch1), fixes #17247 - patch the script to create a var/run/wlandetect.pid, and use it when starting/stoping the service - change init.d/wlandetect modes to 0755 * Tue May 17 2005 Olivier Blin <oblin@mandriva.com> 0.3-2mdk - fix service: fix path, and enable it (#16021) * Tue Aug 10 2004 Austin Acton <austin@mandrake.org> 0.3-1mdk - initial package