summaryrefslogtreecommitdiff
path: root/community/r8168-lts/PKGBUILD
blob: 78f927b0b8634b366719fa063db949316ec04490 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# $Id: PKGBUILD 75466 2012-08-25 13:58:38Z tpowa $
# Maintainer: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>

pkgname=r8168-lts
_pkgname=r8168
pkgver=8.031.00
pkgrel=5
pkgdesc="A kernel module for Realtek 8168 network cards for linux-lts"
url="http://www.realtek.com.tw"
license=("GPL")
arch=('i686' 'x86_64')
depends=('glibc' "linux-lts>=3.0" "linux-lts<3.1")
makedepends=("linux-lts-headers>=3.0" "linux-lts-headers<3.1")
source=(http://r8168.googlecode.com/files/$_pkgname-$pkgver.tar.bz2)
install=$pkgname.install
md5sums=('ec1654f02e2dad930bbeb0210ddab7e5')
sha256sums=('5c617b3c08aca18d1eb24d33f77df40020eb64fb32c8e4008265e08b7ffe5779')

_extramodules=extramodules-3.0-lts

build() {
	cd "$_pkgname-$pkgver"
	local _kernver="$(cat /usr/lib/modules/$_extramodules/version)"
	make -C /usr/lib/modules/$_kernver/build \
			SUBDIRS="$srcdir/$_pkgname-$pkgver/src" \
			EXTRA_CFLAGS="-DCONFIG_R8168_NAPI -DCONFIG_R8168_VLAN" \
			modules
}

package() {
	cd "$_pkgname-$pkgver"
	install -Dm644 src/$_pkgname.ko "$pkgdir/usr/lib/modules/$_extramodules/$_pkgname.ko"
	find "$pkgdir" -name '*.ko' -exec gzip -9 {} +
}