#! /bin/bash # Jansson 2.14 # Source: https://github.com/akheron/jansson/releases/download/v2.14/jansson-2.14.tar.bz2 # # $BUILD = Directory to temporarily install # $PKGS = Directory to store built packages # # DEPS # Required: NONE # Recommended: NONE # Optional: NONE # 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 $BUILDTRUPLE && read -p "Compile?" && make -j2 && read -p "Install?" && # If not using pkgtools or any other package manager: #sudo -S "make install" sudo -S make DESTDIR=${BUILD} install && sudo -S mkdir -pv ${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 ':'. |-----handy-ruler------------------------------------------------------| jansson: jansson jansson: jansson: The Jansson package contains a library used to encode, decode, and jansson: manipulate JSON data. jansson: jansson: Homepage: http://www.digip.org/jansson jansson: jansson: jansson: jansson: jansson: EOF sudo -S mv /tmp/slack-desc ${BUILD}/install/ && cd $BUILD && sudo -S makepkg -l y -c n $PKGS/jansson-2.14-$(uname -m)-mlfs.txz && sudo -S rm -rf ${BUILD}/*