diff options
Diffstat (limited to 'base/wireless/wireless.build')
-rwxr-xr-x | base/wireless/wireless.build | 135 |
1 files changed, 135 insertions, 0 deletions
diff --git a/base/wireless/wireless.build b/base/wireless/wireless.build new file mode 100755 index 0000000..b3373a7 --- /dev/null +++ b/base/wireless/wireless.build @@ -0,0 +1,135 @@ +#!/bin/bash +# +# Maintainer: Deposite Pirate <ofni.sknuplatem@etaripd> + +source /usr/src/ports/Build/build.sh + +NAME=wireless +VERSION=$(date '+%Y%m%d') +BUILD=1 +DEPENDS=('tcpip >= 20130209-1' 'gnutls >= 3.1.10-1' 'dbus >= 1.4.24-1') +#FIXME: enable EAP_FAST + +# Description + +cat > ${PKG}/install/slack-desc <<EOF +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + +$(padd)|-----handy-ruler------------------------------------------------------| +${NAME}: wireless +${NAME}: +${NAME}: This package includes the central regulatory domain agent (crda), +${NAME}: the 'iw' command line tool and the 'wpa_supplicant' daemon. It must +${NAME}: be installed in order for wireless networking (such as WiFi) to work. +${NAME}: +${NAME}: Homepage: http://linuxwireless.org +${NAME}: +${NAME}: +${NAME}: +${NAME}: +EOF + +cat >> ${PKG}/install/doinst.sh <<EOF +#!/bin/sh + +config() { + NEW="\$1" + OLD="\$(dirname \$NEW)/\$(basename \$NEW .new)" + # If there's no config file by that name, mv it over: + if [ ! -r \$OLD ]; then + mv \$NEW \$OLD + elif [ "\$(cat \$OLD | md5sum)" = "\$(cat \$NEW | md5sum)" ]; then + # toss the redundant copy + rm \$NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +config etc/conf.d/wpa_supplicant.conf.new +config etc/logrotate.d/wpa_supplicant.new +EOF + +REGBINLOCATION="${SYS_DIR[share]}/net" + +# Sources + +SRCNAME[0]=wireless-regdb +SRCVERS[0]=2013.02.13 +SRCPACK[0]=http://linuxwireless.org/download/${SRCNAME[0]}/${SRCNAME[0]}-${SRCVERS[0]}.tar.xz +SRCCOPY[0]="MIT" + +build0() +{ +install.dir ${PKG}${REGBINLOCATION} +install.dat regulatory.bin ${PKG}${REGBINLOCATION} +install.dir ${PKG}${SYS_DIR[man]}/man5 +install.man regulatory.bin.5 ${PKG}${SYS_DIR[man]}/man5 +} + +SRCNAME[1]=crda +SRCVERS[1]=1.1.3 +SRCPACK[1]=http://linuxwireless.org/download/${SRCNAME[1]}/${SRCNAME[1]}-${SRCVERS[1]}.tar.bz2 +SRCCOPY[1]="MIT" + +build1() +{ +make ${JOBS} \ + OPTFLAGS="${FLAGS} -I${SYS_DIR[include]}/gcrypt -I${SYS_DIR[include]}/gpg-error" \ + REG_BIN="${PKG}${REGBINLOCATION}/regulatory.bin" \ + UDEV_RULE_DIR="${SYS_DIR[udevrules]}" +make install DESTDIR="${PKG}" \ + SBINDIR="${SYS_DIR[sbin]}" \ + UDEV_RULE_DIR="${SYS_DIR[udevrules]}" +#FIXME: packages should never compress manual pages! +gunzip ${PKG}${SYS_DIR[man]}/man?/*.?.gz +#FIXME: compat +install.dir ${PKG}/sbin +( + cd ${PKG}/sbin + ln -sf ${SYS_DIR[sbin]}/crda + ln -sf ${SYS_DIR[sbin]}/regdbdump +) +} + +SRCNAME[2]=iw +SRCVERS[2]=3.8 +SRCPACK[2]=http://linuxwireless.org/download/${SRCNAME[2]}/${SRCNAME[2]}-${SRCVERS[2]}.tar.bz2 +SRCCOPY[2]="MIT" + +build2() +{ +make OPTFLAGS="${FLAGS}" V="1" +make install DESTDIR="${PKG}" MANDIR="${SYS_DIR[man]}" BINDIR="${SYS_DIR[sbin]}" +#FIXME: packages should never compress manual pages! +gunzip ${PKG}${SYS_DIR[man]}/man?/*.?.gz +} + +SRCNAME[3]=wpa_supplicant +SRCVERS[3]=2.0 +SRCPACK[3]=http://hostap.epitest.fi/releases/${SRCNAME[3]}-${SRCVERS[3]}.tar.gz +SRCCOPY[3]="BSD3" + +build3() +{ +( cd wpa_supplicant ; make OPTS="${FLAGS}" ) +( +cd wpa_supplicant +make install \ + DESTDIR="${PKG}" \ + CONFDIR="${SYS_DIR[conf]}" \ + MANDIR="${SYS_DIR[man]}" \ + DOCDIR="${SYS_DIR[doc]}/${SRCNAME[3]}-${SRCVERS[3]}" +) +mv \ + ${PKG}${SYS_DIR[conf]}/wpa_supplicant.conf \ + ${PKG}${SYS_DIR[conf]}/wpa_supplicant.conf.sample +install -m 0600 wpa_supplicant.conf.new ${PKG}${SYS_DIR[conf]} +install.dir ${PKG}${SYS_DIR[etc]}/{logrotate,tmpfiles}.d +install.cfg wpa_supplicant.logrotate ${PKG}${SYS_DIR[etc]}/logrotate.d/wpa_supplicant.new +install.cfg wpa_supplicant.conf.tmpfiles ${PKG}${SYS_DIR[etc]}/tmpfiles.d/wpa_supplicant.conf +} |