This repository has been archived by the owner on Aug 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
1 parent
a8ce27c
commit 9b1cb2c
Showing
4 changed files
with
75 additions
and
0 deletions.
There are no files selected for viewing
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
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 |
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
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 '{}' + | ||
} |
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
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. |
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
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 |