mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-01-23 18:14:54 +08:00
extramodules-lts
This commit is contained in:
parent
c1d6d549b8
commit
0f5c52d5f2
@ -4,23 +4,22 @@
|
||||
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
|
||||
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
|
||||
|
||||
# include global config
|
||||
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
|
||||
# Find the kernel name inside the chroot
|
||||
_extramodules=extramodules-`pacman -Q linux-lts | cut -c11-13 | sed 's/linux-lts //g'`-CHAKRA-LTS
|
||||
_kver="$(cat /lib/modules/${_extramodules}/version)"
|
||||
|
||||
_kernver=2.6.35-CHAKRA-LTS
|
||||
pkgname=acpi_call-lts
|
||||
pkgver=20101109
|
||||
pkgver=20120115
|
||||
pkgrel=1
|
||||
pkgdesc="A kernel module that enables you to call parameterless ACPI methods by writing the method name to /proc/acpi/call, e.g. to turn off discrete graphics card in a dual graphics environment (like NVIDIA Optimus)."
|
||||
arch=('i686' 'x86_64')
|
||||
url=("http://github.com/mkottman/acpi_call")
|
||||
license=('GPL')
|
||||
depends=('kernel26-lts' 'kernel26-lts-headers')
|
||||
groups=("kernel26-lts-modules")
|
||||
depends=('linux-lts>=3.0' 'linux-lts<3.1' 'linux-lts-headers')
|
||||
makedepends=('git')
|
||||
install=acpi_call.install
|
||||
source=(http://chakra-project.org/sources/acpi_call/acpi_call-${pkgver}.tar.xz)
|
||||
md5sums=('79e7a95ebeff1df29201cae22067921f')
|
||||
source=(http://chakra.sourceforge.net/sources/acpi_call/acpi_call-${pkgver}.tar.xz)
|
||||
md5sums=('129841dd806887492609214462792413')
|
||||
|
||||
|
||||
# create tarball: source PKGBUILD && mksource
|
||||
@ -29,38 +28,40 @@ mksource() {
|
||||
git clone http://github.com/mkottman/acpi_call.git
|
||||
pushd acpi_call
|
||||
popd
|
||||
tar -cvJf ${pkgname}-${pkgver}.tar.xz acpi_call/*
|
||||
md5sum ${pkgname}-${pkgver}.tar.xz
|
||||
tar -cvJf acpi_call-${pkgver}.tar.xz acpi_call/*
|
||||
md5sum acpi_call-${pkgver}.tar.xz
|
||||
}
|
||||
|
||||
build() {
|
||||
cd ${srcdir}
|
||||
|
||||
## Build
|
||||
rm -rf ${srcdir}/$pkgname-build
|
||||
cp -r ${srcdir}/acpi_call ${srcdir}/$pkgname-build
|
||||
cd ${srcdir}/$pkgname-build
|
||||
rm -rf ${srcdir}/acpi_call-build
|
||||
cp -r ${srcdir}/acpi_call ${srcdir}/acpi_call-build
|
||||
cd ${srcdir}/acpi_call-build
|
||||
|
||||
sed \
|
||||
-e 's/$(shell uname -r)/3.0-CHAKRA-LTS/g' \
|
||||
-i Makefile
|
||||
make
|
||||
}
|
||||
package() {
|
||||
cd ${srcdir}/$pkgname-build
|
||||
install -d ${pkgdir}/usr/share/$pkgname || return 1
|
||||
cd ${srcdir}/acpi_call-build
|
||||
install -d ${pkgdir}/usr/share/acpi_call || return 1
|
||||
install -d ${pkgdir}/usr/bin || return 1
|
||||
install -d ${pkgdir}/usr/share/$pkgname/doc || return 1
|
||||
cp -a ${srcdir}/$pkgname-build/test_off.sh \
|
||||
${pkgdir}/usr/share/$pkgname || return 1
|
||||
ln -s /usr/share/$pkgname/test_off.sh \
|
||||
${pkgdir}/usr/bin/test_off-lts.sh || return 1
|
||||
install -d ${pkgdir}/usr/share/acpi_call/doc || return 1
|
||||
install -Dm755 ${srcdir}/acpi_call-build/test_off.sh \
|
||||
${pkgdir}/usr/share/acpi_call || return 1
|
||||
ln -s /usr/share/acpi_call/test_off.sh \
|
||||
${pkgdir}/usr/bin/test_off.sh || return 1
|
||||
install -Dm644 README \
|
||||
${pkgdir}/usr/share/$pkgname/README
|
||||
${pkgdir}/usr/share/acpi_call/README
|
||||
|
||||
msg2 "Building module for $_kernver..."
|
||||
msg2 "Building module for $_kver..."
|
||||
|
||||
# KDIR is necessary even when cleaning
|
||||
make KDIR=/usr/src/linux-${_kernver} clean
|
||||
make KDIR=/usr/src/linux-${_kernver}
|
||||
make KDIR=/usr/src/linux-${_kver} clean
|
||||
make KDIR=/usr/src/linux-${_kver}
|
||||
|
||||
install -D -m644 acpi_call.ko ${pkgdir}/lib/modules/${_kernver}/kernel/drivers/acpi/acpi_call.ko
|
||||
sed -i -e "s/KERNEL_VERSION='.*'/KERNEL_VERSION='${_kernver}'/" $startdir/acpi_call.install
|
||||
install -D -m644 acpi_call.ko $pkgdir/lib/modules/$_extramodules/acpi_call.ko
|
||||
}
|
||||
|
@ -1,22 +1,19 @@
|
||||
post_install() {
|
||||
KERNEL_VERSION='2.6.35-CHAKRA-LTS'
|
||||
depmod $KERNEL_VERSION > /dev/null 2>&1
|
||||
depmod -a
|
||||
echo ""
|
||||
echo "[+] modprobe acpi_call"
|
||||
echo ">>> run /usr/bin/test_off.sh to test/view different acpi_call functions to see if it disables your secondary/hybrid video card"
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
KERNEL_VERSION='2.6.35-CHAKRA-LTS'
|
||||
depmod $KERNEL_VERSION > /dev/null 2>&1
|
||||
depmod -a
|
||||
echo ""
|
||||
echo "[+] modprobe acpi_call"
|
||||
echo ">>> run /usr/bin/test_off.sh to test/view different acpi_call functions to see if it disables your secondary/hybrid video card"
|
||||
}
|
||||
|
||||
post_remove() {
|
||||
KERNEL_VERSION='2.6.35-CHAKRA-LTS'
|
||||
depmod $KERNEL_VERSION > /dev/null 2>&1
|
||||
depmod -a
|
||||
}
|
||||
|
||||
op=$1
|
||||
|
@ -4,45 +4,52 @@
|
||||
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
|
||||
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
|
||||
|
||||
# use ../makepkg
|
||||
_kernver="2.6.35-CHAKRA-LTS"
|
||||
# Find the kernel name inside the chroot
|
||||
_extramodules=extramodules-`pacman -Q linux-lts | cut -c11-13 | sed 's/linux-lts //g'`-CHAKRA-LTS
|
||||
_kver="$(cat /lib/modules/${_extramodules}/version)"
|
||||
|
||||
pkgname=broadcom-wl-lts
|
||||
pkgver=5.100.82.38
|
||||
pkgrel=3
|
||||
pkgver=5.100.82.112
|
||||
pkgrel=1
|
||||
pkgdesc='Broadcom 802.11abgn hybrid Linux networking device driver'
|
||||
arch=('i686' 'x86_64')
|
||||
url='http://www.broadcom.com/support/802.11/linux_sta.php'
|
||||
license=('custom')
|
||||
depends=('kernel26-lts')
|
||||
makedepends=('kernel26-lts-headers')
|
||||
groups=("kernel26-lts-modules")
|
||||
depends=('linux-lts>=3.0' 'linux-lts<3.1')
|
||||
makedepends=('linux-lts-headers')
|
||||
|
||||
[ "$CARCH" = 'x86_64' ] && ARCH=x86_64 || ARCH=x86_32
|
||||
[[ $CARCH = x86_64 ]] && ARCH=x86_64 || ARCH=x86_32
|
||||
source=("http://www.broadcom.com/docs/linux_sta/hybrid-portsrc_${ARCH}-v${pkgver//./_}.tar.gz"
|
||||
'modprobe.d'
|
||||
'linux3.patch'
|
||||
'license.patch'
|
||||
'semaphore.patch'
|
||||
'mutex-sema.patch')
|
||||
|
||||
sha1sums=('3062830f86c5f1f41d8a4b26d6e0072dc989c7ba'
|
||||
'semaphore.patch')
|
||||
sha1sums=('01aa32f9e85621253a3f15cf4361bb80d41da3e8'
|
||||
'89bf92286ede30dd85304c6c4e42e89cfdc0f60a'
|
||||
'3e18f905bbe5e8b99a53d6ecb3b80a919f3531f2'
|
||||
'ea7b67982ddc0f56fd3becb9914fd4458fe7d373'
|
||||
'105f8e1d48ebe1f25d53859e5ab9326a27435c66'
|
||||
'97f2bcbbe3b9ac5d88e571fc536f5d59dbc789e1')
|
||||
[ "$CARCH" = 'x86_64' ] && sha1sums[0]='6076de3bd8206b3e7b8bfc2eadbe3a97eec4e735'
|
||||
'105f8e1d48ebe1f25d53859e5ab9326a27435c66')
|
||||
[[ $CARCH = x86_64 ]] && sha1sums[0]='5bd78c20324e6a4aa9f3fafdc6f0155e884d5131'
|
||||
|
||||
backup=('etc/modprobe.d/broadcom-wl.conf')
|
||||
install=install
|
||||
|
||||
build() {
|
||||
cd "$srcdir"
|
||||
patch -p1 < license.patch
|
||||
patch -p1 < semaphore.patch
|
||||
patch -p1 < mutex-sema.patch
|
||||
make -C /lib/modules/$_kernver/build M=`pwd`
|
||||
cd "${srcdir}"
|
||||
|
||||
patch -p1 -i linux3.patch
|
||||
patch -p1 -i license.patch
|
||||
patch -p1 -i semaphore.patch
|
||||
|
||||
make -C /lib/modules/"${_kver}"/build M=`pwd`
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$srcdir"
|
||||
install -D -m 755 wl.ko "$pkgdir/lib/modules/$_kernver/kernel/drivers/net/wireless/wl.ko"
|
||||
install -D -m 644 lib/LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||
sed -i -e "s/KERNEL_VERSION='.*'/KERNEL_VERSION='${_kernver}'/" $startdir/*install
|
||||
}
|
||||
cd "${srcdir}"
|
||||
|
||||
install -D -m 755 wl.ko "${pkgdir}/lib/modules/${_extramodules}/wl.ko"
|
||||
gzip "${pkgdir}/lib/modules/${_extramodules}/wl.ko"
|
||||
|
||||
install -D -m 644 lib/LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
||||
install -D -m 644 modprobe.d "${pkgdir}"/etc/modprobe.d/broadcom-wl.conf
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
post_install() {
|
||||
KERNEL_VERSION=`pacman -Qf kernel26 | cut -c10-15 | sed 's/kernel26 //g'`-CHAKRA
|
||||
#KERNEL_VERSION=$(uname -r)
|
||||
depmod $KERNEL_VERSION
|
||||
|
||||
echo ""
|
||||
echo "==> NOTE:"
|
||||
echo "==> If the modules do not load at boot, remember add in your rc.conf:"
|
||||
echo "==> MODULES=(lib80211 wl !b43 !ssb ...)"
|
||||
echo ""
|
||||
echo "==> And if you have problems with interfaces swapped, read the wiki:"
|
||||
echo "==> http://wiki.archlinux.org/index.php/Broadcom_BCM4312#Interfaces_swapped_every_time"
|
||||
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
post_install
|
||||
}
|
@ -1,15 +1,9 @@
|
||||
post_upgrade() {
|
||||
KERNEL_VERSION='2.6.35-CHAKRA-LTS'
|
||||
depmod -ae $KERNEL_VERSION > /dev/null 2>&1
|
||||
cd lib/modules
|
||||
for i in extramodules-*; do depmod "$(cat "$i/version")"; done
|
||||
cd ../..
|
||||
}
|
||||
|
||||
post_install() {
|
||||
cat <<EOF
|
||||
==> If the modules do not load at boot, add to your /etc/rc.conf:
|
||||
==> MODULES=(lib80211 wl !b43 !ssb ...)
|
||||
==>
|
||||
==> If you have problems with interfaces swapped, read:
|
||||
==> http://wiki.archlinux.org/index.php/Broadcom_BCM4312#Interfaces_swapped_every_time
|
||||
EOF
|
||||
post_upgrade
|
||||
}
|
||||
|
@ -1,15 +0,0 @@
|
||||
--- wl/src/wl/sys/wl_linux.c 2010-12-15 03:01:09.000000000 +0100
|
||||
+++ temp/src/wl/sys/wl_linux.c 2011-03-04 11:02:12.754753700 +0100
|
||||
@@ -482,7 +482,11 @@
|
||||
#ifdef WL_ALL_PASSIVE
|
||||
spin_lock_init(&wl->txq_lock);
|
||||
#endif
|
||||
- init_MUTEX(&wl->sem);
|
||||
+ #ifndef init_MUTEX
|
||||
+ sema_init(&wl->sem,1);
|
||||
+ #else
|
||||
+ init_MUTEX(&wl->sem);
|
||||
+ #endif
|
||||
}
|
||||
|
||||
if (!(wl->wlc = wlc_attach((void *) wl, vendor, device, unit, wl->piomode,
|
@ -4,37 +4,41 @@
|
||||
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
|
||||
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
|
||||
|
||||
# use ../makepkg
|
||||
_kernver="2.6.35-CHAKRA-LTS"
|
||||
# include global config
|
||||
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
|
||||
|
||||
# Find the kernel name inside the chroot
|
||||
_extramodules=extramodules-`pacman -Q linux-lts | cut -c11-13 | sed 's/linux-lts //g'`-CHAKRA-LTS
|
||||
_kver="$(cat /lib/modules/${_extramodules}/version)"
|
||||
|
||||
pkgname=ndiswrapper-lts
|
||||
pkgver=1.57
|
||||
pkgrel=1
|
||||
pkgdesc="Module for NDIS (Windows Network Drivers) drivers supplied by vendors. For kernel26-testing."
|
||||
pkgrel=2
|
||||
pkgdesc="Module for NDIS (Windows Network Drivers) drivers supplied by vendors. For linux-testing."
|
||||
license=('GPL')
|
||||
arch=(i686 x86_64)
|
||||
url="http://ndiswrapper.sourceforge.net"
|
||||
install="ndiswrapper.install"
|
||||
depends=("ndiswrapper-utils=$pkgver" 'kernel26-lts>=2.6.35' 'kernel26-lts<2.6.36')
|
||||
makedepends=('kernel26-lts-headers>=2.6.35' 'kernel26-lts-headers<2.6.36')
|
||||
depends=('linux-lts>=3.0' 'linux-lts<3.1')
|
||||
provides=("ndiswrapper-utils=$pkgver")
|
||||
replaces=('ndiswrapper-utils')
|
||||
conflicts=('ndiswrapper-utils')
|
||||
makedepends=('linux-lts-headers')
|
||||
source=(http://downloads.sourceforge.net/sourceforge/ndiswrapper/ndiswrapper-$pkgver.tar.gz)
|
||||
md5sums=('7a401dc540938bf07893c67f418b6152')
|
||||
groups=("kernel26-modules")
|
||||
|
||||
build()
|
||||
{
|
||||
cd $srcdir/ndiswrapper-$pkgver/driver
|
||||
make KVERS=$_kernver
|
||||
build() {
|
||||
cd "$srcdir/ndiswrapper-$pkgver"
|
||||
|
||||
make KVERS=$_kver
|
||||
}
|
||||
|
||||
package() {
|
||||
cd $srcdir/ndiswrapper-$pkgver/driver
|
||||
make DESTDIR=$pkgdir KVERS=$_kernver install
|
||||
cd "$srcdir/ndiswrapper-$pkgver"
|
||||
|
||||
sed -i -e "s/KERNEL_VERSION='.*'/KERNEL_VERSION='${_kernver}'/" $startdir/*.install
|
||||
# move it to correct kernel directory
|
||||
mkdir -p $pkgdir/lib/modules/$_kernver/kernel/drivers/net/wireless/ndiswrapper
|
||||
mv $pkgdir/lib/modules/$_kernver/misc/* $pkgdir/lib/modules/$_kernver/kernel/drivers/net/wireless/ndiswrapper/
|
||||
rm -r $pkgdir/lib/modules/$_kernver/misc/
|
||||
}
|
||||
make INST_DIR="lib/modules/$_extramodules" \
|
||||
KVERS=$_kver DESTDIR="$pkgdir/" install
|
||||
|
||||
gzip "$pkgdir/lib/modules/$_extramodules/ndiswrapper.ko"
|
||||
sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" ${startdir}/*.install
|
||||
}
|
@ -1,23 +1,15 @@
|
||||
# arg 1: the new package version
|
||||
post_install()
|
||||
{
|
||||
ndiswrapper -m
|
||||
KERNEL_VERSION='2.6.35-CHAKRA-LTS'
|
||||
depmod -ae $KERNEL_VERSION > /dev/null 2>&1
|
||||
post_upgrade
|
||||
}
|
||||
|
||||
# arg 1: the new package version
|
||||
# arg 2: the old package version
|
||||
post_upgrade()
|
||||
{
|
||||
ndiswrapper -m
|
||||
KERNEL_VERSION='2.6.35-CHAKRA-LTS'
|
||||
depmod -ae $KERNEL_VERSION > /dev/null 2>&1
|
||||
EXTRAMODULES='extramodules-3.0-CHAKRA-LTS'
|
||||
depmod $(cat /lib/modules/$EXTRAMODULES/version)
|
||||
}
|
||||
|
||||
# arg 1: the old package version
|
||||
post_remove()
|
||||
{
|
||||
KERNEL_VERSION='2.6.35-CHAKRA-LTS'
|
||||
depmod -ae $KERNEL_VERSION > /dev/null 2>&1
|
||||
post_upgrade
|
||||
}
|
||||
|
@ -7,33 +7,36 @@
|
||||
# include global config
|
||||
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
|
||||
|
||||
# Find the kernel name inside the chroot
|
||||
_extramodules=extramodules-`pacman -Q linux-lts | cut -c11-13 | sed 's/linux-lts //g'`-CHAKRA-LTS
|
||||
_kver="$(cat /lib/modules/${_extramodules}/version)"
|
||||
|
||||
pkgname=tiacx-lts
|
||||
pkgver=20080210
|
||||
pkgrel=1
|
||||
pkgdesc="OpenSource module for Texas Instruments ACX100/ACX111 wireless chips. For stock arch 2.6 kernel"
|
||||
pkgrel=2
|
||||
pkgdesc="OpenSource module for Texas Instruments ACX100/ACX111 wireless chips. For stock chakra kernel"
|
||||
arch=(i686 x86_64)
|
||||
url="http://acx100.sourceforge.net/"
|
||||
license=('MPL')
|
||||
depends=('wireless_tools' 'kernel26-lts>=2.6.35' 'kernel26-lts<2.6.36' 'tiacx-firmware')
|
||||
makedepends=('kernel26-lts-headers>=2.6.35' 'kernel26-lts-headers<2.6.36')
|
||||
groups=("kernel26-lts-modules")
|
||||
depends=('wireless_tools' 'linux-lts>=3.0' 'linux-lts<3.1' 'tiacx-firmware')
|
||||
makedepends=('linux-lts-headers')
|
||||
install=acx.install
|
||||
source=(http://downloads.sourceforge.net/sourceforge/acx100/acx-$pkgver.tar.bz2
|
||||
kernel-2.6.27.patch
|
||||
kernel-2.6.30.patch
|
||||
kernel-2.6.31.patch
|
||||
kernel-2.6.33.patch)
|
||||
_kernver=2.6.35-CHAKRA-LTS
|
||||
|
||||
build() {
|
||||
cd $startdir/src/acx-$pkgver
|
||||
patch -Np1 -i ../kernel-2.6.27.patch || return 1
|
||||
patch -Np0 -i ../kernel-2.6.30.patch || return 1
|
||||
patch -Np1 -i ../kernel-2.6.31.patch || return 1
|
||||
patch -Np0 -i ../kernel-2.6.33.patch || return 1
|
||||
make -C /lib/modules/${_kernver}/build M=`pwd` || return 1
|
||||
install -D acx.ko $startdir/pkg/lib/modules/${_kernver}/kernel/drivers/net/wireless/tiacx/acx.ko
|
||||
sed -i -e "s/KERNEL_VERSION='.*'/KERNEL_VERSION='${_kernver}'/" $startdir/*.install
|
||||
patch -Np1 -i ../kernel-2.6.27.patch
|
||||
patch -Np0 -i ../kernel-2.6.30.patch
|
||||
patch -Np1 -i ../kernel-2.6.31.patch
|
||||
patch -Np0 -i ../kernel-2.6.33.patch
|
||||
|
||||
make -C /lib/modules/${_kver}/build M=`pwd`
|
||||
install -D acx.ko $pkgdir/lib/modules/$_extramodules/acx.ko
|
||||
sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" ${startdir}/*.install
|
||||
}
|
||||
md5sums=('7d5ce3215708e4e9f95cf567a9ee3a12'
|
||||
'9895f72f8d0c84956b0f6c3b16df0fe8'
|
||||
|
@ -1,19 +1,15 @@
|
||||
# arg 1: the new package version
|
||||
post_install() {
|
||||
KERNEL_VERSION='2.6.35-CHAKRA-LTS'
|
||||
depmod $KERNEL_VERSION > /dev/null 2>&1
|
||||
post_install()
|
||||
{
|
||||
post_upgrade
|
||||
}
|
||||
|
||||
# arg 1: the new package version
|
||||
# arg 2: the old package version
|
||||
post_upgrade() {
|
||||
KERNEL_VERSION='2.6.35-CHAKRA-LTS'
|
||||
depmod $KERNEL_VERSION > /dev/null 2>&1
|
||||
|
||||
post_upgrade()
|
||||
{
|
||||
EXTRAMODULES='extramodules-3.0-CHAKRA-LTS'
|
||||
depmod $(cat /lib/modules/$EXTRAMODULES/version)
|
||||
}
|
||||
|
||||
# arg 1: the old package version
|
||||
post_remove() {
|
||||
KERNEL_VERSION='2.6.35-CHAKRA-LTS'
|
||||
depmod $KERNEL_VERSION > /dev/null 2>&1
|
||||
post_remove()
|
||||
{
|
||||
post_upgrade
|
||||
}
|
||||
|
@ -4,36 +4,30 @@
|
||||
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
|
||||
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
|
||||
|
||||
# include global config
|
||||
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
|
||||
# Find the kernel name inside the chroot
|
||||
_extramodules=extramodules-`pacman -Q linux-lts | cut -c11-13 | sed 's/linux-lts //g'`-CHAKRA-LTS
|
||||
_kver="$(cat /lib/modules/${_extramodules}/version)"
|
||||
|
||||
pkgname=vhba-module-lts
|
||||
pkgver=1.2.1
|
||||
_kernver='2.6.35-CHAKRA-LTS'
|
||||
pkgver=20110915
|
||||
pkgrel=1
|
||||
pkgdesc="Kernel26 module that emulates SCSI devices"
|
||||
pkgdesc="Kernel module that emulates SCSI devices"
|
||||
arch=('i686' 'x86_64')
|
||||
url="http://cdemu.sourceforge.net/"
|
||||
license=('GPL2')
|
||||
depends=('kernel26-lts>=2.6.35' 'kernel26-lts<2.6.36')
|
||||
makedepends=('kernel26-lts-headers>=2.6.35')
|
||||
depends=('linux-lts>=3.0' 'linux-lts<3.1')
|
||||
makedepends=('linux-lts-headers')
|
||||
install=vhba-module.install
|
||||
source=(http://downloads.sourceforge.net/cdemu/vhba-module-$pkgver.tar.bz2 vhba-kernel26-2.6.34.patch vhba-kernel26-2.6.36.patch)
|
||||
md5sums=('a3b6ad798f2b72ef599df797ef79e5ec' 'de68d2e744885faade0b03baff52f4a8' '5960ac48a487ff5a4d767ed1f5eaf904')
|
||||
groups=("kernel26-lts-modules")
|
||||
source=(http://sourceforge.net/projects/cdemu/files/vhba-module/vhba-module-$pkgver.tar.bz2)
|
||||
md5sums=('8bb99b427ca67bad448f4dd211bdd1a2')
|
||||
|
||||
build() {
|
||||
cd "$srcdir/vhba-module-$pkgver"
|
||||
#workaround to fix compilation against 2.6.33
|
||||
#http://bugs.gentoo.org/233910
|
||||
for i in kat/*.c; do
|
||||
sed -i "s:<linux/autoconf.h>:<generated/autoconf.h>:" $i
|
||||
done
|
||||
|
||||
patch -Np0 -i ${srcdir}/vhba-kernel26-2.6.34.patch || return 1
|
||||
patch -Np0 -i ${srcdir}/vhba-kernel26-2.6.36.patch || return 1
|
||||
|
||||
make -j1 KDIR=/usr/src/linux-${_kernver} || return 1
|
||||
install -D vhba.ko "$pkgdir/lib/modules/${_kernver}/extra/vhba.ko" || return 1
|
||||
sed -i -e "s/KERNEL_VERSION='.*'/KERNEL_VERSION='${_kernver}'/" "$startdir/vhba-module.install"
|
||||
make -j1 KDIR=/usr/src/linux-${_kver}
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$srcdir/vhba-module-$pkgver"
|
||||
install -D vhba.ko "$pkgdir/lib/modules/${_extramodules}/vhba.ko"
|
||||
sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" "${startdir}/vhba-module.install"
|
||||
}
|
||||
|
@ -1,12 +0,0 @@
|
||||
*** vhba.c~ 2010-05-23 02:17:53.000000000 +0200
|
||||
--- vhba.c 2010-05-23 02:17:53.000000000 +0200
|
||||
***************
|
||||
*** 26,31 ****
|
||||
--- 26,32 ----
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/miscdevice.h>
|
||||
#include <linux/poll.h>
|
||||
+ #include <linux/slab.h>
|
||||
#include <asm/uaccess.h>
|
||||
#include <scsi/scsi.h>
|
||||
#include <scsi/scsi_host.h>
|
@ -1,20 +0,0 @@
|
||||
--- vhba.c.orig 2010-10-22 23:16:21.896084497 +0200
|
||||
+++ vhba.c 2010-10-22 23:17:38.150243713 +0200
|
||||
@@ -672,7 +672,7 @@ static ssize_t vhba_ctl_write(struct fil
|
||||
return ret;
|
||||
}
|
||||
|
||||
-static int vhba_ctl_ioctl (struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
|
||||
+static long vhba_ctl_unlocked_ioctl (struct file *file, unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
struct vhba_device *vdev = file->private_data;
|
||||
struct vhba_host *vhost;
|
||||
@@ -782,7 +782,7 @@ static struct file_operations vhba_ctl_f
|
||||
.read = vhba_ctl_read,
|
||||
.write = vhba_ctl_write,
|
||||
.poll = vhba_ctl_poll,
|
||||
- .ioctl = vhba_ctl_ioctl,
|
||||
+ .unlocked_ioctl = vhba_ctl_unlocked_ioctl,
|
||||
};
|
||||
|
||||
static struct miscdevice vhba_miscdev = {
|
@ -1,8 +1,8 @@
|
||||
post_install() {
|
||||
echo ">> Place 'vhba' in MODULES= in /etc/rc.conf to enable vhba on system boot."
|
||||
echo ">> This module needs to be recompiled for every kernel version upgrade."
|
||||
KERNEL_VERSION='2.6.35-CHAKRA-LTS'
|
||||
depmod $KERNEL_VERSION > /dev/null 2>&1
|
||||
EXTRAMODULES='extramodules-3.0-CHAKRA-LTS'
|
||||
depmod $(cat /lib/modules/$EXTRAMODULES/version)
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
@ -10,7 +10,7 @@ post_upgrade() {
|
||||
}
|
||||
|
||||
post_remove() {
|
||||
KERNEL_VERSION='2.6.35-CHAKRA-LTS'
|
||||
depmod $KERNEL_VERSION > /dev/null 2>&1
|
||||
EXTRAMODULES='extramodules-3.0-CHAKRA-LTS'
|
||||
depmod $(cat /lib/modules/$EXTRAMODULES/version)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user