Root/cgminer/Makefile

1#
2# Copyright (C) 2012 Xiangfu Liu <xiangfu@openmobilefree.net>
3# bitcoin: 12h6gdGnThW385JaX1LRMA8cXKmbYRTP8Q
4#
5# This is free software, licensed under the GNU General Public License v2.
6# See /LICENSE for more information.
7#
8
9include $(TOPDIR)/rules.mk
10
11PKG_NAME:=cgminer
12PKG_VERSION:=20120516
13PKG_REV:=b69d735cfe468c489a24677ffef1d6d998818cac
14# this is upstream version 2.4.1
15PKG_RELEASE:=4
16PKG_INSTALL:=1
17
18PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.gz
19PKG_SOURCE_URL:=git://github.com/ckolivas/cgminer.git
20PKG_SOURCE_PROTO:=git
21PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
22PKG_SOURCE_VERSION:=$(PKG_REV)
23
24PKG_FIXUP:=autoreconf
25
26include $(INCLUDE_DIR)/package.mk
27
28define Package/cgminer
29    MAINTAINER:="Xiangfu Liu" <xiangfu@sharism.cc>
30    SECTION:=utils
31    CATEGORY:=Utilities
32    TITLE:=cgminer (FPGA Miner)
33    URL:=https://github.com/ckolivas/cgminer
34    DEPENDS:=+libcurl +libpthread +libncurses +jansson
35endef
36
37define Package/cgminer/description
38Cgminer is a multi-threaded multi-pool GPU, FPGA and CPU miner with ATI GPU
39monitoring, (over)clocking and fanspeed support for bitcoin and derivative
40coins. Do not use on multiple block chains at the same time!
41endef
42
43CONFIGURE_ARGS += --disable-opencl --disable-adl --enable-icarus --enable-bitforce
44TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
45
46define Build/Compile
47    $(call Build/Compile/Default)
48    ( cd $(PKG_BUILD_DIR) && $(TARGET_CC) api-example.c -I compat/jansson -o cgminer-api; )
49endef
50
51
52define Package/cgminer/install
53    $(INSTALL_DIR) $(1)/usr/bin $(1)/etc/init.d $(1)/etc/hotplug.d/usb
54
55    $(INSTALL_BIN) $(PKG_BUILD_DIR)/cgminer-api $(1)/usr/bin
56
57    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/cgminer $(1)/usr/bin
58    $(INSTALL_BIN) $(FILES_DIR)/cgminer-monitor $(1)/usr/bin
59    $(INSTALL_BIN) $(FILES_DIR)/cgminer.init $(1)/etc/init.d/cgminer
60
61    $(CP) $(FILES_DIR)/20-cgminer.hotplug $(1)/etc/hotplug.d/usb/20-cgminer
62endef
63
64$(eval $(call BuildPackage,cgminer))
65

Archive Download this file



interactive