Contents of /trunk/extras/distcc/distcc-3.1-r1.smage2
Parent Directory | Revision Log
Revision 4260 -
(show annotations)
(download)
Tue Dec 1 10:31:16 2009 UTC (14 years, 6 months ago) by niro
File size: 3267 byte(s)
Tue Dec 1 10:31:16 2009 UTC (14 years, 6 months ago) by niro
File size: 3267 byte(s)
-fixed src_install
1 | # $Id$ |
2 | |
3 | PNAME="distcc" |
4 | PVER="3.1" |
5 | PBUILD="r1" |
6 | |
7 | SPLIT_PACKAGES="distcc distccmon-gnome" |
8 | |
9 | PCATEGORIE="dev-util" |
10 | STATE="unstable" |
11 | |
12 | DESCRIPTION="Distributed compiler utilities." |
13 | HOMEPAGE="http://distcc.org/" |
14 | |
15 | SDEPEND=">= sys-apps/shadow-4 |
16 | >= dev-util/pkgconfig-0.23 |
17 | >= dev-lang/python-2.6 |
18 | >= dev-libs/popt-1.15 |
19 | >= net-dns/avahi-0.6.25 |
20 | >= x11-libs/gtk2+-2.18 |
21 | >= x11-libs/pango-1.26" |
22 | |
23 | SRCFILE="${PNAME}-${PVER}.tar.bz2" |
24 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
25 | |
26 | sminclude mbuild mtools cleanutils |
27 | |
28 | SRC_URI=( |
29 | http://${PNAME}.googlecode.com/files/${SRCFILE} |
30 | mirror://${PNAME}/${SRCFILE} |
31 | mirror://${PNAME}/distccd.confd-2.18.3 |
32 | mirror://${PNAME}/distccd.rc-2.18.3 |
33 | mirror://${PNAME}/distcc-config.sh |
34 | ) |
35 | |
36 | UP2DATE="updatecmd http://code.google.com/p/distcc/downloads/list | lasttarball" |
37 | |
38 | split_info_distcc() |
39 | { |
40 | DESCRIPTION="Distributed compiler utilities." |
41 | DEPEND=">= virtual/glibc |
42 | >= dev-lang/python-2.6 |
43 | >= dev-libs/popt-1.15 |
44 | >= net-dns/avahi-0.6.25" |
45 | } |
46 | |
47 | split_info_distccmon-gnome() |
48 | { |
49 | DESCRIPTION="DistCC GTK2 Client." |
50 | DEPEND="== dev-util/distcc-${PVER} |
51 | >= dev-libs/popt-1.15 |
52 | >= x11-libs/gtk2+-2.18 |
53 | >= x11-libs/pango-1.26" |
54 | } |
55 | |
56 | src_compile() |
57 | { |
58 | cd ${SRCDIR} |
59 | |
60 | mconfigure \ |
61 | --with-docdir=/usr/share/doc/${PNAME}-${PVER} \ |
62 | --with-gtk \ |
63 | --with-avahi \ |
64 | --enable-rfc2553 \ |
65 | --disable-Werror \ |
66 | || die |
67 | |
68 | mmake || die |
69 | } |
70 | |
71 | src_install_distcc() |
72 | { |
73 | cd ${SRCDIR} |
74 | |
75 | mmake -j1 DESTDIR=${BINDIR} install || die |
76 | |
77 | # docs |
78 | minstalldocs survey.txt AUTHORS NEWS COPYING README ChangeLog TODO || die |
79 | |
80 | # confs |
81 | minstallconf distccd.confd-2.18.3 distccd || die |
82 | |
83 | cat >> "${BINDIR}/etc/conf.d/distccd" <<-EOF |
84 | |
85 | # Enable zeroconf support in distccd |
86 | DISTCCD_OPTS="\${DISTCCD_OPTS} --zeroconf" |
87 | EOF |
88 | |
89 | # init |
90 | minstallrc distccd.rc-2.18.3 distccd || die |
91 | |
92 | # config-tool |
93 | minstallexec -s distcc-config.sh /usr/bin/distcc-config || die |
94 | |
95 | # fix config-tool on 64bit arches |
96 | if [[ $(mlibdir) != lib ]] |
97 | then |
98 | sed -i "s:/usr/lib:/usr/$(mlibdir):g" ${BINDIR}/usr/bin/distcc-config || die |
99 | fi |
100 | |
101 | # remove gtk-client (split package!) |
102 | rm ${BINDIR}/usr/bin/distccmon-gnome || die |
103 | rm -r ${BINDIR}/usr/share/distcc || die |
104 | } |
105 | |
106 | src_install_distccmon-gnome() |
107 | { |
108 | cd ${SRCDIR} |
109 | mmake -j1 DESTDIR=${BINDIR} install || die |
110 | |
111 | # remove all other stuff but the gtk2 client |
112 | zapmost ${BINDIR} usr/bin/distccmon-gnome usr/share/distcc || die |
113 | } |
114 | |
115 | preinstall() |
116 | { |
117 | |
118 | # stop daemon since script is being updated |
119 | if [[ -n $(pidof distccd) ]] && [[ -x /etc/init.d/distccd ]] && |
120 | [[ -z ${MROOT} ]] || [[ ${MROOT} = / ]] |
121 | then |
122 | /etc/init.d/distccd stop |
123 | fi |
124 | |
125 | # add user distcc |
126 | ${MLIBDIR}/museradd -o "-u 240 -g daemon -s /bin/false -d /dev/null -c distccd" distcc |
127 | } |
128 | |
129 | postinstall() |
130 | { |
131 | # install dirs and set right permissions |
132 | install -o distcc -g daemon -d ${MROOT}/var/run/distccd |
133 | chown -R distcc:daemon ${MROOT}/var/run/distccd |
134 | |
135 | # installs compiler symlinks |
136 | if [ -x /usr/bin/distcc-config ] && \ |
137 | [[ -z ${MROOT} ]] || [[ ${MROOT} = / ]] |
138 | then |
139 | /usr/bin/distcc-config -i |
140 | else |
141 | echo "You *must* run distcc-config -i in the chroot of ${MROOT}" |
142 | fi |
143 | |
144 | # show current settings of distcc |
145 | if [ -x /usr/bin/distcc-config ] |
146 | then |
147 | /usr/bin/distcc-config -p |
148 | fi |
149 | |
150 | echo |
151 | echo "The --allow options must be set with this version of distcc." |
152 | echo "Please change /etc/conf.d/distccd to your needs." |
153 | echo |
154 | } |
Properties
Name | Value |
---|---|
svn:keywords | Id |