summaryrefslogtreecommitdiff
path: root/libre/cgminer-libre
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-04-07 00:46:34 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-04-07 00:46:34 -0400
commit619b8d955269f2fe74386e98fac07675c8b55352 (patch)
treef3e2610a39c99a7e43bc2b345280b04e398b986a /libre/cgminer-libre
parent2b04539ac9310541a4e563460aed0cb7715770d2 (diff)
parent7d4e98b2d6f2fd4d42ebb55105bab8a05e34ab94 (diff)
downloadabslibre-619b8d955269f2fe74386e98fac07675c8b55352.tar.gz
abslibre-619b8d955269f2fe74386e98fac07675c8b55352.tar.bz2
abslibre-619b8d955269f2fe74386e98fac07675c8b55352.zip
Merge branch 'master' of ssh://parabolagnulinux.org:1863/srv/git/abslibre
Diffstat (limited to 'libre/cgminer-libre')
-rw-r--r--libre/cgminer-libre/PKGBUILD57
-rw-r--r--libre/cgminer-libre/cgminer.conf.d11
-rw-r--r--libre/cgminer-libre/cgminer.service8
3 files changed, 76 insertions, 0 deletions
diff --git a/libre/cgminer-libre/PKGBUILD b/libre/cgminer-libre/PKGBUILD
new file mode 100644
index 000000000..e9ca63637
--- /dev/null
+++ b/libre/cgminer-libre/PKGBUILD
@@ -0,0 +1,57 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars@gmail.com>
+# Contributor: monson <holymonson@gmail.com>
+# Contributor: Thomas Dziedzic < gostrc at gmail >
+# Contributor: David Manouchehri <david@davidmanouchehri.com>
+# Maintainer (Parabola): Márcio Silva <coadde@lavabit.com>
+
+pkgname=cgminer-libre
+_pkgflag=libre
+pkgver=2.11.3
+_build=
+pkgrel=1
+pkgdesc="Multi-threaded multi-pool CPU and GPU miner for bitcoin, forked from cpuminer, with free OpenCL support."
+url='http://forum.bitcoin.org/index.php?topic=28402.0'
+license=('GPL3')
+arch=('i686' 'x86_64' 'mips64el')
+depends=('curl' 'libcl-libre')
+makedepends=('opencl-headers')
+provides=(${pkgname%-$_pkgflag}=$pkgver)
+conflicts=${pkgname%-$_pkgflag}
+replaces=${pkgname%-$_pkgflag}
+source=("http://ck.kolivas.org/apps/${pkgname%-$_pkgflag}/${pkgname%-$_pkgflag}-$pkgver.tar.bz2"
+ "${pkgname%-$_pkgflag}.conf.d"
+ "${pkgname%-$_pkgflag}.service")
+backup=("etc/conf.d/${pkgname%-$_pkgflag}" "etc/${pkgname%-$_pkgflag}.conf")
+
+[ "$CARCH" == "x86_64" ] && makedepends+=('yasm')
+
+build() {
+ cd "$srcdir"
+ cd ${pkgname%-$_pkgflag}-$pkgver${_build}
+
+ # Use in-tree jansson since it is not compatible with jansson 2.0
+ #sed -e 's/^AC_CHECK_LIB(jansson, json_loads, request_jansson=false, request_jansson=true)$/request_jansson=true/' -i configure.ac
+
+ # Here you may want to use custom CFLAGS
+ #export CFLAGS="-O2 -march=native -mtune=native -msse2"
+
+ ./configure --prefix=/usr --enable-cpumining --disable-adl
+
+ make
+}
+
+package() {
+ cd "$srcdir"/${pkgname%-$_pkgflag}-$pkgver${_build}
+
+ make DESTDIR="$pkgdir" install
+
+ install -Dm644 "$srcdir"/${pkgname%-$_pkgflag}.service "$pkgdir"/usr/lib/systemd/system/${pkgname%-$_pkgflag}.service
+ install -Dm644 "$srcdir"/${pkgname%-$_pkgflag}.conf.d "$pkgdir"/etc/conf.d/${pkgname%-$_pkgflag}
+ sed 's#/usr/local/bin#/usr/bin#g' example.conf > ${pkgname%-$_pkgflag}.conf
+ install -Dm644 ${pkgname%-$_pkgflag}.conf "$pkgdir"/etc/${pkgname%-$_pkgflag}.conf
+}
+
+md5sums=('fd2c69f943353fbc9723a5526d82c1b6'
+ 'fe4a243fabe24608f5c05e40f0f118f6'
+ 'bd76fc92fedce18c59ccea2aa79cc664')
diff --git a/libre/cgminer-libre/cgminer.conf.d b/libre/cgminer-libre/cgminer.conf.d
new file mode 100644
index 000000000..88ec535d6
--- /dev/null
+++ b/libre/cgminer-libre/cgminer.conf.d
@@ -0,0 +1,11 @@
+# Use JSON-format configuration. (recommended)
+CGMINER_CONF="/etc/cgminer.conf"
+
+# Uncommend this if you prefer simple command-line arguments.
+#CGMINER_CONF=""
+#CGMINER_PROTOCOL="http"
+#CGMINER_IP="127.0.0.1"
+#CGMINER_PORT="8332"
+#CGMINER_USER="username"
+#CGMINER_PASS="password"
+CGMINER_ARGS="--syslog"
diff --git a/libre/cgminer-libre/cgminer.service b/libre/cgminer-libre/cgminer.service
new file mode 100644
index 000000000..84461879f
--- /dev/null
+++ b/libre/cgminer-libre/cgminer.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=Multi-threaded multi-pool CPU and GPU miner for bitcoin
+
+[Service]
+ExecStart=/usr/bin/cgminer -T --config /etc/cgminer.conf --syslog
+
+[Install]
+WantedBy=multi-user.target