diff options
-rw-r--r-- | .SRCINFO | 37 | ||||
-rw-r--r-- | PKGBUILD | 70 | ||||
-rw-r--r-- | cgminer.conf.d | 11 | ||||
-rw-r--r-- | cgminer.service | 8 | ||||
-rw-r--r-- | system-jansson-libusb.patch | 80 |
5 files changed, 206 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..1baf3fa5e74d --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,37 @@ +pkgbase = cgminer-gpu + pkgdesc = Multi-threaded multi-pool GPU, FPGA and ASIC miner for bitcoin and derivative coins. 3.7.2 was the last GPU version. + pkgver = 3.7.2 + pkgrel = 7 + url = http://forum.bitcoin.org/index.php?topic=28402.0 + arch = i686 + arch = x86_64 + license = GPL3 + makedepends = opencl-headers + makedepends = autoconf + makedepends = automake + makedepends = pkgconfig + makedepends = libtool + makedepends = yasm + depends = curl + depends = libcl + depends = libusbx + depends = jansson + depends = libusb-compat + optdepends = ncurses: For ncurses formatted screen output + optdepends = opencl-nvidia: OpenCL implementation for NVIDIA + optdepends = opencl-catalyst: OpenCL implementation for AMD + provides = cgminer + conflicts = cgminer-git + conflicts = cgminer + conflicts = cgminer-git-adl + source = https://github.com/ckolivas/cgminer/archive/v3.7.2.tar.gz + source = cgminer.service + source = cgminer.conf.d + source = system-jansson-libusb.patch + sha512sums = aacee4ca47c5da18ae15f9bc245640d44a6b39264abc357729e2cb5d7ca049710cc635457f2a76a2c97f6bbebfec81bbe6675dacf366bf870a14b5a0b12d9963 + sha512sums = 3317b60c6b1f14c47d8ee636113ef40a4023ab14054129de80a37947b381fd2b647a7053f4e1bb639efa225a514e862fa531908714c34040dda2d6221dde7f5f + sha512sums = 99c38bc395848f9712ce172343d31f5c60f5d8ac1cfe2f48df8f3ec6c488fc275763a79c5ef36b99f32faa465b5a65284b38e8a63ef9b144075ee13971313b41 + sha512sums = 9083fd18b64f5d1260d2be1d564e8bf9435b2753a621ffc87b56c40fb30030477619d3a17e29c241a2c951c1ee7e4bf3091135fd0be0b1963e19f79c01d33006 + +pkgname = cgminer-gpu + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..20cfc687143c --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,70 @@ +# Maintainer: ilikenwf <parwok@gmail.com> +# Contributor: deusstultus <deusstultus@gmail.com> +# Contributors by way of cgminer package in arch repos +# Contributor: Felix Yan <felixonmars@gmail.com> +# Contributor: monson <holymonson@gmail.com> +# Contributor: Thomas Dziedzic < gostrc at gmail > +# Contributor: David Manouchehri <david@davidmanouchehri.com> + +# Contributor by way of cgminer-git in AUR +# Contributor: Atterratio <atterratio at gmail> + +pkgname=cgminer-gpu +provides=('cgminer') +pkgver=3.7.2 +pkgrel=7 +pkgdesc="Multi-threaded multi-pool GPU, FPGA and ASIC miner for bitcoin and derivative coins. 3.7.2 was the last GPU version." +url='http://forum.bitcoin.org/index.php?topic=28402.0' +license=('GPL3') +#Note license was GPL2 prior to Tue Feb 21 22:23:07 2012 +1100 if playing with old versions with this PKGBUILD +arch=('i686' 'x86_64') +depends=('curl' 'libcl' 'libusbx' 'jansson' 'libusb-compat') +conflicts=('cgminer-git' 'cgminer' 'cgminer-git-adl') +makedepends=('opencl-headers' 'autoconf' 'automake' 'pkgconfig' 'libtool' 'yasm') +optdepends=('ncurses: For ncurses formatted screen output' + 'opencl-nvidia: OpenCL implementation for NVIDIA' + 'opencl-catalyst: OpenCL implementation for AMD') +source=("https://github.com/ckolivas/cgminer/archive/v3.7.2.tar.gz" + "cgminer.service" + "cgminer.conf.d" + "system-jansson-libusb.patch") +sha512sums=('aacee4ca47c5da18ae15f9bc245640d44a6b39264abc357729e2cb5d7ca049710cc635457f2a76a2c97f6bbebfec81bbe6675dacf366bf870a14b5a0b12d9963' + '3317b60c6b1f14c47d8ee636113ef40a4023ab14054129de80a37947b381fd2b647a7053f4e1bb639efa225a514e862fa531908714c34040dda2d6221dde7f5f' + '99c38bc395848f9712ce172343d31f5c60f5d8ac1cfe2f48df8f3ec6c488fc275763a79c5ef36b99f32faa465b5a65284b38e8a63ef9b144075ee13971313b41' + '9083fd18b64f5d1260d2be1d564e8bf9435b2753a621ffc87b56c40fb30030477619d3a17e29c241a2c951c1ee7e4bf3091135fd0be0b1963e19f79c01d33006') +[ "$CARCH" == "x86_64" ] && makedepends+=('yasm') + +build() { + cd "$srcdir/cgminer-3.7.2" + + # We have latest jansson and libusb - just use them + patch -Np1 -i ../system-jansson-libusb.patch + rm -r compat + + ./autogen.sh --enable-opencl + + ./configure \ + --prefix=/usr \ + --enable-scrypt \ + --enable-opencl \ + --enable-bflsc \ + --enable-bitforce \ + --enable-icarus \ + --enable-modminer \ + --enable-ztex \ + --enable-avalon \ + --enable-adl + + make +} + +package() { + cd "$srcdir/cgminer-3.7.2" + + make DESTDIR="$pkgdir" install + + install -Dm644 "$srcdir"/cgminer.service "$pkgdir"/usr/lib/systemd/system/cgminer.service + install -Dm644 "$srcdir"/cgminer.conf.d "$pkgdir"/etc/conf.d/cgminer + sed 's#/usr/local/bin#/usr/bin#g' example.conf > cgminer.conf + install -Dm644 cgminer.conf "$pkgdir"/etc/cgminer.conf +} diff --git a/cgminer.conf.d b/cgminer.conf.d new file mode 100644 index 000000000000..88ec535d6b9d --- /dev/null +++ b/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/cgminer.service b/cgminer.service new file mode 100644 index 000000000000..84461879f6ee --- /dev/null +++ b/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 diff --git a/system-jansson-libusb.patch b/system-jansson-libusb.patch new file mode 100644 index 000000000000..5c261443e241 --- /dev/null +++ b/system-jansson-libusb.patch @@ -0,0 +1,80 @@ +diff --git a/Makefile.am b/Makefile.am +index 05002bc..407c301 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -1,10 +1,10 @@ + + ACLOCAL_AMFLAGS = -I m4 + +-JANSSON_INCLUDES= -I$(top_builddir)/compat/jansson-2.5/src -I$(top_srcdir)/compat/jansson-2.5/src ++JANSSON_INCLUDES= + + if WANT_USBUTILS +-USBUTILS_INCLUDES = -I$(top_builddir)/compat/libusb-1.0/libusb -I$(top_srcdir)/compat/libusb-1.0/libusb ++USBUTILS_INCLUDES = -I/usr/include/libusb-1.0 + else + USBUTILS_INCLUDES = + endif +@@ -16,7 +16,7 @@ EXTRA_DIST = example.conf linux-usb-cgminer \ + bitforce-firmware-flash.c hexdump.c ASIC-README \ + 01-cgminer.rules + +-SUBDIRS = lib compat ccan ++SUBDIRS = lib ccan + + INCLUDES = $(PTHREAD_FLAGS) -fno-strict-aliasing $(JANSSON_INCLUDES) $(USBUTILS_INCLUDES) + +diff --git a/configure.ac b/configure.ac +index 6553d23..f1bde1b 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -273,14 +273,8 @@ AM_CONDITIONAL([HAVE_WINDOWS], [test x$have_win32 = xtrue]) + AM_CONDITIONAL([HAVE_x86_64], [test x$have_x86_64 = xtrue]) + + if test "x$want_usbutils" != xfalse; then +- dlibusb="no" + AC_DEFINE([USE_USBUTILS], [1], [Defined to 1 if usbutils support required]) +- AC_ARG_WITH([system-libusb], +- [AC_HELP_STRING([--with-system-libusb],[Compile against dynamic system libusb (default use included static libusb)])], +- [dlibusb=$withval] +- ) + +- if test "x$dlibusb" != xno; then + case $target in + *-*-freebsd*) + LIBUSB_LIBS="-lusb" +@@ -291,25 +285,13 @@ if test "x$want_usbutils" != xfalse; then + PKG_CHECK_MODULES(LIBUSB, libusb-1.0, [AC_DEFINE(HAVE_LIBUSB, 1, [Define if you have libusb-1.0])], [AC_MSG_ERROR([Could not find usb library - please install libusb-1.0])]) + ;; + esac +- else +- AC_CONFIG_SUBDIRS([compat/libusb-1.0]) +- LIBUSB_LIBS="compat/libusb-1.0/libusb/.libs/libusb-1.0.a" +- if test "x$have_linux" = "xtrue"; then +- LIBUSB_LIBS+=" -ludev" +- fi +- if test "x$have_darwin" = "xtrue"; then +- LIBUSB_LIBS+=" -lobjc" +- LDFLAGS+=" -framework CoreFoundation -framework IOKit" +- fi +- fi + else + LIBUSB_LIBS="" + fi + + AM_CONDITIONAL([WANT_STATIC_LIBUSB], [test x$dlibusb = xno]) + +-AC_CONFIG_SUBDIRS([compat/jansson-2.5]) +-JANSSON_LIBS="compat/jansson-2.5/src/.libs/libjansson.a" ++JANSSON_LIBS=-ljansson + + PKG_PROG_PKG_CONFIG() + +@@ -413,7 +395,6 @@ AC_SUBST(ADL_CPPFLAGS) + + AC_CONFIG_FILES([ + Makefile +- compat/Makefile + ccan/Makefile + lib/Makefile + ]) |