Files
BMLFS/build-scripts/libsndfile.build
2023-09-21 09:18:17 -05:00

67 lines
2.4 KiB
Bash

#! /bin/bash
# libsndfile
# Source: https://github.com/libsndfile/libsndfile/releases/download/1.2.2/libsndfile-1.2.2.tar.xz
#
# $BUILD = Directory to temporarily install
# $PKGS = Directory to store built packages
#
# DEPS
# Required: NONE
# Recommended: libvorbis opus flac
# Optional: NONE
# If optimizing, use these flags
export CFLAGS="-march=native -pipe "
export CFLAGS+="-O3 -ffat-lto-objects -flto=4 -fstack-protector-strong "
export CFLAGS+="-fzero-call-used-regs=used "
export LDFLAGS="-flto=4 -Wl,-O2 -Wl,--as-needed "
./configure --prefix=/usr \
--docdir=/usr/share/doc/libsndfile-1.2.2 $BUILDTRUPLE &&
read -p "Compile?" && make -j2 &&
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/
cd $BUILD && sudo -S mkdir -v ${BUILD}/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------------------------------------------------------|
libsndfile: libsndfile (C library for reading and writing wav files)
libsndfile:
libsndfile: Libsndfile is a C library for reading and writing files containing
libsndfile: sampled sound (such as MS Windows WAV and Apple/SGI AIFF format).
libsndfile:
libsndfile: Homepage: http://www.mega-nerd.com/libsndfile/
libsndfile:
libsndfile:
libsndfile:
libsndfile:
libsndfile:
EOF
sudo -S mv -v /tmp/slack-desc install/ &&
sudo -S makepkg -l y -c n $PKGS/libsndfile-1.2.2-$PSUFFIX &&
cd /BMAN
cat > /tmp/slack-desc << "EOF"
libsndfile-doc: Manuals for libsndfile (C library for reading and writing wav files)
libsndfile-doc:
libsndfile-doc: Libsndfile is a C library for reading and writing files containing
libsndfile-doc: sampled sound (such as MS Windows WAV and Apple/SGI AIFF format).
libsndfile-doc:
libsndfile-doc: http://www.mega-nerd.com/libsndfile/
libsndfile-doc:
EOF
sudo -S mv -v /tmp/slack-desc install/ &&
sudo -S makepkg -l y -c n $PKGS/libsndfile-doc-1.2.2-$NOPSUFFIX
sudo -S rm -rf /BMAN/*
sudo -S rm -rf ${BUILD}/*