added patch to iwlib.h to fix xsupplicant build [release 29-3mamba;Wed May 06 2009]

This commit is contained in:
Silvan Calarco 2024-01-05 19:28:04 +01:00
parent 6281239d51
commit 6536a3d621
4 changed files with 190 additions and 0 deletions

View File

@ -1,2 +1,4 @@
# wireless_tools
A set of tools and a library allowing to manipulate the Wireless Extensions.

View File

@ -0,0 +1,35 @@
diff -Nru wireless_tools.29.orig/iwlib.h wireless_tools.29/iwlib.h
--- wireless_tools.29.orig/iwlib.h 2009-05-06 21:25:31.000000000 +0200
+++ wireless_tools.29/iwlib.h 2009-05-06 21:27:31.000000000 +0200
@@ -53,9 +53,31 @@
#include <linux/types.h> /* for "caddr_t" et al */
+#ifndef LINUX_VERSION_CODE
+#include <linux/version.h>
+#endif /* LINUX_VERSION_CODE */
+/* Check kernel version, new headers are supposed to be good! */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)
+#define _USE_LINUX_IF_H 1
+#endif /* >= */
+/* Check if net/if.h already been included */
+#ifdef _NET_IF_H
+#undef _USE_LINUX_IF_H
+#endif /* _NET_IF_H*/
+/* Check if linux/if.h already been included */
+#ifdef _LINUX_IF_H
+#define _USE_LINUX_IF_H 1
+#endif /* _LINUX_IF_H */
+
+#ifdef _USE_LINUX_IF_H
+#include <linux/socket.h> /* for "struct sockaddr" et al */
+#include <linux/if.h> /* for IFNAMSIZ and co... */
+#else
+
/* Glibc systems headers are supposedly less problematic than kernel ones */
#include <sys/socket.h> /* for "struct sockaddr" et al */
#include <net/if.h> /* for IFNAMSIZ and co... */
+#endif /* _USE_LINUX_IF_H */
/* Private copy of Wireless extensions (in this directoty) */
#include "wireless.h"

View File

@ -0,0 +1,6 @@
#
# Interface naming configuration file for ifrename
# For more informations see the manpage ifrename(8)
# The following line renames firewire network interfaces to fire*
fire* driver eth1394

147
wireless_tools.spec Normal file
View File

@ -0,0 +1,147 @@
#% define pre_ver .pre5
Name: wireless_tools
Version: 29
Release: 3mamba
Summary: A set of tools allowing to manipulate the Wireless Extensions
Group: System/Kernel and Hardware
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html
Source0: http://pcmcia-cs.sourceforge.net/ftp/contrib/wireless_tools.%{version}%{?pre_ver}.tar.gz
Source1: wireless_tools-ifrename_iftab
Patch0: %{name}-29-iwlib_h_fix.patch
License: GPL
Requires: libiw = %{?epoch:%epoch:}%{version}-%{release}
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
A set of tools and a library allowing to manipulate the Wireless Extensions.
%package -n libiw
Summary: A library implementing wireless tools functions
Group: System/Libraries
%description -n libiw
A library implementing wireless tools functions
%package -n libiw-devel
Summary: Devel files for wireless_tools library
Group: Development/Libraries
Requires: libiw = %{?epoch:%epoch:}%{version}-%{release}
%description -n libiw-devel
A set of tools and a library allowing to manipulate the Wireless Extensions.
This package contains static libraries and header files need for development.
%package -n ifrename
Summary: A tool allowing you to assign a consistent name to each of your network interface
Group: System/Tools
%description -n ifrename
Ifrename is a tool allowing you to assign a consistent name to each of your network interface.
%prep
%setup -q -n wireless_tools.%{version}
sed -i "s|\(BUILD_STATIC = y\)|#\1|" Makefile
%patch0 -p1
%build
%make \
BUILD_STATIC= CC=%{_target_platform}-gcc \
PREFIX=%{_prefix}
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall install-static \
PREFIX=%{buildroot}%{_prefix} \
INSTALL_LIB=%{buildroot}%{_libdir} \
INSTALL_MAN=%{buildroot}%{_mandir}
install -d %{buildroot}%{_bindir}
ln -s ../sbin/iwlist %{buildroot}%{_bindir}/iwlist
install -D -m 0644 %{S:1} %{buildroot}%{_sysconfdir}/iftab
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post -n libiw -p /sbin/ldconfig
%postun -n libiw -p /sbin/ldconfig
%files
%defattr(-,root,root)
%{_sbindir}/iwconfig
%{_sbindir}/iwevent
%{_sbindir}/iwgetid
%{_sbindir}/iwlist
%{_sbindir}/iwpriv
%{_sbindir}/iwspy
%{_bindir}/iwlist
%{_mandir}/man7/wireless.*
%{_mandir}/man8/iwconfig.*
%{_mandir}/man8/iwevent.*
%{_mandir}/man8/iwgetid.*
%{_mandir}/man8/iwlist.*
%{_mandir}/man8/iwpriv.*
%{_mandir}/man8/iwspy.*
%files -n libiw
%defattr(-,root,root)
%{_libdir}/libiw.so.*
%files -n libiw-devel
%defattr(-,root,root)
%{_libdir}/*.a
%{_libdir}/*.so
%{_includedir}/*.h
%files -n ifrename
%defattr(-,root,root)
%{_sbindir}/ifrename
%verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/iftab
%{_mandir}/man5/iftab.*
%{_mandir}/man8/ifrename.*
%changelog
* Wed May 06 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 29-3mamba
- added patch to iwlib.h to fix xsupplicant build
* Sat Jan 05 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 29-2mamba
- update to 29 stable
* Mon Jul 16 2007 Silvan Calarco <silvan.calarco@mambasoft.it> 29-1mamba
- update to 29
* Wed Apr 04 2007 Davide Madrisan <davide.madrisan@gmail.com> 28-3mamba
- do not package the ifrename binary in both main and ifrename packages
- update ldconfig cache
- manpage for iftab moved to ifrename package
* Wed May 03 2006 Silvan Calarco <silvan.calarco@mambasoft.it> 28-2qilnx
- update to version 28 stable
- added link to iwlist in /usr/bin as required by kwifimanager
* Thu Mar 09 2006 Silvan Calarco <silvan.calarco@mambasoft.it> 28-1qilnx
- update to version 28.pre14 by autospec
* Tue Sep 20 2005 Stefano Cotta Ramusino <stefano.cotta@qilinux.it> 27-4qilnx
- rebuilt
* Wed Jun 29 2005 Silvan Calarco <silvan.calarco@mambasoft.it> 27-3qilnx
- revert back to original ifrename position (after hotplug's fix)
* Wed Jan 12 2005 Silvan Calarco <silvan.calarco@mambasoft.it> 27-2qilnx
- rebuilt with version 27
- added ifrename package
* Mon Jun 21 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 27-1qilnx
- rebuilt with version 27-pre23
* Mon May 10 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 26-3qilnx
- removed duplicated bindir files from libiw package
* Wed Mar 10 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 26-2qilnx
- added main package requirement for libiw
* Fri Jan 09 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 26-1qilnx
- First build