From 6536a3d62188ef8f47a12d14fb5f0649a66d8d2e Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Fri, 5 Jan 2024 19:28:04 +0100 Subject: [PATCH] added patch to iwlib.h to fix xsupplicant build [release 29-3mamba;Wed May 06 2009] --- README.md | 2 + wireless_tools-29-iwlib_h_fix.patch | 35 +++++++ wireless_tools-ifrename_iftab | 6 ++ wireless_tools.spec | 147 ++++++++++++++++++++++++++++ 4 files changed, 190 insertions(+) create mode 100644 wireless_tools-29-iwlib_h_fix.patch create mode 100644 wireless_tools-ifrename_iftab create mode 100644 wireless_tools.spec diff --git a/README.md b/README.md index 75b1d6f..7769d91 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # wireless_tools +A set of tools and a library allowing to manipulate the Wireless Extensions. + diff --git a/wireless_tools-29-iwlib_h_fix.patch b/wireless_tools-29-iwlib_h_fix.patch new file mode 100644 index 0000000..fc0e17f --- /dev/null +++ b/wireless_tools-29-iwlib_h_fix.patch @@ -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 /* for "caddr_t" et al */ + ++#ifndef LINUX_VERSION_CODE ++#include ++#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 /* for "struct sockaddr" et al */ ++#include /* for IFNAMSIZ and co... */ ++#else ++ + /* Glibc systems headers are supposedly less problematic than kernel ones */ + #include /* for "struct sockaddr" et al */ + #include /* for IFNAMSIZ and co... */ ++#endif /* _USE_LINUX_IF_H */ + + /* Private copy of Wireless extensions (in this directoty) */ + #include "wireless.h" diff --git a/wireless_tools-ifrename_iftab b/wireless_tools-ifrename_iftab new file mode 100644 index 0000000..af80537 --- /dev/null +++ b/wireless_tools-ifrename_iftab @@ -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 diff --git a/wireless_tools.spec b/wireless_tools.spec new file mode 100644 index 0000000..7db8cef --- /dev/null +++ b/wireless_tools.spec @@ -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 +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 29-3mamba +- added patch to iwlib.h to fix xsupplicant build + +* Sat Jan 05 2008 Silvan Calarco 29-2mamba +- update to 29 stable + +* Mon Jul 16 2007 Silvan Calarco 29-1mamba +- update to 29 + +* Wed Apr 04 2007 Davide Madrisan 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 28-2qilnx +- update to version 28 stable +- added link to iwlist in /usr/bin as required by kwifimanager + +* Thu Mar 09 2006 Silvan Calarco 28-1qilnx +- update to version 28.pre14 by autospec + +* Tue Sep 20 2005 Stefano Cotta Ramusino 27-4qilnx +- rebuilt + +* Wed Jun 29 2005 Silvan Calarco 27-3qilnx +- revert back to original ifrename position (after hotplug's fix) + +* Wed Jan 12 2005 Silvan Calarco 27-2qilnx +- rebuilt with version 27 +- added ifrename package + +* Mon Jun 21 2004 Silvan Calarco 27-1qilnx +- rebuilt with version 27-pre23 + +* Mon May 10 2004 Silvan Calarco 26-3qilnx +- removed duplicated bindir files from libiw package + +* Wed Mar 10 2004 Silvan Calarco 26-2qilnx +- added main package requirement for libiw + +* Fri Jan 09 2004 Silvan Calarco 26-1qilnx +- First build