/[gentoo-alt]/trunk/overlay/sys-devel/distcc/distcc-2.18.3-r7.ebuild
Gentoo

Contents of /trunk/overlay/sys-devel/distcc/distcc-2.18.3-r7.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 832 - (show annotations) (download)
Sat Oct 15 14:32:27 2005 UTC (9 years, 2 months ago) by flameeyes
File size: 4904 byte(s)
Added distcc that does not check for useradd to work on Gentoo/FreeBSD. Also remove shadow dependency.
1 # Copyright 1999-2005 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sys-devel/distcc/distcc-2.18.3-r7.ebuild,v 1.8 2005/07/30 23:01:22 matsuu Exp $
4
5 # If you change this in any way please email lisa@gentoo.org and make an
6 # entry in the ChangeLog (this means you spanky :P). (2004-04-11) Lisa Seelye
7
8 inherit eutils flag-o-matic gnuconfig toolchain-funcs
9
10 PATCHLEVEL="2.18"
11
12 DESCRIPTION="a program to distribute compilation of C code across several machines on a network"
13 HOMEPAGE="http://distcc.samba.org/"
14 SRC_URI="http://distcc.samba.org/ftp/distcc/distcc-${PV}.tar.bz2"
15
16 LICENSE="GPL-2"
17 SLOT="0"
18 KEYWORDS="alpha amd64 ~arm ~hppa ia64 ~mips ppc ppc64 ~s390 sh sparc x86"
19
20 IUSE="gnome gtk selinux ipv6 bootstrap"
21
22 DEPEND=">=sys-apps/portage-2.0.49-r6
23 >=sys-devel/gcc-config-1.3.1
24 gnome? (
25 dev-util/pkgconfig
26 )
27 gtk? (
28 dev-util/pkgconfig
29 )"
30 RDEPEND="
31 gnome? (
32 >=x11-libs/gtk+-2.0.0
33 >=gnome-base/libgnome-2.0.0
34 >=gnome-base/libgnomeui-2.0.0.0
35 >=gnome-base/libglade-2.0.0
36 x11-libs/pango
37 >=gnome-base/gconf-2.0.0
38 )
39 gtk? (
40 >=x11-libs/gtk+-2.0.0
41 x11-libs/pango
42 )
43 selinux? ( sec-policy/selinux-distcc )"
44
45 src_unpack() {
46 unpack ${A}
47 cd ${S}
48
49 # See bug #75420 for more multilib stuff
50 epatch ${FILESDIR}/distcc-gentoo-multilib-r1.patch
51 einfo "Please report to bug #75420 success or failure of this patch."
52 gnuconfig_update
53 }
54
55 src_compile() {
56 local myconf="--with-included-popt "
57 #Here we use the built in parse-options package. saves a dependancy
58
59 #not taking any chances here, guessing which takes precedence in the
60 #configure script, so we'll just make the distinction here:
61 #gnome takes precedence over gtk if both are specified (gnome pulls
62 #in gtk anyways...)
63 use gtk && ! use gnome && myconf="${myconf} --with-gtk"
64 use gtk && use gnome && myconf="${myconf} --with-gnome"
65
66 #More legacy stuff?
67 [ `gcc-major-version` -eq 2 ] && filter-lfs-flags
68
69 if use ipv6; then
70 ewarn "To use IPV6 you must have IPV6 compiled into your kernel"
71 ewarn "either via a module or compiled code"
72 ewarn "You can recompile without ipv6 with: USE='-ipv6' emerge distcc"
73 myconf=" ${myconf} --enable-rfc2553 "
74 epause 5
75 fi
76 econf ${myconf} || die "econf ${myconf} failed"
77 emake || die "emake failed"
78 }
79
80 src_install() {
81 make DESTDIR="${D%/}" install
82
83 insinto /usr/share/doc/${PN}
84 doins "${S}/survey.txt"
85
86 exeinto /usr/bin
87 doexe "${FILESDIR}/distcc-config"
88
89 insinto /etc/conf.d
90 newins "${FILESDIR}/${PATCHLEVEL}/conf" distccd
91
92 exeinto /etc/init.d
93 newexe "${FILESDIR}/${PATCHLEVEL}/init" distccd
94
95 # create and keep the symlink dir
96 dodir /usr/lib/distcc/bin
97 keepdir /usr/lib/distcc/bin
98
99 # create the distccd pid directory
100 dodir /var/run/distccd
101 keepdir /var/run/distccd
102
103 if use gnome || use gtk; then
104 einfo "Renaming /usr/bin/distccmon-gnome to /usr/bin/distccmon-gui"
105 einfo "This is to have a little sensability in naming schemes between distccmon programs"
106 mv ${D}/usr/bin/distccmon-gnome ${D}/usr/bin/distccmon-gui
107 dosym /usr/bin/distccmon-gui /usr/bin/distccmon-gnome
108 fi
109
110 }
111
112 pkg_preinst() {
113 # non-/ installs don't require us to do anything here
114 [ "${ROOT}" != "/" ] && return 0
115
116 # stop daemon since script is being updated
117 [ -n "$(pidof distccd)" -a -x /etc/init.d/distccd ] && \
118 /etc/init.d/distccd stop
119 }
120
121 pkg_postinst() {
122 #are we doing bootstrap with has no useradd?
123 if ! use bootstrap; then
124 enewuser distcc 240
125 else
126 ewarn "You do not have useradd (bootstrap) from shadow so I didn't"
127 ewarn "install the distcc user. Note that attempting to start the daemon"
128 ewarn "will fail. Please install shadow and re-emerge distcc."
129 ebeep 2
130 fi
131
132 # By now everyone should be using the right envfile
133
134 if [ "${ROOT}" = "/" ]; then
135 einfo "Installing links to native compilers..."
136 /usr/bin/distcc-config --install
137 else
138 # distcc-config can *almost* handle ROOT installs itself
139 # but for now, but user must finsh things off
140 ewarn "*** Installation is not complete ***"
141 ewarn "You must run the following as root:"
142 ewarn " /usr/bin/distcc-config --install"
143 ewarn "after booting or chrooting into ${ROOT}"
144 fi
145 einfo "Setting permissions on ${ROOT}var/run/distccd"
146 chown -R distcc:daemon ${ROOT}var/run/distccd
147 echo ""
148
149 einfo "Tips on using distcc with Gentoo can be found at"
150 einfo "http://www.gentoo.org/doc/en/distcc.xml"
151 echo ""
152 einfo "To use the distccmon programs with Gentoo you should use this command:"
153 einfo " DISTCC_DIR=/var/tmp/portage/.distcc distccmon-text N"
154 use gnome || use gtk && einfo "Or: DISTCC_DIR=/var/tmp/portage/.distcc distccmon-gnome"
155
156 ewarn "***SECURITY NOTICE***"
157 ewarn "If you are upgrading distcc please make sure to run etc-update to"
158 ewarn "update your /etc/conf.d/distccd and /etc/init.d/distccd files with"
159 ewarn "added security precautions (the --listen and --allow directives)"
160 ebeep 5
161 }

  ViewVC Help
Powered by ViewVC 1.1.20