提交 9b1cb2c1 编写于 作者: N Nathan Hourt

Resolve #20 for now

Eventually I'd like proper Docker infrastructure, but this is a good
enough starting point just to demonstrate a proper development environment
上级 a8ce27cf
FROM base/archlinux:latest
MAINTAINER Nathan Hourt <nat.hourt@gmail.com>
RUN pacman --noconfirm --needed -Syu clang ninja cmake git autoconf automake make m4 binutils pkg-config libtool fakeroot boost
RUN mkdir /work
WORKDIR /work
COPY * /work/
RUN bash ./bootstrap.sh
# Maintainer: Nathan Hourt <nat.hourt@gmail.com>
pkgname=libsecp256k1-zkp-cnx
pkgver=20150529
pkgrel=1
pkgdesc="Optimized C library for EC operations on curve secp256k1 (Cryptonomex fork)"
arch=('i686' 'x86_64')
url="https://github.com/cryptonomex/secp256k1-zkp"
makedepends=('autoconf' 'automake' 'libtool' 'git' 'm4' 'make' 'pkg-config')
license=('MIT')
source=(${pkgname%-git}::git+https://github.com/cryptonomex/secp256k1-zkp)
sha256sums=('SKIP')
provides=('libsecp256k1' 'secp256k1')
conflicts=('libsecp256k1' 'secp256k1')
pkgver() {
cd ${pkgname%-git}
git log -1 --format="%cd" --date=short | sed "s|-||g"
}
build() {
cd ${pkgname%-git}
msg2 'Building...'
./autogen.sh
./configure \
--prefix=/usr \
--sbindir=/usr/bin \
--libexecdir=/usr/lib/libsecp256k1 \
--sysconfdir=/etc \
--sharedstatedir=/usr/share/libsecp256k1 \
--localstatedir=/var/lib/libsecp256k1 \
--disable-tests \
--with-gnu-ld
make
}
package() {
cd ${pkgname%-git}
msg2 'Installing license...'
install -Dm 644 COPYING -t "$pkgdir/usr/share/licenses/libsecp256k1"
msg2 'Installing documentation'
install -Dm 644 README.md -t "$pkgdir/usr/share/doc/libsecp256k1"
msg2 'Installing...'
make DESTDIR="$pkgdir" install
msg2 'Cleaning up pkgdir...'
find "$pkgdir" -type d -name .git -exec rm -r '{}' +
find "$pkgdir" -type f -name .gitignore -exec rm -r '{}' +
}
## Example Dockerfile
This is an example Dockerfile, which demonstrates how to build Eos successfully. At present, it is not intended for any other purposes than documentation.
mkdir -m 777 secp
mv PKGBUILD secp
cd secp
su -s /bin/bash -c makepkg nobody
pacman --noconfirm -U libsecp256k1-zkp-cnx-20150529-1-x86_64.pkg.tar.xz
cd ..
rm -rf secp Dockerfile README.md bootstrap.sh
git clone https://github.com/eosio/eos --recursive
cd eos
cmake -G Ninja -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang .
ninja
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册