]> Pileus Git - ~andy/sunrise/blob - net-wireless/crc-itu-t/crc-itu-t-20070529.ebuild
Add check for 2.6.22+ kernels which has this one bundled already
[~andy/sunrise] / net-wireless / crc-itu-t / crc-itu-t-20070529.ebuild
1 # Copyright 1999-2007 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 inherit linux-mod
6
7 MY_PN="rt2x00-git"
8 DESCRIPTION="CRC ITU-T V.41 calculations"
9 HOMEPAGE="http://rt2x00.serialmonkey.com/"
10 SRC_URI="http://dev.gentooexperimental.org/~jakub/distfiles/${MY_PN}-${PV}.tar.gz"
11
12 LICENSE="GPL-2"
13 SLOT="0"
14 KEYWORDS="~x86"
15 IUSE=""
16
17 DEPEND=""
18 RDEPEND=""
19
20 S="${WORKDIR}/lib"
21
22 BUILD_PARAMS="CONFIG_CRC_ITU_T=m
23         -C ${KERNEL_DIR} M=${S}"
24 BUILD_TARGETS="modules"
25 MODULE_NAMES="crc-itu-t()"
26
27 pkg_setup() {
28         if kernel_is ge 2 6 22 ; then
29                 CONFIG_CHECK="${CONFIG_CHECK} !CRC_ITU_T"
30                 ERROR_CRC_ITU_T="CRC_ITU_T support already enabled in kernel. You do not need this ebuild."
31         fi
32
33         linux-mod_pkg_setup
34 }
35
36 src_unpack() {
37         unpack ${A}
38         echo 'obj-$(CONFIG_CRC_ITU_T) += crc-itu-t.o' > ${S}/Makefile
39         echo "CFLAGS += -I${WORKDIR}/include" >> ${S}/Makefile
40 }
41
42 src_install() {
43         linux-mod_src_install
44         dodir /usr/include/crc-itu-t/linux/
45         insinto /usr/include/crc-itu-t/linux/
46         doins "${WORKDIR}"/include/linux/crc-itu-t.h
47 }