2012-11-14 17:04:45 +01:00
|
|
|
# Template file for 'cgminer'
|
|
|
|
pkgname=cgminer
|
2013-09-02 11:08:44 +02:00
|
|
|
version=3.4.1
|
2012-11-14 17:04:45 +01:00
|
|
|
revision=1
|
|
|
|
build_style=gnu-configure
|
2013-06-25 11:19:41 +02:00
|
|
|
configure_args="--disable-adl --enable-bitforce --enable-bflsc
|
2013-04-23 10:31:36 +02:00
|
|
|
--enable-icarus --enable-avalon --enable-modminer --enable-ztex"
|
2013-04-12 08:55:23 +02:00
|
|
|
hostmakedepends="pkg-config yasm"
|
2013-09-02 11:08:44 +02:00
|
|
|
makedepends="libcurl-devel libusb-devel jansson-devel libudev-devel ncurses-devel"
|
2012-11-14 17:04:45 +01:00
|
|
|
short_desc="Multi-threaded multi-pool CPU and GPU miner for bitcoin"
|
|
|
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
|
|
|
license="GPL-3"
|
2012-12-21 08:25:48 +01:00
|
|
|
homepage="https://github.com/ckolivas/cgminer"
|
2012-11-14 17:04:45 +01:00
|
|
|
distfiles="http://ck.kolivas.org/apps/cgminer/cgminer-${version}.tar.bz2"
|
2013-09-02 11:08:44 +02:00
|
|
|
checksum=b17cad48d3470f94e777faf56a7947e72d409ce01c42c838faa63899d8c745f8
|
|
|
|
|
|
|
|
pre_configure() {
|
|
|
|
# We have latest jansson and libusb - just use them
|
|
|
|
sed "s|ac_subdirs_all='compat/libusb\-1.0'||" -i ./configure
|
|
|
|
sed 's|subdirs="$subdirs compat/libusb\-1.0"||' -i ./configure
|
|
|
|
sed 's|LIBUSB_LIBS="compat/libusb-1.0/libusb/.libs/libusb-1.0.a"|LIBUSB_LIBS=-lusb-1.0|' -i ./configure
|
|
|
|
sed 's|JANSSON_LIBS="compat/jansson/libjansson.a"|JANSSON_LIBS=-ljansson|' -i ./configure
|
|
|
|
sed 's|compat/Makefile compat/jansson/Makefile||' -i ./configure
|
|
|
|
sed 's|JANSSON_INCLUDES = -I$(top_srcdir)/compat/jansson||' -i ./Makefile.in
|
|
|
|
sed "s|USBUTILS_INCLUDES = -I\$(top_srcdir)/compat/libusb\-1.0/libusb|USBUTILS_INCLUDES = -I${XBPS_CROSS_BASE}/usr/include/libusb-1.0|" -i ./Makefile.in
|
|
|
|
sed 's|SUBDIRS = lib compat ccan|SUBDIRS = lib ccan|' -i ./Makefile.in
|
|
|
|
}
|
2012-11-14 17:04:45 +01:00
|
|
|
|
|
|
|
post_install() {
|
|
|
|
vinstall example.conf 644 etc cgminer.conf
|
|
|
|
sed -i -e 's#/usr/local/bin#/usr/bin#g' ${DESTDIR}/etc/cgminer.conf
|
|
|
|
vinstall ${FILESDIR}/cgminer.service 644 usr/lib/systemd/system
|
|
|
|
}
|
2013-04-12 08:55:23 +02:00
|
|
|
|
|
|
|
cgminer_package() {
|
|
|
|
conf_files="/etc/cgminer.conf"
|
|
|
|
pkg_install() {
|
2013-04-23 10:31:36 +02:00
|
|
|
vmove all
|
2013-04-12 08:55:23 +02:00
|
|
|
}
|
|
|
|
}
|
2013-04-23 10:31:36 +02:00
|
|
|
|
|
|
|
# Package build options
|
|
|
|
build_options="opencl"
|
|
|
|
desc_option_opencl="Enable support for OpenCL mining"
|
|
|
|
|
|
|
|
# Enable opencl by default on x86.
|
|
|
|
if [ "$XBPS_TARGET_MACHINE" = "i686" -o "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
|
|
|
|
build_options_default="opencl"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$build_option_opencl" ]; then
|
|
|
|
configure_args+=" --enable-scrypt --enable-opencl"
|
|
|
|
makedepends+=" opencl-headers nvidia-opencl"
|
|
|
|
else
|
|
|
|
configure_args+=" --disable-scrypt --disable-opencl"
|
|
|
|
fi
|