You are not logged in.

#1 2008-04-11 11:07:22

sH
Member
From: Braunschweig, Germany
Registered: 2007-05-02
Posts: 145

Help me build wpa_supplicant 0.6.3

Hi all,

I am a little bit new to package building, but I know the basics. I want to build the development version of wpa_supplicant for the following reason:
wpa_supplicant 0.6.3 provides the alternative driver "ralink", which is known to offer WPA support for the RT73 Kernel driver, that is available here: http://rt2x00.serialmonkey.com/rt73-cvs-daily.tar.gz

Before you say I should use the kernel module rt73usb that comes with the current kernel... I gave up on it, because the interface wlan0 doesn't show up on boot, only when I plug in the usb stick after boot. I like to run this thing on a server so it must be available on boot, which is the case for the RT73 module (already tested). But this is incompatible to "wext".

0.6.3 has a different folder-structure and I don't know how much I can borrow from the current PKGBUILD:

# Contributor: iztok pizorn <pizorn@gmail.com>
# Contributor: William Rea <sillywilly@gmail.com>
pkgname=wpa_supplicant
pkgver=0.6.3
#_madwifi_ver=0.9.4    // see below
pkgrel=1
pkgdesc="A utility providing key negotiation for WPA wireless networks"
arch=('i686' 'x86_64')
makedepends=('kernel26>=2.6.24' 'kernel26<2.6.25')
depends=('openssl')
license=('GPL')
groups=('base')
backup=('etc/wpa_supplicant.conf')
url="http://hostap.epitest.fi/wpa_supplicant"
source=(http://hostap.epitest.fi/releases/wpa_supplicant-$pkgver.tar.gz
        config
    http://downloads.sourceforge.net/sourceforge/madwifi/madwifi-${_madwifi_ver}.tar.gz)
install='wpa_supplicant.install'
md5sums=('9e7b99da67c47d81121368c6d580d069'
         '87a7bb38e0b4820b29065a9b3e8f4e06'
         '399d20de8d855a59f20058857c2178ad')    // needs to be changed

build() {
  cd ${startdir}/wpa_supplicant                         // I'm not shure here because /src contains a Makefile too, but seems it should be changed to     
                                                                     //    wpa_supplicant
  #mv madwifi-${_madwifi_ver} madwifi          // folder /src or other folders do not contain "madwifi" so maybe this whole part can be skipped?
  cd $startdir/src/$pkgname-$pkgver               // I'm not shure what I should change here. Should be /wpa_supplicant, is this cd 
  cp ../config ./.config                                     // $startdir/src/$pkgname-$pkgver/wpa_supplicant ?    
  sed -i 's@/usr/local@$(PREFIX)@g' Makefile
  sed -i 's@dynamic_eap_methods@@g' Makefile
  make || return 1
  make PREFIX=/usr DESTDIR=$startdir/pkg install || return 1
  install -D -m644 wpa_supplicant.conf $startdir/pkg/etc/wpa_supplicant.conf || return 1
  install -d -m755 $startdir/pkg/usr/man/man{5,8} || return 1
  install -m644 doc/docbook/wpa_supplicant.conf.5 $startdir/pkg/usr/man/man5 || return 1
  install -m644 doc/docbook/{wpa_background,wpa_cli,wpa_passphrase,wpa_supplicant}.8 $startdir/pkg/usr/man/man8 || return 1
}

I tried to comment here in the code. I hope it get's clear where my problems are.
Last but not least, the config file should definitely comment out the Line "CONFIG_DRIVER_RALINK=y" cause I want this driver later.
Can I put it in the available config file? Or should I take a config File from 0.6.3 and edit it accordingly ? Where can I find this config file in the package?

Anyone likes to give me a hand on this one is very welcome. Here is the link to the wpa_supplicant pkg http://hostap.epitest.fi/releases/wpa_s … 6.3.tar.gz

Thanks

Last edited by sH (2008-04-11 11:17:58)

Offline

#2 2008-04-11 15:30:57

ghostHack
Member
From: Bristol UK
Registered: 2008-02-29
Posts: 261

Re: Help me build wpa_supplicant 0.6.3

Hi sH

The PKGBUILD below will at least build the package, I took the wpa_supplicant.install script and 'config' file from the version in ABS, these files need to be in the same directory as the PKGBUILD when you run makepkg.

I think you should be able to just add the line "CONFIG_DRIVER_RALINK=y"  to the config file from ABS but I'll let someone else make the definitive judgment on that since I'm also quite new to building packages.

Please note, I haven't actually been able to test the resulting binaries but they compiled with no errors.

pkgname=wpa_supplicant
pkgver=0.6.3
_madwifi_ver=0.9.4  
pkgrel=1
pkgdesc="A utility providing key negotiation for WPA wireless networks"
arch=('i686' 'x86_64')
makedepends=('kernel26>=2.6.24' 'kernel26<2.6.25')
depends=('openssl')
license=('GPL')
groups=('base')
backup=('etc/wpa_supplicant.conf')
url="http://hostap.epitest.fi/wpa_supplicant"
source=(http://hostap.epitest.fi/releases/wpa_supplicant-$pkgver.tar.gz
        config
    http://downloads.sourceforge.net/sourceforge/madwifi/madwifi-${_madwifi_ver}.tar.gz)
install='wpa_supplicant.install'
md5sums=('b51b2975f21006f85f7297f3fb1acde1'
         '87a7bb38e0b4820b29065a9b3e8f4e06'
         '399d20de8d855a59f20058857c2178ad') 

build() {
  cd ${startdir}/src/

  mv madwifi-${_madwifi_ver} $pkgname-$pkgver/madwifi
  cd $startdir/src/$pkgname-$pkgver/wpa_supplicant
  cp ../../config ./.config
  sed -i 's@/usr/local@$(PREFIX)@g' Makefile
  sed -i 's@dynamic_eap_methods@@g' Makefile
  make || return 1
  make PREFIX=/usr DESTDIR=$startdir/pkg install || return 1
  install -D -m644 wpa_supplicant.conf $startdir/pkg/etc/wpa_supplicant.conf || return 1
  install -d -m755 $startdir/pkg/usr/man/man{5,8} || return 1
  install -m644 doc/docbook/wpa_supplicant.conf.5 $startdir/pkg/usr/man/man5 || return 1
  install -m644 doc/docbook/{wpa_background,wpa_cli,wpa_passphrase,wpa_supplicant}.8 $startdir/pkg/usr/man/man8 || return 1
}

Offline

Board footer

Powered by FluxBB