#! /bin/bash # LibUnistring # Source: https://ftp.gnu.org/gnu/libunistring/libunistring-1.1.tar.xz # # $BUILD = Directory to temporarily install # $PKGS = Directory to store built packages # # DEPS # Required: NONE # Recommended: NONE # Optional: texlive(or install-tl-unx) (to rebuild the documentation) # LTO: tested with LLVM # If optimizing, use these flags export CFLAGS="-march=native -mtune=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/libunistring-1.1 $BUILDTRUPLE && read -p "Compile?" && make -j2 && read -p "Install?" && # If not using any package manager: #sudo -S make install 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/ sudo -S mkdir -v $BUILD/install && cd $BUILD && 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 ':'. |-----handy-ruler------------------------------------------------------| libunistring: libunistring (GNU Unicode string library) libunistring: libunistring: This library provides functions for manipulating Unicode strings and libunistring: for manipulating C strings according to the Unicode standard. libunistring: libunistring: Homepage: http://www.gnu.org/s/libunistring libunistring: libunistring: libunistring: libunistring: libunistring: EOF sudo -S mv /tmp/slack-desc install/ && sudo -S makepkg -l y -c n $PKGS/libunistring-1.1-$PSUFFIX && cd /BMAN 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 ':'. |-----handy-ruler------------------------------------------------------| libunistring-doc: Manuals for libunistring (GNU Unicode string library) libunistring-doc: libunistring-doc: This library provides functions for manipulating Unicode strings and libunistring-doc: for manipulating C strings according to the Unicode standard. libunistring-doc: libunistring-doc: Homepage: http://www.gnu.org/s/libunistring libunistring-doc: libunistring-doc: EOF sudo -S mv /tmp/slack-desc install/ sudo -S makepkg -l y -c n $PKGS/libunistring-doc-1.1-$NOPSUFFIX sudo -S rm -rf /BMAN/* sudo -S rm -rf ${BUILD}/*