Blob Blame History Raw
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}

Name:           python-wifi
Version:        0.5.0
Release:        3%{?dist}
Summary:        Python binding for the wireless extensions

Group:          Development/Libraries
License:        LGPLv2+
URL:            https://developer.berlios.de/projects/pythonwifi/
Source0:        http://prdownload.berlios.de/pythonwifi/%{name}-%{version}.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:      noarch

BuildRequires:  python-devel
BuildRequires:  python-setuptools


%description
Python-Wifi is a Python library that provides access to information about a
W-LAN card's capabilities, like the wireless extensions written in C.


%prep
%setup -q


%build
%{__python} setup.py build


%install
rm -rf %{buildroot}
%{__python} setup.py install -O1 --skip-build --root="%{buildroot}"
# Fix permissions on examples
chmod -x examples/*.py
# Convert to utf-8
for file in docs/AUTHORS docs/pywifi_english.tpp docs/pywifi.tpp; do
    mv $file timestamp
    iconv -f ISO-8859-1 -t UTF-8 -o $file timestamp
    touch -r timestamp $file
done


%clean
rm -rf %{buildroot}


%files
%defattr(-,root,root,-)
%doc README docs/AUTHORS docs/BUGS docs/ChangeLog
%doc docs/LICENSE* docs/NEWS docs/ROADMAP docs/TODO docs/VERSION 
%doc examples/ tests/
%{python_sitelib}/pythonwifi/
%{python_sitelib}/python_wifi*.egg-info


%changelog
* Wed Dec 23 2009 Fabian Affolter <fabian@bernewireless.net> - 0.5.0-1
- Updated docs
- Updated BR
- Updated to new upstream version 0.5.0

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

* Wed Feb 18 2009 Fabian Affolter <fabian@bernewireless.net> - 0.3.1-2
- Changes acc. to bug #478300

* Sat Dec 27 2008 Fabian Affolter <fabian@bernewireless.net> - 0.3.1-1
- Initial spec for Fedora