[packages/cgminer] - initial

arekm arekm at pld-linux.org
Tue Apr 30 13:12:44 CEST 2013


commit d0d46e5e3fa16a1c4eac3bee41999aa9e11a5e7f
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Tue Apr 30 13:12:06 2013 +0200

    - initial

 cgminer-build.patch | 60 ++++++++++++++++++++++++++++++++++++++++++++++
 cgminer.spec        | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 129 insertions(+)
---
diff --git a/cgminer.spec b/cgminer.spec
new file mode 100644
index 0000000..77100d9
--- /dev/null
+++ b/cgminer.spec
@@ -0,0 +1,69 @@
+Summary:	CPU/GPU Miner by Con Kolivas
+Name:		cgminer
+Version:	3.1.0
+Release:	1
+License:	GPL v2
+Group:		Applications/Networking
+URL:		http://forum.bitcoin.org/index.php?topic=28402.0
+Source0:	http://ck.kolivas.org/apps/cgminer/%{name}-%{version}.tar.bz2
+# Source0-md5:	1493626854c8654e4285bcd7ec7b0f7d
+Patch0:		%{name}-build.patch
+BuildRequires:	Mesa-libOpenCL-devel
+BuildRequires:	amd-adl-sdk-devel
+BuildRequires:	curl-devel
+BuildRequires:	libusb-devel
+BuildRequires:	ncurses-devel
+BuildRequires:	pkgconfig >= 0.9.0
+BuildRequires:	udev-devel
+BuildRequires:	yasm >= 1.1.0
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+This is a multi-threaded CPU and GPU miner for Bitcoin.
+
+The present package is compiled without support for GPU mining, so
+only CPU mining is possible at this moment.
+
+%prep
+%setup -q
+%patch0 -p1
+
+%build
+%{__aclocal}
+%{__autoconf}
+%configure \
+	CPPFLAGS="%{rpmcppflags} -I/usr/include/ncurses" \
+	--disable-silent-rules \
+	--enable-scrypt \
+	--enable-bflsc \
+	--enable-bitforce \
+	--enable-icarus \
+	--enable-avalon \
+	--enable-modminer \
+	--enable-ztex
+
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+install -d $RPM_BUILD_ROOT%{_bindir}
+
+%{__make} install \
+	DESTDIR="$RPM_BUILD_ROOT" \
+	bindir=%{_libdir}/%{name}
+
+ln -s %{_libdir}/%{name}/%{name} $RPM_BUILD_ROOT%{_bindir}/%{name}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc API-README ASIC-README AUTHORS FPGA-README GPU-README
+%doc NEWS README SCRYPT-README
+%attr(755,root,root) %{_bindir}/%{name}
+%dir %{_libdir}/%{name}
+%attr(755,root,root) %{_libdir}/%{name}/%{name}
+%{_libdir}/%{name}/bitstreams
+%{_libdir}/%{name}/*.cl
diff --git a/cgminer-build.patch b/cgminer-build.patch
new file mode 100644
index 0000000..dd13c89
--- /dev/null
+++ b/cgminer-build.patch
@@ -0,0 +1,60 @@
+--- cgminer-3.1.0/configure.ac.org	2013-04-30 13:02:59.103475727 +0200
++++ cgminer-3.1.0/configure.ac	2013-04-30 13:03:46.147989707 +0200
+@@ -188,10 +188,10 @@
+ if test "$found_opencl" = 1; then
+ 	if test "x$adl" != xno; then
+ 		ADL_CPPFLAGS=
+-		AC_CHECK_FILE([$srcdir/ADL_SDK/adl_sdk.h], [have_adl=true; ADL_CPPFLAGS=-I$srcdir], have_adl=false,)
+-		if test x$have_adl+$have_cgminer_sdk = xfalse+true; then
+-			AC_CHECK_FILE([$CGMINER_SDK/include/ADL_SDK/adl_sdk.h], [have_adl=true; ADL_CPPFLAGS=-I$CGMINER_SDK/include], have_adl=false,)
+-		fi
++		saved_CFLAGS="$CFLAGS"
++		CFLAGS="$CFLAGS -DLINUX=1"
++		AC_CHECK_HEADER(adl_sdk.h, [have_adl=true], [have_adl=false])
++		CFLAGS="$saved_CFLAGS"
+ 		if test x$have_adl = xtrue
+ 		then
+ 			AC_DEFINE([HAVE_ADL], [1], [Defined if ADL headers were found])
+diff -urN cgminer-3.1.0.org/adl.c cgminer-3.1.0/adl.c
+--- cgminer-3.1.0.org/adl.c	2013-03-07 06:38:09.000000000 +0100
++++ cgminer-3.1.0/adl.c	2013-04-30 13:08:26.741697503 +0200
+@@ -20,7 +20,7 @@
+ #endif
+ 
+ #include "miner.h"
+-#include "ADL_SDK/adl_sdk.h"
++#include "adl_sdk.h"
+ #include "compat.h"
+ 
+ #if defined (__linux)
+diff -urN cgminer-3.1.0.org/adl_functions.h cgminer-3.1.0/adl_functions.h
+--- cgminer-3.1.0.org/adl_functions.h	2012-08-21 13:21:55.000000000 +0200
++++ cgminer-3.1.0/adl_functions.h	2013-04-30 13:08:32.641845548 +0200
+@@ -38,7 +38,7 @@
+  #include <tchar.h>
+ #endif
+ 
+-#include "ADL_SDK/adl_sdk.h"
++#include "adl_sdk.h"
+ 
+ // Definitions of the used function pointers. Add more if you use other ADL APIs
+ 
+@@ -271,4 +271,4 @@
+ typedef int ( *ADL_OVERDRIVE5_POWERCONTROL_GET ) (int iAdapterIndex, int* iPercentage, int* whatever);
+ typedef int ( *ADL_OVERDRIVE5_POWERCONTROL_SET ) (int iAdapterIndex, int iPercentage);
+ //typedef int ( *ADL_OVERDRIVE5_POWERCONTROL_CAPS ) (int iAdapterIndex, int* lpCaps, int* lpValid);
+-//typedef int ( *ADL_OVERDRIVE5_POWERCONTROLINFO_GET) (int iAdapterIndex, ...)
+\ Brak znaku nowej linii na końcu pliku
++//typedef int ( *ADL_OVERDRIVE5_POWERCONTROLINFO_GET) (int iAdapterIndex, ...)
+diff -urN cgminer-3.1.0.org/miner.h cgminer-3.1.0/miner.h
+--- cgminer-3.1.0.org/miner.h	2013-04-28 17:46:07.000000000 +0200
++++ cgminer-3.1.0/miner.h	2013-04-30 13:08:39.532018428 +0200
+@@ -103,7 +103,7 @@
+ 
+ 
+ #ifdef HAVE_ADL
+- #include "ADL_SDK/adl_sdk.h"
++ #include "adl_sdk.h"
+ #endif
+ 
+ #ifdef HAVE_LIBUSB
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/cgminer.git/commitdiff/d0d46e5e3fa16a1c4eac3bee41999aa9e11a5e7f



More information about the pld-cvs-commit mailing list