/[gentoo-x86]/app-emulation/xen/xen-8885.ebuild
Gentoo

Contents of /app-emulation/xen/xen-8885.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Thu Mar 2 11:43:49 2006 UTC (12 years, 6 months ago) by chrb
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Bump unstable. Add PAE support thanks to Christopher G. Stach II (bug #124355).
(Portage version: 2.0.54)

1 # Copyright 1999-2006 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/app-emulation/xen/xen-8885.ebuild,v 1.1 2006/02/19 15:59:23 chrb Exp $
4
5 inherit mount-boot flag-o-matic
6
7 DESCRIPTION="The Xen virtual machine monitor and Xend daemon"
8 HOMEPAGE="http://xen.sourceforge.net"
9 REV="8885"
10 MY_P="xen-unstable-${REV}"
11 SRC_URI="mirror://gentoo/${MY_P}.tar.bz2"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15 KEYWORDS="~x86 ~amd64"
16 IUSE="doc debug screen custom-cflags"
17
18 DEPEND="sys-apps/iproute2
19 net-misc/bridge-utils
20 dev-lang/python
21 net-misc/curl
22 sys-libs/zlib
23 doc? (
24 dev-tex/latex2html
25 media-gfx/transfig
26 )
27 screen? (
28 app-misc/screen
29 app-admin/logrotate
30 )
31 sys-devel/dev86
32 || ( sys-fs/udev sys-apps/hotplug )"
33
34 S="${WORKDIR}/${MY_P}"
35
36 src_unpack() {
37 unpack ${A}
38 # if the user *really* wants to use their own custom-cflags, let them
39 if use custom-cflags; then
40 einfo "User wants their own CFLAGS - removing defaults"
41 for f in Makefile Rules.mk Config.mk; do
42 # try and remove all the default custom-cflags
43 find ${S} -name ${f} -exec sed \
44 -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
45 -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
46 -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
47 -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
48 -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
49 -i {} \;
50 done
51 # odd fixes
52 sed -e "s/int mode/int mode=-1/" -i ${S}/tools/misc/xc_shadow.c
53 fi
54 }
55
56 src_compile() {
57 local myopt
58 if use debug; then
59 myopt="${myopt} debug=y"
60 fi
61
62 if ! use custom-cflags; then
63 unset CFLAGS
64 fi
65 filter-flags -fPIE -fstack-protector
66
67 make ${myopt} -C xen || die "compiling xen failed"
68 make ${myopt} -C tools || die "compiling tools failed"
69
70 if use doc; then
71 sh ./docs/check_pkgs || die "package check failed"
72 make ${myopt} -C docs || die "compiling docs failed"
73 fi
74 }
75
76 src_install() {
77 make DESTDIR=${D} -C xen install || die "installing xen failed"
78
79 make DESTDIR=${D} XEN_PYTHON_NATIVE_INSTALL=1 -C tools install \
80 || die "installing tools failed"
81
82 if use doc; then
83 make DESTDIR=${D} -C docs install \
84 || die "installing docs failed"
85 # Rename doc/xen to the Gentoo-style doc/xen-x.y
86 mv ${D}/usr/share/doc/{${PN},${PF}}
87 fi
88
89 # bind xend to localhost per default
90 sed -i -e "s/\((xend-address *\)'')/\1\'localhost\')/" \
91 ${D}/etc/xen/xend-config.sxp
92
93 newinitd ${FILESDIR}/xend-init xend
94 newconfd ${FILESDIR}/xend-conf xend
95 newconfd ${FILESDIR}/xendomains-conf xendomains
96 newinitd ${FILESDIR}/xendomains-init xendomains
97
98 # for upstream change tracking
99 dodoc ${S}/XEN-VERSION
100
101 if use screen; then
102 sed -i -e 's/SCREEN="no"/SCREEN="yes"/' ${D}/etc/init.d/xendomains
103 fi
104
105 # xend expects these to exist
106 dodir /var/run/xenstored
107 dodir /var/lib/xenstored
108 dodir /var/xen/dump
109 }
110
111 pkg_postinst() {
112 einfo "Please visit the Xen and Gentoo wiki:"
113 einfo "http://gentoo-wiki.com/HOWTO_Xen_and_Gentoo"
114 einfo ""
115 einfo "This is a snapshot of the xen-unstable tree."
116 einfo "Please report bugs in xen itself (and not the packaging) to"
117 einfo "bugzilla.xensource.com"
118 }

  ViewVC Help
Powered by ViewVC 1.1.20