wok-current annotate hardware-ibm-6272/receipt @ rev 16419

Up freerdp (1.1.0-beta+2013071101)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Apr 17 16:05:12 2014 +0000 (2014-04-17)
parents 0b72ced79370
children 7d5789c51e7e
rev   line source
pascal@11552 1 # SliTaz package receipt.
pascal@11552 2
pascal@11552 3 PACKAGE="hardware-ibm-6272"
pascal@11552 4 VERSION="1.0"
pascal@11552 5 CATEGORY="base-system"
pascal@11552 6 MAINTAINER="devel@slitaz.org"
pascal@15215 7 LICENSE="BSD"
pascal@11552 8 SHORT_DESC="IBM 300GL 6272/6282 (P75-233 ISA/PCI/USB/ETH desktop) hardware support"
pascal@11552 9 WEB_SITE="http://www.slitaz.org/"
pascal@11552 10
pascal@11552 11 DEPENDS="isapnptools"
pascal@11552 12
pascal@11552 13 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@11552 14 genpkg_rules()
pascal@11552 15 {
pascal@11552 16 mkdir -p $fs/etc/init.d
pascal@11552 17 cat > $fs/etc/init.d/pnp.sh <<EOT
pascal@11552 18 #!/bin/sh
pascal@11552 19
pascal@11552 20 status="\\\\033[70G[ \\\\033[1;31mFailed\\\\033[0;39m ]"
pascal@11552 21 echo -n "Switching on isa pnp ethernet card "
pascal@11552 22 # io 0x360..0x250 by 0x10, irq 15 12 11 10 9 7 6 5 4 3
pascal@11552 23 for io in \$(seq 360 -10 250); do for irq in 15 12 11 10; do
pascal@11552 24 pnpdump | busybox awk "BEGIN {s=0} \\
pascal@11552 25 /CONFIGURE CSC6040/ {s=1} { \\
pascal@11552 26 if (s==0) print; \\
pascal@11552 27 else if (/INT 0/) print \\"(INT 0 (IRQ \$irq (MODE +E)))\\"; \\
pascal@11552 28 else if (/IO 0/) print \\"(IO 0 (SIZE 16) (BASE 0x0\$io) (CHECK))\\"; \\
pascal@11552 29 else if (/ACT Y/) { s=0; print \\"(ACT Y)\\"} \\
pascal@11552 30 else print \\
pascal@11552 31 }" > /etc/isapnp.conf
pascal@11552 32 if isapnp /etc/isapnp.conf > /dev/null 2>&1 ; then
pascal@11552 33 modprobe cs89x0 io=0x\$io irq=\$irq > /dev/null 2>&1
pascal@11552 34 status="\\\\033[70G[ \\\\033[1;33mOK\\\\033[0;39m ]"
pascal@11552 35 break 2
pascal@11552 36 fi
pascal@11552 37 done ; done
pascal@11552 38 echo -e "\$status"
pascal@11552 39 EOT
pascal@11552 40 chmod +x $fs/etc/init.d/pnp.sh
pascal@11552 41 }
pascal@11552 42
pascal@11552 43 # Pre and post install commands for Tazpkg.
pascal@11552 44 post_install()
pascal@11552 45 {
pascal@11552 46 grep pnp.sh $1/etc/rcS.conf ||
pascal@11552 47 sed -i 's/RUN_SCRIPTS="/&pnp.sh /' $1/etc/rcS.conf
pascal@11552 48 }