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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (hide annotations) (download)
Thu May 31 22:34:38 2012 UTC (12 months, 2 weeks ago) by zmedico
Branch: MAIN
Changes since 1.4: +3 -3 lines
inherit user for enewgroup

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

1 zmedico 1.5 # Copyright 1999-2012 Gentoo Foundation
2 lu_zero 1.1 # Distributed under the terms of the GNU General Public License v2
3 zmedico 1.5 # $Header: /var/cvsroot/gentoo-x86/app-emulation/kqemu/kqemu-1.3.0_pre7.ebuild,v 1.4 2007/07/02 13:59:29 peper Exp $
4 lu_zero 1.1
5 zmedico 1.5 inherit eutils flag-o-matic linux-mod toolchain-funcs user
6 lu_zero 1.1
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="KQEMU"
15     SLOT="0"
16     KEYWORDS="-* ~amd64 ~x86"
17 peper 1.4 RESTRICT="strip"
18 lu_zero 1.1 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     einfo "kqemu is binary module with a restricted license."
29     einfo "Please read carefully the KQEMU license"
30     einfo "and ${HOMEPAGE}qemu-accel.html"
31     einfo "if you would like to see it released under the GPL"
32     }
33    
34     src_unpack() {
35     unpack ${A}
36     cd ${S}
37 genstef 1.2 sed -i 's:MODULE_PARM(\([^,]*\),"i");:module_param(\1, int, 0);:' kqemu-linux.c
38 lu_zero 1.1 }
39    
40     src_compile() {
41     #Let the application set its cflags
42     unset CFLAGS
43    
44     # Switch off hardened tech
45     filter-flags -fpie -fstack-protector
46    
47     ./configure --kernel-path="${KV_DIR}" \
48     || die "could not configure"
49    
50     make
51     }
52    
53     src_install() {
54     linux-mod_src_install
55    
56     # udev rule
57     dodir /etc/udev/rules.d/
58 lu_zero 1.3 echo 'KERNEL=="kqemu*", NAME="%k", GROUP="qemu", MODE="0660"' > ${D}/etc/udev/rules.d/48-qemu.rules
59 lu_zero 1.1
60     # Module doc
61     dodoc ${S}/README
62     dohtml ${S}/kqemu-doc.html
63    
64     # module params
65     dodir /etc/modules.d
66     echo "options kqemu major=0" > ${D}/etc/modules.d/kqemu
67     }
68    
69     pkg_postinst() {
70     linux-mod_pkg_postinst
71     enewgroup qemu
72     einfo "Make sure you have the kernel module loaded before running qemu"
73     einfo "and your user is in the qemu group"
74     }

  ViewVC Help
Powered by ViewVC 1.1.20