#! /bin/bash # Speex # Source: https://downloads.xiph.org/releases/speex/speex-1.2.1.tar.gz # Source: https://downloads.xiph.org/releases/speex/speexdsp-1.2.1.tar.gz # # $BUILD = Directory to temporarily install # $PKGS = Directory to store built packages # # DEPS # Required: libogg # Recommended: NONE # Optional: NONE # If optimizing, use these flags with GCC export CFLAGS="-march=native -pipe " export CFLAGS+="-O3 -falign-functions=32 -ffast-math " export CFLAGS+="-ffat-lto-objects -flto=4 -fno-math-errno " export CFLAGS+="-fno-semantic-interposition -fno-trapping-math " export CFLAGS+="-ftree-loop-vectorize " export LDFLAGS="-flto=4 -Wl,-O2 -Wl,--as-needed " ./configure --prefix=/usr \ --disable-static \ --docdir=/usr/share/doc/speex-1.2.1 $BUILDTRUPLE && read -p "Compile?" && make -j2 && sudo -S make DESTDIR=$BUILD install && sudo -S mkdir -pv /BMAN/install sudo -S mkdir -pv /BMAN/usr/share sudo -S mv $BUILD/usr/share/doc /BMAN/usr/share/ cd .. && tar -xf speexdsp-1.2.0.tar.gz && cd speexdsp-1.2.0 && # If optimizing, use these flags with GCC export CFLAGS="-march=native -pipe " export CFLAGS+="-O3 -ffat-lto-objects -flto=4 " export LDFLAGS="-flto=4 -Wl,-O2 -Wl,--as-needed " ./configure --prefix=/usr \ --disable-static \ --docdir=/usr/share/doc/speexdsp-1.2.1 $BUILDTRUPLE && read -p "Compile?" && make -j2 && sudo -S make DESTDIR=$BUILD install && sudo -S mv $BUILD/usr/share/doc/* /BMAN/usr/share/doc/ sudo -S rm -rf $BUILD/usr/share/doc 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------------------------------------------------------| speex: Speex speex: speex: Speex is an audio compression format designed especially for speech. speex: It is well-adapted to internet applications and provides useful speex: features that are not present in most other CODECs. speex: speex: Homepage: https://www.speex.org/ speex: speex: speex: EOF sudo -S mv -v /tmp/slack-desc install/ && sudo -S makepkg -l y -c n $PKGS/speex-1.2.1-$PSUFFIX && cd /BMAN cat > /tmp/slack-desc << "EOF" speex-doc: Manuals for Speex speex-doc: speex-doc: Speex is an audio compression format designed especially for speech. speex-doc: It is well-adapted to internet applications and provides useful speex-doc: features that are not present in most other CODECs. speex-doc: speex-doc: https://www.speex.org/ speex-doc: EOF sudo -S mv -v /tmp/slack-desc install/ && sudo -S makepkg -l y -c n $PKGS/speex-doc-1.2.1-$NOPSUFFIX sudo -S rm -rf /BMAN/* sudo -S rm -rf ${BUILD}/*