#! /bin/bash # libbytesize # Source: https://github.com/storaged-project/libbytesize/releases/download/2.10/libbytesize-2.10.tar.gz # # $BUILD = Directory to temporarily install # $PKGS = Directory to store built packages # # DEPS # Required: pcre2, Pygments # Recommended: NONE # Optional: GTK-Doc, six # If coptimizing with GCC: export CFLAGS="-march=native -pipe " export CFLAGS+="-O3 -ffat-lto-objects -flto=4 " export CXXFLAGS=$CFLAGS export LDFLAGS="-flto=4 -Wl,-O2 -Wl,--as-needed " # If mpfr is not in /usr, add these flags: LDFLAGS=" -L/opt/gnu/lib -Wl,-rpath=/opt/gnu/lib" \ CPPFLAGS="-I/opt/gnu/include " \ ./configure --prefix=/usr $BUILDTRUPLE --with-python3 && read -p "Compile?" && make -j2 && sudo -S make DESTDIR=$BUILD install && sudo -S mkdir -pv /BMAN/install /BMAN/usr/share && \ sudo -S mv $BUILD/usr/share/man /BMAN/usr/share/ && \ sudo -S mv $BUILD/usr/share/gtk-doc /BMAN/usr/share/ && \ 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------------------------------------------------------| libbytesize: libbytesize (library for working with big sizes in bytes) libbytesize: libbytesize: libbytesize is a tiny library providing a C "class" for working libbytesize: with arbitrary big sizes in bytes. libbytesize: libbytesize: Homepage: https://github.com/rhinstaller/libbytesize libbytesize: libbytesize: libbytesize: libbytesize: libbytesize: EOF sudo -S mv -v /tmp/slack-desc install/ && sudo -S makepkg -l y -c n $PKGS/libbytesize-2.10-$PSUFFIX && cd /BMAN && \ cat > /tmp/slack-desc << "EOF" libbytesize-doc: Manuals for libbytesize libbytesize-doc: libbytesize-doc: A tiny library providing a C "class" for working with arbitrary big libbytesize-doc: sizes in bytes. libbytesize-doc: EOF sudo -S mv -v /tmp/slack-desc install/ && sudo -S makepkg -l y -c n $PKGS/libbytesize-doc-2.10-$PSUFFIX && \ sudo -S rm -rf ${BUILD}/* /BMAN/*