#!/bin/bash ## src2pkg script for: wireless-tools ## Auto-generated by src2pkg-2.1 ## src2pkg - Copyright 2005-2009 Gilbert Ashley # This script adapted from code in the wireless-tools.SlackBuild # See the end of this file for Coypright and license info SOURCE_NAME='wireless_tools.29.tar.gz' ALT_NAME='wireless-tools' ALT_VERSION='29' # ARCH='' # BUILD='1' # PRE_FIX='usr' # Any extra options go here: # EXTRA_CONFIGS="" PATCHLIST='wireless-tools-patches/wireless_tools.nowhine.diff wireless-tools-patches/wireless_tools.static.diff.gz' # uncomment to build a multical binary #BUILD_MUTLICALL=1 # uncomment to also build the shared library #BUILD_SHARED=1 # Optional function replaces configure_source, compile_source, fake_install # To use, uncomment and write/paste CODE between the {} brackets. build() { make || exit 1 mkdir -p $PKG_DIR/sbin # some space could be saved by building the multicall binary if [[ $BUILD_MUTLICALL = 1 ]] ; then make iwmulticall cp iwmulticall $PKG_DIR/sbin/iwconfig ( cd $PKG_DIR/sbin ln -sf iwconfig iwlist ln -sf iwconfig iwspy ln -sf iwconfig iwpriv ln -sf iwconfig iwgetid ) cp ifrename iwevent $PKG_DIR/sbin else cp -a ifrename iwconfig iwevent iwgetid iwlist iwpriv iwspy $PKG_DIR/sbin fi chmod 755 $PKG_DIR/sbin/* # The library seems to be used by kdenetwork, but since the .soname in the shared library # doesn't seem to be forward-thinking we'll leave that out still: mkdir -p $PKG_DIR/usr/lib${LIBDIRSUFFIX} cp -a libiw.a $PKG_DIR/usr/lib${LIBDIRSUFFIX} # the shared library may not be completely functional if [[ $BUILD_SHARED = 1 ]] ; then make libiw.so.$VERSION cp -a libiw.so.$VERSION $PKG_DIR/usr/lib${LIBDIRSUFFIX} ( cd $PKG_DIR/usr/lib${LIBDIRSUFFIX} ; ln -sf libiw.so.$VERSION libiw.so ) fi mkdir -p $PKG_DIR/usr/include cp -a iwlib.h wireless.h $PKG_DIR/usr/include chmod 644 $PKG_DIR/usr/include/*.h mkdir -p $MAN_DIR/man5 cp iftab.5 $MAN_DIR/man5 mkdir -p $MAN_DIR/man7 cp wireless.7 $MAN_DIR/man7 mkdir -p $MAN_DIR/man8 for FILE in *.8 ; do cp $FILE $MAN_DIR/man8 done # Add init scripts from Eric Hameleers: mkdir -p $PKG_DIR/etc/rc.d cat $PATCHES_DIR/$NAME-patches/rc.wireless > $PKG_DIR/etc/rc.d/rc.wireless.new chmod 755 $PKG_DIR/etc/rc.d/rc.wireless.new # This might contain a secret key, so we'll use chmod 600: cat $PATCHES_DIR/$NAME-patches/rc.wireless.conf > $PKG_DIR/etc/rc.d/rc.wireless.conf.new chmod 600 $PKG_DIR/etc/rc.d/rc.wireless.conf.new } # Get the functions and configs . /usr/libexec/src2pkg/FUNCTIONS ; # Execute the named packaging steps: pre_process find_source make_dirs unpack_source fix_source_perms configure_source # compile_source # If used, the 'build' function replaces these 3 fake_install # fix_pkg_perms strip_bins create_docs compress_man_pages make_description make_doinst make_package post_process # Original Coypright: # Copyright 2008, 2009 Patrick J. Volkerding, Sebeka, Minnesota, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is # permitted provided that the following conditions are met: # # 1. Redistributions of this script must retain the above copyright # notice, this list of conditions and the following disclaimer. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.