SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "linmodem-slmodem"

# SliTaz package receipt.

PACKAGE="linmodem-slmodem"
VERSION="2.9.11-20100303"
CATEGORY="network"
MAINTAINER="jozee@slitaz.org"
SHORT_DESC="Drivers for the Smartlink winmodems"
WEB_SITE="http://linmodems.technion.ac.il/packages/smartlink/"
SOURCE="slmodem"
TARBALL="$SOURCE-$VERSION.tar.gz"
WGET_URL="$WEB_SITE/$TARBALL"

BUILD_DEPENDS="linux-module-headers lzma"

# Rules to configure and make the package.

compile_rules() {
    ungrab=ungrab-winmodem-20090716
    [ -f $SOURCES_REPOSITORY/$ungrab.tar.gz ] ||
        wget $WEB_SITE/$ungrab.tar.gz -P $SOURCES_REPOSITORY
    [ -d $ungrab ] || tar -xzf $SOURCES_REPOSITORY/$ungrab.tar.gz
    cd $ungrab
    make KERNEL_DIR=/usr/src/linux
    cd $src
    for i in utsrelease.h ; do
        grep -rl linux/$i * | xargs sed -i "s|linux/$i|generated/$i|"
    done
    sed -i 's|^obj-m := slamr.o slusb.o|obj-m := slamr.o|' drivers/Makefile
    sed -i 's/\.ioctl/.unlocked_ioctl/' drivers/amrmo_init.c
    sed -i -e 's/DECLARE_MUTEX/DEFINE_SEMAPHORE/' \
        -e 's/init_MUTEX\([^)]*\)/sema_init\1, 1/' drivers/st7554.c
    make KERNEL_DIR=/usr/src/linux SUPPORT_ALSA=1 DESTDIR=$DESTDIR drivers
}
    
# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{    
    EXTRAVERSION=_${kvers}
    mkdir -p $fs/lib/modules/$kvers-slitaz/kernel/drivers/net
    
    # Compress and install module
    lzma e $src/drivers/slamr.ko \
        $fs/lib/modules/$kvers-slitaz/kernel/drivers/net/slamr.ko.gz
    lzma e ungrab-winmodem-20090716/ungrab-winmodem.ko \
        $fs/lib/modules/$kvers-slitaz/kernel/drivers/net/ungrab-winmodem.ko.gz
    chown root $fs/lib/modules/$kvers-slitaz/kernel/drivers/net/*.ko.gz
    chmod 0644 $fs/lib/modules/$kvers-slitaz/kernel/drivers/net/*.ko.gz    
}

post_install()
{
    echo "Processing post-install commands..."
    chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz
}

post_remove()
{
    echo "Processing post-remove commands..."
    depmod -a
}
3382 packages and 430813 files in stable database (Mon Mar 4 17:53:49 2019)