diff --git a/python-wifi.spec b/python-wifi.spec index cea8d8d..9ebc541 100644 --- a/python-wifi.spec +++ b/python-wifi.spec @@ -2,13 +2,15 @@ Name: python-wifi Version: 0.5.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Python binding for the wireless extensions Group: Development/Libraries -License: LGPLv2+ +#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://prdownload.berlios.de/pythonwifi/%{name}-%{version}.tar.bz2 +Source0: http://download.berlios.de/pythonwifi/%{name}-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -23,7 +25,16 @@ W-LAN card's capabilities, like the wireless extensions written in C. %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 %build %{__python} setup.py build @@ -31,15 +42,21 @@ W-LAN card's capabilities, like the wireless extensions written in C. %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 +%{__python} setup.py install --skip-build --root="%{buildroot}" +#Delete the doc files, wrong location +rm %{buildroot}/usr/{INSTALL,README} +rm %{buildroot}/usr/docs/{AUTHORS,BUGS,ChangeLog,DEVEL.txt,LICENSE*,NEWS,ROADMAP,TODO,VERSION} +#Move the examples +mkdir -p %{buildroot}%{_defaultdocdir}/%{name}-%{version}/examples/ +mv %{buildroot}/usr/examples/{iwconfig.py,iwlist.py} \ + %{buildroot}%{_defaultdocdir}/%{name}-%{version}/examples/ +#Move the man pages +mkdir -p %{buildroot}%{_mandir}/man8/ +mv %{buildroot}/usr/man/man8/iw* %{buildroot}%{_mandir}/man8/ +#Move the doc files to the right directory +mv %{buildroot}/usr/docs/*.txt %{buildroot}%{_defaultdocdir}/%{name}-%{version}/ +#Delete the logos +rm %{buildroot}/usr/docs/logos/* %clean @@ -51,11 +68,18 @@ rm -rf %{buildroot} %doc README docs/AUTHORS docs/BUGS docs/ChangeLog %doc docs/LICENSE* docs/NEWS docs/ROADMAP docs/TODO docs/VERSION %doc examples/ tests/ +%{_mandir}/man*/iw*.* %{python_sitelib}/pythonwifi/ %{python_sitelib}/python_wifi*.egg-info %changelog +* Thu Dec 24 2009 Fabian Affolter - 0.5.0-2 +- Removed the convert to utf-8 part +- Added license for examples +- Fixed tarball URL +- Added man pages + * Wed Dec 23 2009 Fabian Affolter - 0.5.0-1 - Updated docs - Updated BR