Blob Blame History Raw
Name:		wifi-radar
Summary:	A utility for managing WiFi profiles
Version:	2.0.s10
Release:	2%{?dist}
License:	GPLv2
Group:		Applications/Internet
URL:		http://wifi-radar.tuxfamily.org/
Source0:	http://wifi-radar.tuxfamily.org/pub/%{name}-%{version}.tar.bz2
Source2:	wifi-radar-pam.d
Patch0:		fedora-compliant.patch
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:	noarch
Requires:	pygtk2 net-tools wireless-tools dhclient usermode
BuildRequires:	desktop-file-utils


%description
WiFi Radar is a straightforward utility, which scans for available wireless
networks, and manages their associated profiles.

%prep
%setup -q

# wifi-radar use by default dhcpcd instead of dhcpclient and look for
# the wpa_supplicant at the wrong location, so we need to fix that
%patch0 -p1 -b .fedora

#fix the upstream desktop file (this Ubuntu's fanboys tsss)
sed -i 's/gksudo -S wifi-radar/wifi-radar/' %{name}.desktop
sed -i 's/wifi-radar.svg/wifi-radar/' %{name}.desktop
sed -i '/FilePattern=wifi-radar/d' %{name}.desktop

%build
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT

make install DESTDIR=$RPM_BUILD_ROOT%{_prefix}

# An empty config file
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}
touch $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}.conf

# The actual executable
mkdir -p $RPM_BUILD_ROOT/%{_bindir}
ln -s consolehelper $RPM_BUILD_ROOT/%{_bindir}/%{name}

# consolehelper file
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/security/console.apps
cat > $RPM_BUILD_ROOT/%{_sysconfdir}/security/console.apps/%{name} <<EOF
USER=root
PROGRAM=%{_sbindir}/%{name}
SESSION=true
EOF

# PAM file
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/pam.d
cp -p %{SOURCE2} $RPM_BUILD_ROOT/%{_sysconfdir}/pam.d/%{name}

desktop-file-install --delete-original --dir $RPM_BUILD_ROOT/%{_datadir}/applications	\
	 $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop

%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc LICENSE.GPL docs/*
%config(noreplace) %{_sysconfdir}/pam.d/%{name}
%config(noreplace) %{_sysconfdir}/security/console.apps/%{name}
%config(noreplace) %{_sysconfdir}/%{name}.conf
%{_bindir}/%{name}
%{_sbindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_mandir}/man?/%{name}.*
%{_datadir}/pixmaps/%{name}.*



%changelog
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.s10-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Wed Jun 17 2015 Robert Mayr <robyduck@fedoraoproject.org> - 2.0.s10-1
- bump to newest release and fix some bugs
- new upstream

* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.s08-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.s08-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.s08-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.s08-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.s08-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.s08-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Mon Nov 01 2010 Pablo Martin-Gomez <bouska@fedoraproject.org> -2.0.s08-1
- Update to 2.0.s08

* Wed Oct 28 2009 Pablo Martin-Gomez <pablo.martin-gomez@laposte.net> - 2.0.s06-1
- Update to 2.0.s06
- Patch the source in order to be used on Fedora
- The software can't be deamonize, so initscript is useless
- Clean and recycle the spec file

* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.9.9-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.9.9-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Sat Sep  6 2008 Tom "spot" Callaway <tcallawa@redhat.com> 1.9.9-1
- fix license tag
- update to 1.9.9

* Sun Sep 17 2006 Ian Pilcher <i.pilcher@comcast.net> 1.9.6-3
- Bump release for FC6 rebuild
- Fix dates in previous changelog entries (It's 2006, duh!)

* Thu Jun  1 2006 Ian Pilcher <i.pilcher@comcast.net> 1.9.6-2
- Use desktop-file-install (and BuildRequire desktop-file-utils)
- Add noreplace flag to config file
- Fix doc directory permissions

* Fri May 12 2006 Ian Pilcher <i.pilcher@comcast.net> 1.9.6-1
- Initial SPEC file for Fedora Extras