|
|
@ -1,6 +1,6 @@ |
|
|
|
#!/bin/bash |
|
|
|
# Build script for Slackware |
|
|
|
# Copyright (C) 2018 Damien Goutte-Gattat |
|
|
|
# Copyright (C) 2018,2020 Damien Goutte-Gattat |
|
|
|
# |
|
|
|
# Redistribution and use of this script, with or without modifications, |
|
|
|
# is permitted provided that the following conditions are met: |
|
|
@ -24,16 +24,10 @@ |
|
|
|
# |
|
|
|
# Latest libseccomp sourcecode is available at: |
|
|
|
# <https://github.com/seccomp/libseccomp>. |
|
|
|
# |
|
|
|
# Note: d/cython is a build-time dependency needed to build the |
|
|
|
# Python bindings. Remove the --enable-python flag if |
|
|
|
# d/cython is not available and the bindings are not needed. |
|
|
|
# |
|
|
|
# Recommends: d/cython |
|
|
|
|
|
|
|
# Source package infos |
|
|
|
NAMESRC=${NAMESRC:-libseccomp} |
|
|
|
VERSION=${VERSION:-2.4.2} |
|
|
|
VERSION=${VERSION:-2.4.3} |
|
|
|
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.gz} |
|
|
|
WGET=${WGET:-https://github.com/seccomp/libseccomp/releases/download/v$VERSION/$ARCHIVE} |
|
|
|
|
|
|
@ -90,22 +84,7 @@ cd $TMP |
|
|
|
echo "Building $ARCHIVE..." |
|
|
|
tar xf $CWD/$ARCHIVE |
|
|
|
cd $NAME |
|
|
|
mkdir build1 build2 && cd build1 |
|
|
|
CFLAGS=$CPUOPT \ |
|
|
|
CXXFLAGS=$CPUOPT \ |
|
|
|
PYTHON=python2 \ |
|
|
|
../configure \ |
|
|
|
--prefix=/usr \ |
|
|
|
--libdir=/usr/lib$LIBDIRSUFFIX \ |
|
|
|
--mandir=/usr/man \ |
|
|
|
--enable-python \ |
|
|
|
--disable-dependency-tracking \ |
|
|
|
--build=$ARCH-slackware-linux |
|
|
|
make -j $JOBS |
|
|
|
make install-strip DESTDIR=$PKG |
|
|
|
|
|
|
|
# Build again for Python 3 |
|
|
|
cd ../build2 |
|
|
|
mkdir build && cd build |
|
|
|
CFLAGS=$CPUOPT \ |
|
|
|
CXXFLAGS=$CPUOPT \ |
|
|
|
PYTHON=python3 \ |
|
|
@ -117,8 +96,7 @@ PYTHON=python3 \ |
|
|
|
--disable-dependency-tracking \ |
|
|
|
--build=$ARCH-slackware-linux |
|
|
|
make -j $JOBS |
|
|
|
# Only install the Python 3 module |
|
|
|
make -C src/python install-strip DESTDIR=$PKG |
|
|
|
make install-strip DESTDIR=$PKG |
|
|
|
|
|
|
|
# Compress man pages |
|
|
|
find $PKG/usr/man -type f -exec gzip -9 {} \; |
|
|
|