/[gentoo-x86]/app-emulation/kqemu/kqemu-1.3.0_pre11.ebuild
Gentoo

Contents of /app-emulation/kqemu/kqemu-1.3.0_pre11.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (show annotations) (download)
Thu May 31 22:34:38 2012 UTC (2 years, 2 months ago) by zmedico
Branch: MAIN
Changes since 1.7: +3 -3 lines
inherit user for enewgroup

(Portage version: 2.2.0_alpha108_p9/cvs/Linux i686)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/app-emulation/kqemu/kqemu-1.3.0_pre11.ebuild,v 1.7 2008/12/13 17:59:42 flameeyes Exp $
4
5 inherit eutils flag-o-matic linux-mod toolchain-funcs user
6
7 MY_PV=${PV/_/}
8 MY_P=${PN}-${MY_PV}
9
10 DESCRIPTION="Multi-platform & multi-targets cpu emulator and dynamic translator kernel fast execution module"
11 HOMEPAGE="http://fabrice.bellard.free.fr/qemu/"
12 SRC_URI="http://fabrice.bellard.free.fr/qemu/${MY_P}.tar.gz"
13
14 LICENSE="GPL-2"
15 SLOT="0"
16 KEYWORDS="-* amd64 x86"
17 RESTRICT="strip"
18 IUSE=""
19
20 S="${WORKDIR}/$MY_P"
21
22 DEPEND=""
23
24 pkg_setup() {
25 MODULE_NAMES="kqemu(misc:${S})"
26 linux-mod_pkg_setup
27 }
28
29 src_unpack() {
30 unpack ${A}
31 cd ${S}
32 epatch ${FILESDIR}/${P}-sched_h.patch
33 sed -i 's:MODULE_PARM(\([^,]*\),"i");:module_param(\1, int, 0);:' kqemu-linux.c
34 }
35
36 src_compile() {
37 #Let the application set its cflags
38 unset CFLAGS
39
40 # Switch off hardened tech
41 filter-flags -fpie -fstack-protector
42
43 ./configure --kernel-path="${KV_DIR}" \
44 || die "could not configure"
45
46 make || die "make failed"
47 }
48
49 src_install() {
50 linux-mod_src_install
51
52 # udev rule
53 dodir /etc/udev/rules.d/
54 echo 'KERNEL=="kqemu*", NAME="%k", GROUP="qemu", MODE="0660"' > ${D}/etc/udev/rules.d/48-qemu.rules
55
56 # Module doc
57 dodoc ${S}/README
58 dohtml ${S}/kqemu-doc.html
59
60 }
61
62 pkg_postinst() {
63 linux-mod_pkg_postinst
64 enewgroup qemu
65 elog "Make sure you have the kernel module loaded before running qemu"
66 elog "and your user is in the 'qemu' group"
67 case ${CHOST} in
68 *-darwin*) elog "Just run 'niutil -appendprop / /groups/qemu users <USER>'";;
69 *-freebsd*|*-dragonfly*) elog "Just run 'pw groupmod qemu -m <USER>'";;
70 *) elog "Just run 'gpasswd -a <USER> qemu', then have <USER> re-login.";;
71 esac
72 }

  ViewVC Help
Powered by ViewVC 1.1.20