diff --git a/cgminer/Makefile b/cgminer/Makefile index 9aac6db..7a29885 100644 --- a/cgminer/Makefile +++ b/cgminer/Makefile @@ -11,7 +11,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=cgminer PKG_VERSION:=20120315 PKG_REV:=22ff7a406951f97af57cbca75d282c4bbf41a3e7 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_INSTALL:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.gz @@ -47,10 +47,11 @@ CONFIGURE_ARGS += --disable-opencl --disable-adl --enable-icarus TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib define Package/cgminer/install - $(INSTALL_DIR) $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/cgminer $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/usr/share/cgminer - $(CP) $(PKG_BUILD_DIR)/miner.php $(1)/usr/share/cgminer/ + $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/share/cgminer $(1)/etc/init.d + + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/cgminer $(1)/usr/bin + $(INSTALL_BIN) $(FILES_DIR)/cgminer $(1)/etc/init.d + $(CP) $(PKG_BUILD_DIR)/miner.php $(1)/usr/share/cgminer endef $(eval $(call BuildPackage,cgminer)) diff --git a/cgminer/files/cgminer b/cgminer/files/cgminer new file mode 100755 index 0000000..d780f87 --- /dev/null +++ b/cgminer/files/cgminer @@ -0,0 +1,13 @@ +#!/bin/sh /etc/rc.common +START=99 + +POOL="-o http://pool.ABCPool.co -O xiangfu.0:x" +DEV="-S /dev/ttyUSB0" +PARAMETER="$DEV $POOL" +start() { + cgminer -q -T --api-network --api-listen $PARAMETER> /dev/null 2>&1 & +} + +stop() { + killall -s 9 cgminer +}