Skip to content

Commit

Permalink
s2e: add package (#4386)
Browse files Browse the repository at this point in the history
* s2e: add package

* Update to-release

* Update PKGBUILD
  • Loading branch information
D3vil0p3r authored Dec 29, 2024
1 parent d5b99f8 commit df6917c
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
1 change: 1 addition & 0 deletions lists/to-release
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
s2e
61 changes: 61 additions & 0 deletions packages/s2e/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=s2e
pkgver=v2.0.0.r540.g799ad0b
pkgrel=1
pkgdesc='A platform for multi-path program analysis with selective symbolic execution.'
arch=('x86_64' 'aarch64')
groups=('blackarch' 'blackarch-binary')
url='https://github.com/S2E/s2e'
license=('custom:cyberhaven')
makedepends=('git' 'repo' 'ca-certificates' 'cmake' 'curl' 'wget'
'python' 'python-pip' 'python-virtualenv' 'mingw-w64-gcc' 'lsb-release'
'autoconf' 'libtool' 'protobuf' 'protobuf-c' 'libdwarf' 'libelf' 'boost'
'zlib' 'jemalloc' 'nasm' 'pkgconf' 'memcached' 'postgresql-libs' 'glibc'
'binutils' 'boost-libs' 'pixman' 'glib2' 'gcc-multilib' 'gtest' 'rapidjson'
'capstone' 'unzip' 'zstd' 'python-sphinx_rtd_theme')
source=("git+https://github.com/S2E/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
cd $pkgname

( set -o pipefail
git describe --long --tags --abbrev=7 2>/dev/null |
sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
printf "%s.%s" "$(git rev-list --count HEAD)" \
"$(git rev-parse --short=7 HEAD)"
)
}

prepare() {
cd $pkgname

git config --global color.ui false
repo init -u https://github.com/s2e/manifest.git
repo sync --fail-fast
}

build() {
cd $pkgname

mkdir -p build
cd build
make -f ../s2e/Makefile S2E_PREFIX=$pkgdir/usr/share/$pkgname stamps/llvm-release-make
export USE_Z3_BINARY=yes
make -f ../s2e/Makefile S2E_PREFIX=$pkgdir/usr/share/$pkgname stamps/z3
make -f ../s2e/Makefile S2E_PREFIX=$pkgdir/usr/share/$pkgname stamps/libdwarf-make

cd ..

cd docs/sphinx
./build.sh
}

package() {
cd $pkgname

make -f ../s2e/Makefile S2E_PREFIX=$pkgdir/usr/share/$pkgname install
}

0 comments on commit df6917c

Please sign in to comment.