/[gentoo-x86]/sci-misc/boinc/boinc-6.2.15.ebuild
Gentoo

Contents of /sci-misc/boinc/boinc-6.2.15.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Sat Jan 31 15:19:36 2009 UTC (11 years ago) by scarabeus
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
Version bump. Remove old cruft. Per bug #251766.
(Portage version: 2.2_rc23/cvs/Linux x86_64)

1 # Copyright 1999-2008 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sci-misc/boinc/boinc-6.2.15.ebuild,v 1.3 2008/11/28 00:06:59 scarabeus Exp $
4
5 EAPI="1"
6
7 inherit depend.apache flag-o-matic wxwidgets autotools
8
9 MY_PV="${PV//./_}"
10 DESCRIPTION="The Berkeley Open Infrastructure for Network Computing"
11 HOMEPAGE="http://boinc.ssl.berkeley.edu/"
12 SRC_URI="http://dev.gentooexperimental.org/~scarabeus/${P}.tar.bz2
13 bindist? ( amd64? ( http://${PN}dl.ssl.berkeley.edu/dl/${P/-/_}_x86_64-pc-linux-gnu.sh )
14 x86? ( http://${PN}dl.ssl.berkeley.edu/dl/${P/-/_}_i686-pc-linux-gnu.sh )
15 )"
16
17 LICENSE="LGPL-2.1"
18 SLOT="0"
19 KEYWORDS="~amd64 ~ia64 ~ppc ~sparc ~x86"
20 IUSE="X bindist server unicode"
21 # bindist is only for x86 and amd64 for rest package.use.mask
22
23 RDEPEND="sys-libs/zlib
24 >=net-misc/curl-7.15.5
25 >=dev-libs/openssl-0.9.7
26 X? ( =x11-libs/wxGTK-2.8* )
27 server? (
28 !bindist? (
29 >=virtual/mysql-4.0
30 virtual/php
31 >=dev-lang/python-2.2.3
32 >=dev-python/mysql-python-0.9.2
33 )
34 )"
35 DEPEND="app-misc/ca-certificates
36 !bindist? (
37 >=sys-devel/gcc-3.0.4
38 >=sys-devel/autoconf-2.58
39 >=sys-devel/automake-1.8
40 >=dev-util/pkgconfig-0.15
41 >=sys-devel/m4-1.4
42 )
43 X? ( x11-libs/libXmu
44 x11-libs/libXt
45 x11-libs/libX11
46 x11-proto/xproto
47 media-libs/freeglut
48 virtual/glu
49 media-libs/jpeg )
50 server? ( !bindist? ( virtual/imap-c-client ) )
51 ${RDEPEND}"
52 # subversion is not needed only if user choose binary for amd64 or x86
53 want_apache server
54
55 LANGS="ar be bg ca cs da de el en_US es eu fi fr hr hu it ja lt lv nb nl pl pt pt_BR ro ru sk sl sv_SE tr uk zh_CN zh_TW"
56 for LNG in ${LANGS}; do
57 IUSE="${IUSE} linguas_${LNG}"
58 done
59
60 src_unpack() {
61 local target
62
63 if ! use bindist; then
64 unpack ${P}.tar.bz2
65 cd "${S}"
66 # replace CXXFLAGS, those added are suggested by upstream
67 sed -i \
68 -e "s:-O3 -fomit-frame-pointer -fforce-addr -ffast-math \$(AM_CPPFLAGS):\$(AM_CPPFLAGS) -O3 -funroll-loops -fforce-addr -ffast-math:" \
69 client/Makefile.am || die "sed client/Makefile.am failed"
70 # silence warnings
71 epatch "${FILESDIR}"/"${P}"-project-list-size.patch
72 epatch "${FILESDIR}"/"${P}"-mute-warnings.patch
73 # do autoreconf
74 rm "${S}"/m4/libtool.m4
75 AT_M4DIR="m4" eautoreconf
76 else
77 use server && elog "Server feature is working only for source build, please disable bindist if you really intend to use server."
78 use x86 && target="i686" || target="x86_64"
79 cp "${DISTDIR}"/${P/-/_}_${target}-pc-linux-gnu.sh "${WORKDIR}"
80 cd "${WORKDIR}"
81 sh ${P/-/_}_${target}-pc-linux-gnu.sh
82 fi
83 # patch up certificates
84 mkdir "${S}"/curl/
85 ln -s /etc/ssl/certs/ca-certificates.crt "${S}"/curl/ca-bundle.crt
86 sed -i \
87 -e "s:::g" \
88 "${S}"/Makefile
89 }
90
91 src_compile() {
92 if ! use bindist; then
93 if use X; then
94 WX_GTK_VER=2.8
95 use unicode && need-wxwidgets unicode || need-wxwidgets gtk2
96 wxconf="--with-wx-config=${WX_CONFIG}"
97 fi
98
99 econf \
100 --enable-client \
101 --with-ssl \
102 ${wxconf} \
103 $(use_enable unicode) \
104 $(use_enable server) \
105 $(use_with X x) || die "econf failed"
106
107 # Make it link to the compiled libs, not the installed ones
108 # remove precompiled binaries from svn
109 sed -i \
110 -e "s:LDFLAGS = :LDFLAGS = -L../lib :g" \
111 */Makefile || die "sed failed"
112 emake -j1 || die "emake failed"
113 fi
114 }
115
116 src_install() {
117 dodir /var/lib/${PN}
118 newinitd "${FILESDIR}"/${PN}.init ${PN}
119 newconfd "${FILESDIR}"/${PN}.conf ${PN}
120 if ! use bindist; then
121 make install DESTDIR="${D}" || die "make install failed"
122 # icon
123 newicon "${S}"/sea/${PN}mgr.48x48.png ${PN}.png
124 # wrapper to allow gui to load gui_rpc_auth.cfg because ${PN} devs assume curdir to be datadir for ${PN}_gui
125 mv "${D}"/usr/bin/${PN}_gui "${D}"/usr/bin/${PN}mgr
126 echo "cd \"/var/lib/${PN}\" && exec /usr/bin/${PN}mgr \$@" > "${D}"/usr/bin/${PN}_gui
127 chmod 755 "${D}"/usr/bin/${PN}_gui
128 # desktop
129 if use X; then
130 make_desktop_entry ${PN}_gui ${PN} ${PN} "Education;Science" /var/lib/${PN}
131 fi
132 # required headers by seti@home
133 insopts -m0644
134 insinto /usr/include/${PN}
135 doins "${S}"/api/{reduce.h,graphics_api.h,graphics_data.h,${PN}_gl.h}
136 # symlink locale so it actualy work for source dist.
137 insinto /usr/share/locale/
138 cd "${S}"/locale/client
139 for LNG in ${LINGUAS}; do
140 doins -r ${LNG}
141 done
142 dosym /usr/share/locale /var/lib/${PN}/locale
143 cd "${S}"
144 else
145 local S_BIN="${WORKDIR}"/BOINC
146 cd "${S_BIN}"
147 # fix ${PN}.conf file for binary package
148 sed -i -e "s:/usr/bin/${PN}_client:/opt/${PN}/${PN}:g" "${D}"/etc/conf.d/${PN}
149 if use X; then
150 # icon
151 newicon "${S_BIN}"/${PN}mgr.48x48.png ${PN}.png
152 # desktop
153 make_desktop_entry /opt/${PN}/run_manager "${PN}" ${PN} "Education;Science" /var/lib/${PN}
154 fi
155 # use correct path in scripts
156 sed -i \
157 -e "s:${S_BIN}:/var/lib/${PN}:g" \
158 -e "s:./${PN}:/opt/${PN}/${PN}:g" \
159 run_client || die "sed run_client failed"
160 sed -i \
161 -e "s:${S_BIN}:/var/lib/${PN}:g" \
162 -e "s:./${PN}mgr:/opt/${PN}/${PN}mgr:g" \
163 run_manager || die "sed run_manager failed"
164 # install binaries
165 exeopts -m0755
166 exeinto /opt/${PN}
167
168 doexe "${S_BIN}"//{${PN},${PN}_cmd,${PN}cmd,${PN}mgr,run_client,run_manager}
169 fowners 0:${PN} /opt/${PN}/{${PN},${PN}_cmd,${PN}cmd,${PN}mgr,run_client,run_manager}
170 # locale
171 mkdir -p "${D}"/opt/${PN}/locale
172 insopts -m0644
173 insinto /opt/${PN}/
174 cd "${S_BIN}"/locale/
175 for LNG in ${LINGUAS}; do
176 doins -r "${LNG}"
177 done
178 dosym /opt/${PN}/locale /var/lib/${PN}/locale
179 cd "${S}"
180 fi
181 dosym /etc/ssl/certs/ca-certificates.crt /var/lib/${PN}/ca-bundle.crt
182 insopts -m0640
183 insinto /var/lib/${PN}
184 doins "${FILESDIR}"/gui_rpc_auth.cfg
185 fowners ${PN}:${PN} /var/lib/${PN}/gui_rpc_auth.cfg
186 fowners ${PN}:${PN} /var/lib/${PN}/
187 }
188
189 pkg_preinst() {
190 enewgroup ${PN}
191 enewuser ${PN} -1 -1 /var/lib/${PN} ${PN}
192 }
193
194 pkg_postinst() {
195 echo
196 if use bindist; then
197 elog "You are using the binary distributed version."
198 elog "The manager can be found at /opt/${PN}/run_manager"
199 fi
200 elog "You need to attach to a project to do anything useful with ${PN}."
201 elog "You can do this by running /etc/init.d/${PN} attach"
202 elog "${PN} The howto for configuration is located at:"
203 elog "http://${PN}.berkeley.edu/anonymous_platform.php"
204 if use server && ! use bindist ; then
205 echo
206 elog "You have chosen to enable server mode. this ebuild has installed"
207 elog "the necessary packages to be a server. You will need to have a"
208 elog "project. Contact ${PN} directly for further information."
209 fi
210 echo
211 # Add warning about the new password for the client, bug 121896.
212 elog "If you need to use the graphical client the password is in"
213 elog "/var/lib/${PN}/gui_rpc_auth.cfg which is for first run empty."
214 elog "You should change this to something more secure."
215 echo
216 }

  ViewVC Help
Powered by ViewVC 1.1.20