Created
July 12, 2017 01:19
-
-
Save huiyiqun/b610cff684b9fe4e6a78bd758e6af8a9 to your computer and use it in GitHub Desktop.
working PKGBUILD for ethminer-git
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Rowan Decker <rdecker@scu.edu> | |
# Contributor: Eric Toombs <ee double you toombs at you waterloo dot see eh?> | |
# Contributor: Afri 5chdn <aur@cach.co> | |
# Contributor: Andy Weidenbaum <archbaum@gmail.com> | |
pkgname=ethminer-git | |
pkgver=0.12.0.0.20170712.f99ca9822 | |
pkgrel=1 | |
pkgdesc="Ethereum miner with CUDA and stratum support. chfast's version." | |
arch=('i686' 'x86_64') | |
depends=( | |
'boost' | |
'crypto++' | |
'cuda' | |
'leveldb' | |
'ocl-icd' | |
'libmicrohttpd' | |
'miniupnpc' | |
'libjson-rpc-cpp-git' | |
) | |
makedepends=( | |
'gcc5' | |
'cmake' | |
'git' | |
'opencl-headers' | |
) | |
optdepends=( | |
'solidity: The Solidity Contract-Oriented Programming Language' | |
) | |
groups=('ethereum') | |
url="https://github.com/ethereum-mining/ethminer" | |
license=('GPL') | |
source=( | |
"$pkgname::git+https://github.com/ethereum-mining/ethminer" | |
) | |
sha256sums=( | |
"SKIP" | |
) | |
provides=( | |
'ethminer' | |
) | |
conflicts=( | |
'ethminer' | |
'ethereum' | |
'ethereum-git' | |
'cpp-ethereum' | |
) | |
pkgver() { | |
cd "$pkgname" | |
echo "`grep -m1 "PROJECT_VERSION" CMakeLists.txt | tr -cd '[[:digit:]].'`.`date +%Y%m%d`.`git log --pretty=format:%h -n 1`" | |
} | |
build() { | |
msg 'Updating...' | |
cd "$pkgname" | |
git submodule update --init --recursive | |
msg 'Building...' | |
mkdir -p build && pushd build | |
unset CFLAGS #march=native can break the build if set in makepkg.conf | |
unset CXXFLAGS | |
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DETHASHCUDA=ON \ | |
-DCMAKE_C_COMPILER=/usr/bin/gcc-5 \ | |
-DCMAKE_CXX_COMPILER=/usr/bin/g++-5 \ | |
-DCMAKE_RANLIB=/usr/bin/gcc-ranlib-5 \ | |
-DCMAKE_AR=/usr/bin/gcc-ar-5 | |
cmake --build . | |
popd | |
} | |
package() { | |
cd "$pkgname"/build | |
msg 'Installing...' | |
DESTDIR="$pkgdir" cmake -P cmake_install.cmake | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment