mirror of
https://github.com/dslm4515/BMLFS.git
synced 2025-08-01 19:42:55 +00:00
86 lines
3.1 KiB
Bash
86 lines
3.1 KiB
Bash
#! /bin/bash
|
|
|
|
# libseccomp
|
|
# Source: https://github.com/seccomp/libseccomp/releases/download/v2.6.0/libseccomp-2.6.0.tar.gz
|
|
#
|
|
# $BUILD = Directory to temporarily install
|
|
# $PKGS = Directory to store built packages
|
|
#
|
|
# DEPS
|
|
# Required: NONE
|
|
# Recommended: NONE
|
|
# Optional: Which(needed for tests), Valgrind, Cython, LCOV
|
|
# LTO: No
|
|
|
|
# If optimizing, use these flags
|
|
# Recommened to not use LTO
|
|
export CFLAGS="-march=native -mtune=native -pipe -O2 -fno-lto "
|
|
export CXXFLAGS=$CFLAGS
|
|
unset LDFLAGS
|
|
|
|
export PVER="2.6.0"
|
|
|
|
./configure --prefix=/usr --disable-static $BUILDTRUPLE &&
|
|
|
|
read -p "Press Enter to compile" &&
|
|
make -j2 &&
|
|
|
|
read -p "Press Enter to install" &&
|
|
# if not using a package manager:
|
|
# make install
|
|
|
|
# if using pkgtools from Slackware, then:
|
|
sudo -S make DESTDIR=$BUILD install &&
|
|
sudo -S mkdir -pv /BMAN/install
|
|
sudo -S mkdir -pv /BMAN/usr
|
|
sudo -S mv $BUILD/usr/share /BMAN/usr/
|
|
|
|
# Build Package
|
|
|
|
cd $BUILD && sudo mkdir -v install &&
|
|
cat > /tmp/slack-desc << "EOF"
|
|
# HOW TO EDIT THIS FILE:
|
|
# The "handy ruler" below makes it easier to edit a package description.
|
|
# Line up the first '|' above the ':' following the base package name, and
|
|
# the '|' on the right side marks the last column you can put a character in.
|
|
# You must make exactly 11 lines for the formatting to be correct. It's also
|
|
# customary to leave one space after the ':' except on otherwise blank lines.
|
|
|
|
|-----handy-ruler------------------------------------------------------|
|
|
libseccomp: libseccomp (Enhanced Seccomp library)
|
|
libseccomp:
|
|
libseccomp: The libseccomp library provides an easy to use, platform independent,
|
|
libseccomp: interface to the Linux Kernel's syscall filtering mechanism.
|
|
libseccomp: The libseccomp API is designed to abstract away the underlying BPF
|
|
libseccomp: based syscall filter language and present a more conventional
|
|
libseccomp: function-call based filtering interface that should be familiar to,
|
|
libseccomp: and easily adopted by, application developers.
|
|
libseccomp:
|
|
libseccomp: Project URL: https://github.com/seccomp/libseccomp
|
|
libseccomp:
|
|
EOF
|
|
sudo mv /tmp/slack-desc install/ &&
|
|
|
|
read -p "Enter to build package" &&
|
|
sudo makepkg -l y -c n $PKGS/libseccomp-$PVER-$PSUFFIX &&
|
|
|
|
cd /BMAN
|
|
cat > /tmp/slack-desc << "EOF"
|
|
|-----handy-ruler------------------------------------------------------
|
|
libseccomp-doc: Manuals for libseccomp (Enhanced Seccomp library)
|
|
libseccomp-doc:
|
|
libseccomp-doc: The libseccomp library provides an easy to use, platform independent,
|
|
libseccomp-doc: interface to the Linux Kernel's syscall filtering mechanism.
|
|
libseccomp-doc: The libseccomp API is designed to abstract away the underlying BPF
|
|
libseccomp-doc: based syscall filter language and present a more conventional
|
|
libseccomp-doc: function-call based filtering interface that should be familiar to,
|
|
libseccomp-doc: and easily adopted by, application developers.
|
|
libseccomp-doc:
|
|
libseccomp-doc: Project URL: https://github.com/seccomp/libseccomp
|
|
libseccomp-doc:
|
|
EOF
|
|
sudo mv /tmp/slack-desc install/
|
|
sudo makepkg -l y -c n $PKGS/libseccomp-doc-$PVER-$NOPSUFFIX
|
|
sudo rm -rf /BMAN/*
|
|
sudo rm -rf $BUILD/*
|