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

#python-wifi is licensed under LGPLv2+, however, the examples
#(e.g. iwconfig.py and iwlist.py) are licensed under GPLv2+
License:        LGPLv2+ and GPLv2+
URL:            https://developer.berlios.de/projects/pythonwifi/
Source0:        http://download.berlios.de/pythonwifi/%{name}-%{version}.tar.bz2
BuildArch:      noarch

BuildRequires:  python2-devel
BuildRequires:  python-setuptools

%global _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.

%description %_description

%package -n python2-wifi
Summary: %summary
%{?python_provide:%python_provide python2-wifi}

%description -n python2-wifi %_description

%prep
%setup -q
#Remove shebang
sed -i -e '/^#!\//, 1d' {tests/output_diff.sh,examples/*.py}
#Fix permissions
chmod -x {tests/output_diff.sh,examples/*.py}
# Convert to utf-8
for file in docs/AUTHORS; do
    mv $file timestamp
    iconv -f ISO-8859-1 -t UTF-8 -o $file timestamp
    touch -r timestamp $file
done
rm -rf python_wifi.egg-info

%build
%{__python} setup.py build

%install
%{__python} setup.py install --skip-build --root="%{buildroot}"
# Delete the doc files, wrong location
rm %{buildroot}/usr/{INSTALL,README}
rm -rf %{buildroot}/usr/docs/
rm -rf %{buildroot}/usr/examples/
# Move the man pages
mkdir -p %{buildroot}%{_mandir}/man8/
mv %{buildroot}/usr/man/man8/iw*  %{buildroot}%{_mandir}/man8/

%files -n python2-wifi
%doc README docs/AUTHORS docs/BUGS docs/ChangeLog docs/LICENSE* docs/DEVEL.txt 
%doc docs/TODO docs/ROADMAP docs/NEWS 
%doc examples/*.py* tests
%{_mandir}/man*/iw*.*
%{python_sitelib}/pythonwifi/
%{python_sitelib}/python_wifi*.egg-info

%changelog
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.5.0-16
- Python 2 binary package renamed to python2-wifi
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3

* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.0-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.0-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.0-13
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.0-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.0-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

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

* Mon Aug 05 2013 Fabian Affolter <mail@fabian-affolter.ch> - 0.5.0-9
- Spec file updates
- Fix FTBFS (#993182)

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

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

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

* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 0.5.0-3
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild

* Thu Dec 24 2009 Fabian Affolter <mail@fabian-affolter.ch> - 0.5.0-2
- Updated the convert to utf-8 part
- Fixed permissions
- Added license for examples
- Fixed tarball URL
- Added man pages

* Wed Dec 23 2009 Fabian Affolter <mail@fabian-affolter.ch> - 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 <mail@fabian-affolter.ch> - 0.3.1-2
- Changes acc. to bug #478300

* Sat Dec 27 2008 Fabian Affolter <mail@fabian-affolter.ch> - 0.3.1-1
- Initial spec for Fedora