1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- #
- # Author: Xiangfu Liu <xiangfu@openmobilefree.net>
- # Address: 12h6gdGnThW385JaX1LRMA8cXKmbYRTP8Q
- #
- # This is free and unencumbered software released into the public domain.
- # For details see the UNLICENSE file at the root of the source tree.
- #
- include $(TOPDIR)/rules.mk
- PKG_NAME:=cgminer
- ifeq ($(CONFIG_CGMINER_BITMAIN),y)
- PKG_VERSION:=git-$(shell git ls-remote http://gogserver.dnsalias.com:3000/wareck/cgminer-ants3.git master | cut -f1 | cut -c1-7)
- PKG_REV:=master
- endif
- #PKG_VERSION:=4.10.0
- #PKG_REV:=764b03ada628acd2ae917daa13e8afd6af088913
- PKG_RELEASE:=1
- PKG_INSTALL:=1
- PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.bz2
- ifeq ($(CONFIG_CGMINER_BITMAIN),y)
- PKG_SOURCE_URL:=http://gogserver.dnsalias.com:3000/wareck/cgminer-ants3.git
- endif
- PKG_SOURCE_PROTO:=git
- PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
- PKG_SOURCE_VERSION:=$(PKG_REV)
- PKG_FIXUP:=autoreconf
- include $(INCLUDE_DIR)/package.mk
- define Package/cgminer
- SECTION:=utils
- CATEGORY:=Utilities
- TITLE:=cgminer
- URL:=https://github.com/ckolivas/cgminer
- ifeq ($(CONFIG_TARGET_brcm2708_RaspberryPi),)
- DEPENDS:=+libcurl +libpthread +jansson +udev
- else
- DEPENDS:=+libcurl +libpthread +jansson +udev +libncurses
- endif
- endef
- define Package/cgminer/description
- Cgminer is a multi-threaded multi-pool GPU, FPGA and CPU miner with ATI GPU
- monitoring, (over)clocking and fanspeed support for bitcoin and derivative
- coins. Do not use on multiple block chains at the same time!
- endef
- define Package/cgminer/config
- menu "Configuration"
- depends on PACKAGE_cgminer
- source "$(SOURCE)/Config.in"
- endmenu
- endef
- TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
- ifeq ($(CONFIG_CGMINER_BITMAIN),y)
- CONFIGURE_ARGS += --without-curses --enable-ants3
- endif
- ifeq ($(CONFIG_TARGET_brcm2708_RaspberryPi),)
- CONFIGURE_ARGS += --without-curses
- endif
- define Build/Compile
- $(call Build/Compile/Default)
- (cd $(PKG_BUILD_DIR) && \
- $(TARGET_CC) -Icompat/jansson -Icompat/libusb-1.0/libusb \
- api-example.c -o cgminer-api;)
- endef
- define Package/cgminer/install
- $(INSTALL_DIR) $(1)/usr/bin
- $(INSTALL_DIR) $(1)/etc/init.d
- $(INSTALL_DIR) $(1)/etc/config
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/cgminer-api $(1)/usr/bin
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/cgminer $(1)/usr/bin
- ifeq ($(CONFIG_CGMINER_BITMAIN),y)
- $(INSTALL_BIN) $(FILES_DIR)/cgminer-bitmain-monitor $(1)/usr/bin/cgminer-monitor
- $(INSTALL_BIN) $(FILES_DIR)/cgminer.bitmain.init $(1)/etc/init.d/cgminer
- $(CP) $(FILES_DIR)/cgminer.bitmain.config $(1)/etc/config/cgminer
- $(INSTALL_BIN) $(FILES_DIR)/mm-bitmain-upgrade $(1)/usr/bin/mmupgrade
- endif
- endef
- $(eval $(call BuildPackage,cgminer))
|