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