%define name wlandetect %define version 0.3 %define release 1mdk Summary: Simple wireless roaming daemon Name: %name Version: %version Release: %release Url: http://jelmer.vernstok.nl/oss/wlandetect/ License: GPL Group: System/Configuration/Networking Source: %{name}-%{version}.tar.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 %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 cp wlandetect-init.d $RPM_BUILD_ROOT/%_sysconfdir/rc.d/init.d/wlandetect 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 %files %defattr(-,root,root) %doc AUTHORS COPYING README wlandetect.conf.example %_sbindir/%name %_sysconfdir/rc.d/init.d/%name %config(noreplace) %_sysconfdir/wlandetect.conf %_mandir/man8/* %changelog * Tue Aug 10 2004 Austin Acton <austin@mandrake.org> 0.3-1mdk - initial package