[arch-commits] Commit in sympow/trunk (PKGBUILD sympow.sh)
Antonio Rojas
arojas at archlinux.org
Sat Apr 25 21:58:10 UTC 2015
Date: Saturday, April 25, 2015 @ 23:58:10
Author: arojas
Revision: 132249
Allow generating new data as user
Added:
sympow/trunk/sympow.sh
Modified:
sympow/trunk/PKGBUILD
-----------+
PKGBUILD | 34 +++++++++++++++++-----------------
sympow.sh | 10 ++++++++++
2 files changed, 27 insertions(+), 17 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2015-04-25 21:17:42 UTC (rev 132248)
+++ PKGBUILD 2015-04-25 21:58:10 UTC (rev 132249)
@@ -3,24 +3,23 @@
pkgname=sympow
pkgver=1.018.1
-pkgrel=2
+pkgrel=3
pkgdesc="A a package to compute special values of symmetric power elliptic
curve L-functions"
-arch=('i686' 'x86_64')
+arch=(i686 x86_64)
url="http://www.sagemath.org"
-license=('GPL')
-depends=('glibc')
-makedepends=('pari')
-source=("http://www.sagemath.org/packages/upstream/$pkgname/$pkgname-$pkgver.tar.bz2")
-md5sums=('b6cbb7488870d70d92d11176049cb91b')
+license=(GPL)
+depends=(glibc)
+makedepends=(pari)
+source=("http://www.sagemath.org/packages/upstream/$pkgname/$pkgname-$pkgver.tar.bz2" 'sympow.sh')
+md5sums=('b6cbb7488870d70d92d11176049cb91b'
+ '93f214e7f22df8ae525d9fbfbf82eeb1')
prepare() {
cd $pkgname-$pkgver
-# fix segfault
- sed -e 's|"datafiles/param_data"|"/usr/lib/sympow/datafiles/param_data"|' -i disk.c -i generate.c
- sed -e 's|"datafiles/P"; int dl=9;|"/usr/lib/sympow/datafiles/P"; int dl=25;|' \
- -e 's|"datafiles/H"; int dl=9;|"/usr/lib/sympow/datafiles/H"; int dl=25;|' -i disk.c
+ sed -e "s|../sympow|sympow_bin|g" -i generate.c
+ sed -e "s|./sympow|sympow_bin|g" -i disk.c new_data
}
build() {
@@ -33,15 +32,16 @@
package() {
cd $pkgname-$pkgver
- mkdir -p "$pkgdir"/usr/lib/sympow
- mv sympow *.gp new_data datafiles "$pkgdir"/usr/lib/sympow
+ mkdir -p "$pkgdir"/usr/{bin,share/sympow}
+ cp -r *.gp datafiles "$pkgdir"/usr/share/sympow
+ cp sympow "$pkgdir"/usr/bin/sympow_bin
+ cp new_data "$pkgdir"/usr/bin/new_data
- cd "$pkgdir"/usr/lib/sympow/datafiles
+ cd "$pkgdir"/usr/share/sympow/datafiles
for file in *.txt; do
- ../sympow -txt2bin "$(grep -c AT $file)" <$file ${file/txt/bin}
+ "$srcdir"/$pkgname-$pkgver/sympow -txt2bin "$(grep -c AT $file)" <$file ${file/txt/bin}
done
- mkdir -p "$pkgdir"/usr/bin
- ln -s /usr/lib/sympow/sympow "$pkgdir"/usr/bin/sympow
+ install -Dm755 "$srcdir"/sympow.sh "$pkgdir"/usr/bin/sympow
}
Added: sympow.sh
===================================================================
--- sympow.sh (rev 0)
+++ sympow.sh 2015-04-25 21:58:10 UTC (rev 132249)
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+SYMPOW_LOCAL="$HOME"/.local/share/sympow
+
+if [ ! -d "${SYMPOW_LOCAL}" ]; then
+ mkdir -p "${SYMPOW_LOCAL}"
+ cp -r /usr/share/sympow/* "${SYMPOW_LOCAL}"
+fi
+cd "$SYMPOW_LOCAL"
+exec sympow_bin "$@"
More information about the arch-commits
mailing list