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

Contents of /app-emulation/xen/xen-9029-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Fri Mar 24 23:51:03 2006 UTC (12 years, 8 months ago) by agriffis
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Split xen from xen-tools; now this package only installs the hypervisor and
include files. Unify the release and snapshot ebuilds for easier
maintenance. Switch to a snapshot versioning scheme that keeps
release/snapshot versions in order.
(Portage version: 2.1_pre5-r4)

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

  ViewVC Help
Powered by ViewVC 1.1.20