summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorlily wilson2015-06-11 16:27:07 -0400
committerlily wilson2015-06-11 16:27:07 -0400
commitb64f93d8562ddd374c116c37ae370b41a78f3825 (patch)
tree3a01d19d819594722d271c21a5746e84240d1ffa
downloadaur-yafu.tar.gz
Initial import
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD44
2 files changed, 61 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..6b6aaf6ec25
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = yafu
+ pkgdesc = Automated integer factorization
+ pkgver = 1.34.3
+ pkgrel = 2
+ url = http://yafu.sourceforge.net/
+ arch = i686
+ arch = x86_64
+ license = custom
+ depends = gmp
+ depends = gmp-ecm
+ source = http://sourceforge.net/projects/yafu/files/1.34/yafu-1.34-src.zip
+ source = http://downloads.sourceforge.net/project/msieve/msieve/Msieve%20v1.52/msieve152.tar.gz
+ sha1sums = 110553dece04ea010857c50207874c04a2b3e58d
+ sha1sums = 88a1ce2354b57835231bcaca0ecb0477b975b5cd
+
+pkgname = yafu
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..16dd3785149
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,44 @@
+pkgname=yafu
+pkgver=1.34.3
+_msievever=1.52
+_filenamever=1.34
+pkgrel=2
+pkgdesc="Automated integer factorization"
+arch=('i686' 'x86_64')
+depends=('gmp' 'gmp-ecm')
+url="http://${pkgname}.sourceforge.net/"
+license=('custom')
+source=("http://sourceforge.net/projects/${pkgname}/files/${_filenamever}/${pkgname}-${_filenamever}-src.zip"
+ "http://downloads.sourceforge.net/project/msieve/msieve/Msieve%20v${_msievever}/msieve${_msievever/./}.tar.gz")
+sha1sums=('110553dece04ea010857c50207874c04a2b3e58d'
+ '88a1ce2354b57835231bcaca0ecb0477b975b5cd')
+
+prepare() {
+ cd "${srcdir}/msieve-${_msievever}"
+ sed -e 's/CFLAGS = /CFLAGS += /' \
+ -e 's/-march=core2//g' \
+ -i Makefile
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ sed -e 's/CFLAGS = /CFLAGS += /' \
+ -e 's/..\/msieve\/lib\/linux\/x86_64/..\/msieve-'"${_msievever}"'\//' \
+ -e 's/-lmsieve/-lmsieve -lz/' \
+ -i Makefile
+}
+
+build() {
+ _CFLAGS=$CFLAGS
+ cd "${srcdir}/msieve-${_msievever}"
+ [[ $CARCH = i686 ]] && CFLAGS+=' -msse'
+ CFLAGS+=' -fopenmp'
+ make all ECM=1
+ CFLAGS=$_CFLAGS
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make NFS=1 $CARCH
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ install -D -m755 yafu "${pkgdir}/usr/bin/yafu"
+ head -n18 factor/factor_common.c|tail -n+2>LICENSE
+ install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}