Gentoo Archives: gentoo-commits

From: Ian Stakenvicius <axs@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-biology/foldingathome/
Date: Fri, 24 Apr 2020 21:09:34
Message-Id: 1587762558.4c0751916936840cb32736e393045aaa21dc0294.axs@gentoo
1 commit: 4c0751916936840cb32736e393045aaa21dc0294
2 Author: Ian Stakenvicius <axs <AT> gentoo <DOT> org>
3 AuthorDate: Fri Apr 24 19:49:15 2020 +0000
4 Commit: Ian Stakenvicius <axs <AT> gentoo <DOT> org>
5 CommitDate: Fri Apr 24 21:09:18 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c075191
7
8 sci-biology/foldingathome: version bump
9
10 Trivial version bump, per bug comments; thanks for testing!
11
12 Closes: https://bugs.gentoo.org/718584
13 Package-Manager: Portage-2.3.89, Repoman-2.3.20
14 Signed-off-by: Ian Stakenvicius <axs <AT> gentoo.org>
15
16 sci-biology/foldingathome/Manifest | 1 +
17 .../foldingathome/foldingathome-7.6.9.ebuild | 140 +++++++++++++++++++++
18 2 files changed, 141 insertions(+)
19
20 diff --git a/sci-biology/foldingathome/Manifest b/sci-biology/foldingathome/Manifest
21 index e611180008f..d61a17ed13f 100644
22 --- a/sci-biology/foldingathome/Manifest
23 +++ b/sci-biology/foldingathome/Manifest
24 @@ -1 +1,2 @@
25 DIST fahclient_7.5.1-64bit-release.tar.bz2 3438239 BLAKE2B 69fb60cdd5356fe4f5ad1f106b67d078baf0394c5d3c474dff2f1ac840bcb31bfd9ca9a9c6112b9ee9497dcdc223732627a21c50b455e46c096a52587d5d229b SHA512 5f6f2f882d57fe53ad0a55b48f09fc3803af6aebbbf0e92be39477d4c4da92237d6edabec61dd8183678bdcfe3923ff9b0938647a77edc2c69ce8958defcfdf1
26 +DIST fahclient_7.6.9-64bit-release.tar.bz2 3962851 BLAKE2B 896ca7cdd1357bb37cd8a5c438223c398c5f8c6bde7f7302d0e62ccff603b9a3dd3fb348bd021b9654867eb8f2579c91cfe87e3229b365620b383a4f261ae5f4 SHA512 0a360d8a985d3d538922a2d9519b70845a568f7d052c3047e7f847865165e9cd6e741016ee00496161ca3c2115beef34e95ab594d0f864bccc0fe12de6886f19
27
28 diff --git a/sci-biology/foldingathome/foldingathome-7.6.9.ebuild b/sci-biology/foldingathome/foldingathome-7.6.9.ebuild
29 new file mode 100644
30 index 00000000000..cb7ce89a604
31 --- /dev/null
32 +++ b/sci-biology/foldingathome/foldingathome-7.6.9.ebuild
33 @@ -0,0 +1,140 @@
34 +# Copyright 1999-2020 Gentoo Authors
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI=6
38 +
39 +inherit versionator user systemd
40 +
41 +DESCRIPTION="Folding@Home is a distributed computing project for protein folding"
42 +HOMEPAGE="https://foldingathome.org/"
43 +SRC_URI="https://download.foldingathome.org/releases/public/release/fahclient/centos-6.7-64bit/v$(get_version_component_range 1-2)/fahclient_${PV}-64bit-release.tar.bz2"
44 +
45 +RESTRICT="mirror bindist strip"
46 +
47 +LICENSE="FAH-EULA-2014 FAH-special-permission"
48 +SLOT="0"
49 +KEYWORDS="~amd64"
50 +IUSE=""
51 +# Expressly listing all deps, as this is a binpkg and it is doubtful whether
52 +# i.e. uclibc or clang can provide what is necessary at runtime
53 +DEPEND="dev-util/patchelf"
54 +RDEPEND="app-arch/bzip2
55 + || (
56 + dev-libs/openssl-compat:1.0.0
57 + =dev-libs/openssl-1.0*:*
58 + )
59 + sys-devel/gcc
60 + sys-libs/glibc
61 + sys-libs/zlib
62 + acct-group/video
63 +"
64 +
65 +S="${WORKDIR}/fahclient_${PV}-64bit-release"
66 +
67 +QA_PREBUILT="opt/foldingathome/*"
68 +
69 +pkg_setup() {
70 + elog ""
71 + elog "Special permission is hereby granted to the Gentoo project to provide an"
72 + elog "automated installer package which downloads and installs the Folding@home client"
73 + elog "software. Permission is also granted for future Gentoo installer packages on the"
74 + elog "condition that they continue to adhere to all of the terms of the accompanying"
75 + elog "Folding@home license agreements and display this notice."
76 + elog "-- Vijay S. Pande, Stanford University, 07 May 2013"
77 + elog ""
78 + elog "(ref: http://foldingforum.org/viewtopic.php?f=16&t=22524&p=241992#p241992 )"
79 + elog ""
80 +
81 + enewgroup foldingathome
82 + enewuser foldingathome -1 -1 "${EPREFIX}"/opt/foldingathome video
83 +}
84 +
85 +src_install() {
86 + patchelf --set-rpath "${EPREFIX}/opt/foldingathome" FAHClient || die
87 + patchelf --set-rpath "${EPREFIX}/opt/foldingathome" FAHCoreWrapper || die
88 +
89 + dosym "../../usr/$(get_libdir)/libssl.so.1.0.0" /opt/foldingathome/libssl.so.10
90 + dosym "../../usr/$(get_libdir)/libcrypto.so.1.0.0" /opt/foldingathome/libcrypto.so.10
91 +
92 + exeinto /opt/foldingathome
93 + doexe {FAHClient,FAHCoreWrapper}
94 +
95 + insinto /opt/foldingathome
96 + doins sample-config.xml
97 +
98 + newconfd "${FILESDIR}"/7.3/folding-conf.d foldingathome
99 + cat <<EOF >"${T}"/fah-init
100 +#!/sbin/openrc-run
101 +# Copyright 1999-2020 Gentoo Authors
102 +# Distributed under the terms of the GNU General Public License v2
103 +
104 +start_stop_daemon_args="--chdir \"${EPREFIX}/opt/foldingathome\""
105 +command="${EPREFIX}/opt/foldingathome/FAHClient"
106 +command_args="\${FOLD_OPTS}"
107 +command_user=foldingathome
108 +command_background=1
109 +pidfile="\${PIDFILE}"
110 +EOF
111 + newinitd "${T}"/fah-init foldingathome
112 +
113 + cat <<EOF >"${T}"/fah-init.service
114 +[Unit]
115 +Description=Folding@Home V7 Client
116 +Documentation=https://foldingathome.org
117 +
118 +[Service]
119 +Type=simple
120 +User=foldingathome
121 +Group=foldingathome
122 +Nice=19
123 +WorkingDirectory=${EPREFIX}/opt/foldingathome
124 +ExecStart=${EPREFIX}/opt/foldingathome/FAHClient --fork=false --pid=false --respawn=false --service=false
125 +NoNewPrivileges=yes
126 +PrivateTmp=yes
127 +ProtectControlGroups=yes
128 +ProtectSystem=full
129 +RestrictRealtime=true
130 +ProtectControlGroups=yes
131 +
132 +[Install]
133 +WantedBy=multi-user.target
134 +EOF
135 + systemd_newunit "${T}"/fah-init.service foldingathome.service
136 +
137 + fowners -R foldingathome:foldingathome /opt/foldingathome
138 +}
139 +
140 +pkg_postinst() {
141 + elog "To run Folding@home in the background at boot:"
142 + elog "(openrc)\trc-update add foldingathome default"
143 + elog "(systemd)\tsystemctl enable foldingathome"
144 + elog ""
145 + if [ ! -e "${EPREFIX}"/opt/foldingathome/config.xml ]; then
146 + elog "No config.xml file found -- please run"
147 + elog "emerge --config ${P} to configure your client, or specify"
148 + elog "all necessary runtime options in FOLD_OPTS within"
149 + elog "${EPREFIX}/etc/conf.d/foldingathome"
150 + elog ""
151 + fi
152 + if [[ -n ${REPLACING_VERSIONS} ]]; then
153 + elog "NOTE, the 'initfolding' helper script has been dropped, please"
154 + elog "use emerge --config ${P} or run FAHClient --configure directly"
155 + elog "and adjust file permissions and ownership yourself"
156 + elog ""
157 + fi
158 + elog "Please see ${EPREFIX}/opt/foldingathome/FAHClient --help for more details."
159 + einfo ""
160 + einfo "The original package maintainer encourages you to acquire a username and join team 36480."
161 + einfo "http://folding.stanford.edu/English/Download#ntoc2"
162 + einfo ""
163 +}
164 +
165 +pkg_postrm() {
166 + elog "Folding@home data files were not removed."
167 + elog "Remove them manually from ${EPREFIX}/opt/foldingathome"
168 +}
169 +
170 +pkg_config() {
171 + cd "${EPREFIX}"/opt/foldingathome || die
172 + su foldingathome -s /bin/sh -c "./FAHClient --configure"
173 +}