View | Details | Raw Unified
Collapse All | Expand All

(-) dazuko-2.3.2-r2.ebuild (-10 / +36 lines)
 Lines 1-8    Link Here 
# Copyright 1999-2006 Gentoo Foundation
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-fs/dazuko/dazuko-2.3.2-r2.ebuild,v 1.2 2006/12/18 16:49:42 jer Exp $
# $Header: /var/cvsroot/gentoo-x86/sys-fs/dazuko/dazuko-2.3.2-r2.ebuild,v 1.2 2006/12/18 16:49:42 jer Exp $
inherit linux-mod toolchain-funcs flag-o-matic
inherit linux-mod
DESCRIPTION="Linux kernel module and interface providing file access control"
DESCRIPTION="Linux kernel module and interface providing file access control"
MY_P="${P/_/-}" # for -preN versions
MY_P="${P/_/-}" # for -preN versions
 Lines 13-19    Link Here 
SLOT="0"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
IUSE=""
IUSE=""
DEPEND=">=virtual/linux-sources-2.2"
DEPEND="kernel_linux? ( >=virtual/linux-sources-2.2 )"
RDEPEND=${DEPEND}
S="${WORKDIR}/${MY_P}"
S="${WORKDIR}/${MY_P}"
# kernel settings
# kernel settings
 Lines 21-52    Link Here 
MODULE_NAMES="dazuko(misc:)"
MODULE_NAMES="dazuko(misc:)"
BUILD_TARGETS="dummy_rule"
BUILD_TARGETS="dummy_rule"
pkg_setup() {
	[[ ${KERNEL} == linux ]] && linux-mod_pkg_setup
}
src_unpack() {
src_unpack() {
	unpack ${A}
	unpack ${A}
	cd "${S}"
	cd "${S}"
	epatch "${FILESDIR}/${PN}-2.3.1-suspend2.patch"
	epatch "${FILESDIR}/${PN}-2.3.1-suspend2.patch"
	if kernel_is 2 6 19; then
	if [[ ${KERNEL} == linux ]] && kernel_is 2 6 19; then
		epatch "${WORKDIR}/${P}-linux-2.6.19.patch"
		epatch "${WORKDIR}/${P}-linux-2.6.19.patch"
	fi
	fi
}
}
src_compile() {
src_compile() {
	if [[ ${KERNEL} == FreeBSD ]]; then
		KERNEL_DIR=/usr/src/sys
		KBUILD_OUTPUT=/boot/modules
		MAKE=make
	fi
	./configure \
	./configure \
		--without-dep \
		--without-dep \
		--kernelsrcdir="${KERNEL_DIR}" \
		--kernelsrcdir="${KERNEL_DIR}" \
		--kernelobjdir="${KBUILD_OUTPUT}" \
		--kernelobjdir="${KBUILD_OUTPUT}" \
		|| die "configure failed"
		|| die "configure failed"
	convert_to_m Makefile
	linux-mod_src_compile
	cd library
	if [[ ${KERNEL} == linux ]]; then
	emake || die
		convert_to_m Makefile
	cd ..
		linux-mod_src_compile
	else
		emake CC="$(tc-getCC)" LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die
	fi
	emake -C library CC="$(tc-getCC)" || die
}
}
src_install() {
src_install() {
	linux-mod_src_install
	if [[ ${KERNEL} == linux ]]; then
		linux-mod_src_install
	else
		insinto /boot/modules
		doins "${S}"/dazuko.kld
		exeinto /boot/modules
		doexe "${S}"/dazuko.ko
	fi
	dolib.a library/libdazuko.a
	dolib.a library/libdazuko.a
	insinto /usr/include
	insinto /usr/include
 Lines 58-60    Link Here 
	dodoc README.trusted
	dodoc README.trusted
}
}
pkg_postinst() {
	[[ ${KERNEL} == linux ]] && linux-mod_pkg_postinst
}
pkg_postrm() {
	[[ ${KERNEL} == linux ]] && linux-mod_pkg_postrm
}