mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-28 10:02:43 +01:00
system/blake2: Strip binary, use SLKCFLAGS.
Signed-off-by: B. Watson <yalhcru@gmail.com>
This commit is contained in:
parent
eaa3ab3832
commit
91a4f11269
2 changed files with 15 additions and 7 deletions
|
@ -3,3 +3,7 @@ the SHA-3 finalist BLAKE. BLAKE2 offers the highest security, yet is
|
|||
fast as MD5 on 64-bit platforms and requires less RAM.
|
||||
|
||||
This script builds the b2sum binary.
|
||||
|
||||
Note: if you get 'illegal instruction' errors from b2sum at runtime,
|
||||
this is due to upstream's use of -march=native optimization. Rebuild
|
||||
the package with FORCE_SLACK_CFLAGS=yes to avoid this.
|
||||
|
|
|
@ -22,12 +22,16 @@
|
|||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
# 20220301 bkw: Modified by SlackBuilds.org, BUILD=2:
|
||||
# - use SLKCFLAGS.
|
||||
# - install binary stripped.
|
||||
|
||||
cd $(dirname $0) ; CWD=$(pwd)
|
||||
|
||||
PRGNAM=blake2
|
||||
VERSION=${VERSION:-20160619}
|
||||
SRCNAM=BLAKE2
|
||||
BUILD=${BUILD:-1}
|
||||
BUILD=${BUILD:-2}
|
||||
TAG=${TAG:-_SBo}
|
||||
PKGTYPE=${PKGTYPE:-tgz}
|
||||
|
||||
|
@ -39,9 +43,6 @@ if [ -z "$ARCH" ]; then
|
|||
esac
|
||||
fi
|
||||
|
||||
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
|
||||
# the name of the created package would be, and then exit. This information
|
||||
# could be useful to other scripts.
|
||||
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
|
||||
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
|
||||
exit 0
|
||||
|
@ -51,6 +52,7 @@ TMP=${TMP:-/tmp/SBo}
|
|||
PKG=$TMP/package-$PRGNAM
|
||||
OUTPUT=${OUTPUT:-/tmp}
|
||||
|
||||
# 20220404 bkw: nothing here uses LIBDIRSUFFIX.
|
||||
if [ "$ARCH" = "i586" ]; then
|
||||
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
|
@ -76,15 +78,17 @@ cd $SRCNAM-$VERSION
|
|||
chown -R root:root .
|
||||
find -L . \
|
||||
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
|
||||
-o -perm 511 \) -exec chmod 755 {} \; -o \
|
||||
-o -perm 511 \) -exec chmod 755 {} \+ -o \
|
||||
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
|
||||
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
|
||||
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+
|
||||
|
||||
[ "${FORCE_SLACK_CFLAGS:-no}" = "yes" ] && export CFLAGS="$SLKCFLAGS"
|
||||
cd b2sum
|
||||
make
|
||||
|
||||
|
||||
mkdir -p $PKG/usr/bin
|
||||
install -m 0755 b2sum $PKG/usr/bin/b2sum
|
||||
install -s -m 0755 b2sum $PKG/usr/bin/b2sum
|
||||
|
||||
cd ..
|
||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
|
|
Loading…
Reference in a new issue