|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
#!/bin/bash
|
|
|
|
|
# Build script for Slackware
|
|
|
|
|
# Copyright (C) 2015,2016 Damien Goutte-Gattat
|
|
|
|
|
# Copyright (C) 2015-2017 Damien Goutte-Gattat
|
|
|
|
|
#
|
|
|
|
|
# Redistribution and use of this script, with or without modifications,
|
|
|
|
|
# is permitted provided that the following conditions are met:
|
|
|
|
@ -23,14 +23,14 @@
|
|
|
|
|
# Contact: Damien Goutte-Gattat <dgouttegattat@incenp.org>
|
|
|
|
|
#
|
|
|
|
|
# Latest firetools sourcecode is available at:
|
|
|
|
|
# <https://l3net.wordpress.com/projects/firejail/>.
|
|
|
|
|
# <https://firejail.wordpress.com/>.
|
|
|
|
|
#
|
|
|
|
|
# Depends: ap/firejail
|
|
|
|
|
|
|
|
|
|
# Source package infos
|
|
|
|
|
NAMESRC=${NAMESRC:-firetools}
|
|
|
|
|
VERSION=${VERSION:-0.9.40.1}
|
|
|
|
|
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.bz2}
|
|
|
|
|
VERSION=${VERSION:-0.9.46}
|
|
|
|
|
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.xz}
|
|
|
|
|
WGET=${WGET:-http://sourceforge.net/projects/firejail/files/firetools/$ARCHIVE/download}
|
|
|
|
|
|
|
|
|
|
# Build infos
|
|
|
|
@ -59,12 +59,14 @@ if [ ! -d $TMP ]; then
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# Compilation flags
|
|
|
|
|
LIBDIRSUFFIX=
|
|
|
|
|
case "$ARCH" in
|
|
|
|
|
i?86)
|
|
|
|
|
CPUOPT="-O2 -march=$ARCH -mtune=i686"
|
|
|
|
|
;;
|
|
|
|
|
x86_64)
|
|
|
|
|
CPUOPT="-O2 -fPIC"
|
|
|
|
|
LIBDIRSUFFIX=64
|
|
|
|
|
;;
|
|
|
|
|
*)
|
|
|
|
|
CPUOPT="-O2"
|
|
|
|
@ -76,7 +78,7 @@ if [ ! -r $ARCHIVE ]; then
|
|
|
|
|
wget -c -O $ARCHIVE.part "$WGET"
|
|
|
|
|
mv $ARCHIVE.part $ARCHIVE
|
|
|
|
|
fi
|
|
|
|
|
sha1sum -c $ARCHIVE.sha1
|
|
|
|
|
sha256sum -c $ARCHIVE.sha256
|
|
|
|
|
NAME=$(tar ft $ARCHIVE | head -n 1 | cut -d / -f 1)
|
|
|
|
|
|
|
|
|
|
# Compile
|
|
|
|
@ -88,6 +90,7 @@ CFLAGS=$CPUOPT \
|
|
|
|
|
CXXFLAGS=$CPUOPT \
|
|
|
|
|
./configure \
|
|
|
|
|
--prefix=/usr \
|
|
|
|
|
--libdir=/usr/lib$LIBDIRSUFFIX \
|
|
|
|
|
--mandir=/usr/man \
|
|
|
|
|
--docdir=/usr/doc/$NAME
|
|
|
|
|
make -j $JOBS
|
|
|
|
@ -99,6 +102,11 @@ mv $PKG/usr/share/man $PKG/usr/man
|
|
|
|
|
# Copy slack-desc file
|
|
|
|
|
install -D -m 644 $CWD/slack-desc $PKG/install/slack-desc
|
|
|
|
|
|
|
|
|
|
# Add dependency infos
|
|
|
|
|
cat <<EOF > $PKG/install/slack-required
|
|
|
|
|
firejail
|
|
|
|
|
EOF
|
|
|
|
|
|
|
|
|
|
# Package the tree
|
|
|
|
|
cd $PKG
|
|
|
|
|
mkdir -p $OUT
|
|
|
|
|