summaryrefslogtreecommitdiff
path: root/libre/cgminer-libre/PKGBUILD
blob: cc374980031f15e00a71b9ff3ba48b451713d39e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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.4
_build=
pkgrel=1
pkgdesc="Multi-threaded multi-pool CPU and GPU miner for bitcoin, forked from cpuminer, without nonfree OpenCL recommendation"
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 --enable-scrypt --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=('535ca85b504bd408d1eeddf4962ed685'
         'fe4a243fabe24608f5c05e40f0f118f6'
         'bd76fc92fedce18c59ccea2aa79cc664')