Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Resolve #20 for now
Browse files Browse the repository at this point in the history
Eventually I'd like proper Docker infrastructure, but this is a good
enough starting point just to demonstrate a proper development environment
  • Loading branch information
nathanielhourt committed Jun 1, 2017
1 parent a8ce27c commit 9b1cb2c
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM base/archlinux:latest
MAINTAINER Nathan Hourt <[email protected]>

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
53 changes: 53 additions & 0 deletions Docker/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Maintainer: Nathan Hourt <[email protected]>

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 '{}' +
}
3 changes: 3 additions & 0 deletions Docker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## 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.
11 changes: 11 additions & 0 deletions Docker/bootstrap.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
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

0 comments on commit 9b1cb2c

Please sign in to comment.