diff options
author | Maxime Gauduin | 2020-04-17 13:35:22 +0200 |
---|---|---|
committer | Maxime Gauduin | 2020-04-17 13:35:22 +0200 |
commit | d6dac582292af9d594c9d8bf7f9b6a4f8e56fa4c (patch) | |
tree | 8592c42afa8ab87956d2fe5eaa6e4f49c22e3aa9 | |
parent | dcf2475db8254283118d002a597ac1d707f98319 (diff) | |
download | aur-d6dac582292af9d594c9d8bf7f9b6a4f8e56fa4c.tar.gz |
don't run as root
-rw-r--r-- | .SRCINFO | 24 | ||||
-rw-r--r-- | PKGBUILD | 69 | ||||
-rw-r--r-- | foldingathome.install | 10 | ||||
-rw-r--r-- | foldingathome.service | 9 |
4 files changed, 53 insertions, 59 deletions
@@ -1,22 +1,22 @@ pkgbase = foldingathome - pkgdesc = Folding@Home is a distributed computing project which studies protein folding, misfolding, aggregation, and related diseases. + pkgdesc = A distributed computing project for simulating protein dynamics pkgver = 7.5.1 - pkgrel = 1 - url = http://folding.stanford.edu/ - install = foldingathome.install + pkgrel = 2 + url = https://foldingathome.org/ arch = x86_64 - license = CUSTOM + license = custom + depends = gcc-libs depends = glibc - optdepends = opencl-nvidia: for folding with an nVidia GPU - optdepends = cuda: for folding with an nVidia GPU - optdepends = opencl-mesa: for folding with an older AMD GPU + depends = zlib + optdepends = cuda: for folding with an NVIDIA GPU optdepends = opencl-amd: for folding with a newer AMD GPU - conflicts = foldingathome-v7 - replaces = foldingathome-v7 + optdepends = opencl-mesa: for folding with an older AMD GPU + optdepends = opencl-nvidia: for folding with an NVIDIA GPU + backup = etc/foldingathome/config.xml source = https://download.foldingathome.org/releases/public/release/fahclient/debian-stable-64bit/v7.5/fahclient_7.5.1-64bit-release.tar.bz2 source = foldingathome.service - md5sums = 5353688a1c5cb0a226ce8e24b8ecb771 - md5sums = dd55dbae3fbe56f90bed0e40f2b0de3c + sha256sums = 69a2562a4bc30bf10e1954bedd8b96aaf57df7eafcfca828f29304fbbbc2521f + sha256sums = 8ddb89e8f9e9d66fc690a54b1d1c19e83cfdff29e198c5d31a7c485f451005a3 pkgname = foldingathome @@ -1,42 +1,41 @@ -# Contributor: paul2lv [at] gmail dot com -# Maintainer: +# Maintainer: Maxime Gauduin <alucryd@archlinux.org> +# Contributor: paul2lv <paul2lv@gmail.com> +# Contributor: dtw <dibblethewrecker@gmail.com> pkgname=foldingathome pkgver=7.5.1 -pkgrel=1 -pkgdesc="Folding@Home is a distributed computing project which studies protein folding, misfolding, aggregation, and related diseases." -arch=('x86_64') -url="http://folding.stanford.edu/" -license=('CUSTOM') -depends=('glibc') -optdepends=('opencl-nvidia: for folding with an nVidia GPU' - 'cuda: for folding with an nVidia GPU' - 'opencl-mesa: for folding with an older AMD GPU' - 'opencl-amd: for folding with a newer AMD GPU') -replaces=('foldingathome-v7') -conflicts=('foldingathome-v7') -install=foldingathome.install - -# Moronic server -DLAGENTS=("https::/usr/bin/curl -k -o %o %u") - -source=(https://download.foldingathome.org/releases/public/release/fahclient/debian-stable-64bit/v7.5/fahclient_7.5.1-64bit-release.tar.bz2 -foldingathome.service) - md5sums=('5353688a1c5cb0a226ce8e24b8ecb771' 'dd55dbae3fbe56f90bed0e40f2b0de3c') - +pkgrel=2 +pkgdesc='A distributed computing project for simulating protein dynamics' +arch=(x86_64) +url=https://foldingathome.org/ +license=(custom) +depends=( + gcc-libs + glibc + zlib +) +optdepends=( + 'cuda: for folding with an NVIDIA GPU' + 'opencl-amd: for folding with a newer AMD GPU' + 'opencl-mesa: for folding with an older AMD GPU' + 'opencl-nvidia: for folding with an NVIDIA GPU' +) +backup=(etc/foldingathome/config.xml) +source=( + https://download.foldingathome.org/releases/public/release/fahclient/debian-stable-64bit/v${pkgver%.*}/fahclient_${pkgver}-64bit-release.tar.bz2 + foldingathome.service +) +sha256sums=('69a2562a4bc30bf10e1954bedd8b96aaf57df7eafcfca828f29304fbbbc2521f' + '8ddb89e8f9e9d66fc690a54b1d1c19e83cfdff29e198c5d31a7c485f451005a3') package() { - cd ${srcdir} - - install -D -c -m755 fahclient_${pkgver}-64bit-release/FAHClient ${pkgdir}/opt/fah/FAHClient - install -D -c -m755 fahclient_${pkgver}-64bit-release/FAHCoreWrapper ${pkgdir}/opt/fah/FAHCoreWrapper - install -D -c -m755 fahclient_${pkgver}-64bit-release/sample-config.xml ${pkgdir}/opt/fah/sample-config.xml - - chmod 755 ${pkgdir}/opt/fah/FAHClient - chmod 755 ${pkgdir}/opt/fah/FAHCoreWrapper - install -D -m644 fahclient_${pkgver}-64bit-release/copyright ${pkgdir}/usr/share/licenses/${pkgname}/copyright - install -D -m644 fahclient_${pkgver}-64bit-release/README.md ${pkgdir}/opt/fah/README.md - install -D -m644 fahclient_${pkgver}-64bit-release/CHANGELOG.md ${pkgdir}/opt/fah/CHANGELOG.md - install -D -m644 ${srcdir}/foldingathome.service ${pkgdir}/usr/lib/systemd/system/foldingathome.service + install -Dm 755 fahclient_${pkgver}-64bit-release/FAHClient -t "${pkgdir}"/usr/bin/ + install -Dm 755 fahclient_${pkgver}-64bit-release/FAHCoreWrapper -t "${pkgdir}"/usr/bin/ + install -Dm 644 fahclient_${pkgver}-64bit-release/CHANGELOG.md -t "${pkgdir}"/usr/share/doc/foldingathome/ + install -Dm 644 fahclient_${pkgver}-64bit-release/README.md -t "${pkgdir}"/usr/share/doc/foldingathome/ + install -Dm 644 fahclient_${pkgver}-64bit-release/copyright -t "${pkgdir}"/usr/share/licenses/foldingathome/ + install -Dm 644 fahclient_${pkgver}-64bit-release/sample-config.xml "${pkgdir}"/etc/foldingathome/config.xml + install -Dm 644 foldingathome.service -t "${pkgdir}"/usr/lib/systemd/system/ } +# vim: ts=2 sw=2 et: diff --git a/foldingathome.install b/foldingathome.install deleted file mode 100644 index d48431453e1f..000000000000 --- a/foldingathome.install +++ /dev/null @@ -1,10 +0,0 @@ -post_install() { - cat << 'EOM' - --> Please cd to /opt/fah/ and execute ./FAHClient --configure - --> as root to configure your settings. If you are using systemd, - --> then run "systemctl enable foldingathome.service" to enable - --> the folding service. If you would like join the Arch Linux - --> team, use team number 45032. -EOM -} - diff --git a/foldingathome.service b/foldingathome.service index 5219a6317ca8..3218b2409559 100644 --- a/foldingathome.service +++ b/foldingathome.service @@ -4,8 +4,13 @@ After=network.target [Service] Type=simple -WorkingDirectory=/opt/fah -ExecStart=/opt/fah/FAHClient --config /opt/fah/config.xml --exec-directory=/opt/fah --data-directory=/opt/fah +User=fah +DynamicUser=yes +StateDirectory=fah +WorkingDirectory=/var/lib/fah +ReadWritePaths=/etc/foldingathome/config.xml +ExecStartPre=/usr/bin/cp /etc/foldingathome/config.xml /var/lib/fah/ +ExecStart=/usr/bin/FAHClient [Install] WantedBy=multi-user.target |