summaryrefslogtreecommitdiff
path: root/libre/cgminer-libre/PKGBUILD
blob: 575ea2d559ee585c5b35c20e5afdc254fd6c64af (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
# $Id: PKGBUILD 90344 2013-05-11 16:51:20Z fyan $
# 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=3.1.1
pkgrel=1
pkgdesc="Multi-threaded multi-pool GPU, FPGA and ASIC miner for bitcoin and derivative coins, 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=("https://github.com/ckolivas/${pkgname%-$_pkgflag}/archive/v$pkgver.tar.gz"
        "${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/${pkgname%-$_pkgflag}-$pkgver"

  # 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"
  
  ./autogen.sh
  ./configure --prefix=/usr --enable-scrypt --disable-adl
  
  make
}

package() {
  cd "$srcdir/${pkgname%-$_pkgflag}-$pkgver"

  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
}

sha512sums=('f95db6ab14fe35ed19c1af152c6eb979787e966afad250252053bf11abe8293dfe857a7a2abfd9e33b60a190b310193a03151eb67a9db255a2a929660278ad62'
            '99c38bc395848f9712ce172343d31f5c60f5d8ac1cfe2f48df8f3ec6c488fc275763a79c5ef36b99f32faa465b5a65284b38e8a63ef9b144075ee13971313b41'
            '3317b60c6b1f14c47d8ee636113ef40a4023ab14054129de80a37947b381fd2b647a7053f4e1bb639efa225a514e862fa531908714c34040dda2d6221dde7f5f')