#! /bin/bash # DOSfstools 4.2 # source: https://github.com/dosfstools/dosfstools/releases/download/v4.2/dosfstools-4.2.tar.gz # # $BUILD = Directory to temporarily install # $PKGS = Directory to store built packages # # DEPS # Required: NONE # Recommended: NONE # Optional: NONE # LTO: GCC+Binutils tested # If optimizing: 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=/ \ --enable-compat-symlinks \ --mandir=/usr/share/man \ --docdir=/usr/share/doc/dosfstools-4.2 $BUILDTRUPLE && read -p "Compile? " && make -j2 && read -p "Press Enter to 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/ && \ cd $BUILD && sudo mkdir -v 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------------------------------------------------------| dosfstools: dosfstools (tools for working with FAT filesystems) dosfstools: dosfstools: Utilities for creating FAT filesystems (mkdosfs), and for checking dosfstools: and repairing them (dosfsck). dosfstools: dosfstools: Homepage: http://daniel-baumann.ch/software/dosfstools dosfstools: dosfstools: dosfstools: dosfstools: dosfstools: EOF sudo mv /tmp/slack-desc install/ && sudo makepkg -l y -c n $PKGS/dosfstools-4.2-$(uname -m)-mlfs.txz && cd /BMAN cat > /tmp/slack-desc << "EOF" dosfstools-doc: Manuals for dosfstools (tools for working with FAT filesystems) dosfstools-doc: dosfstools-doc: Utilities for creating FAT filesystems (mkdosfs), and for checking dosfstools-doc: and repairing them (dosfsck). dosfstools-doc: dosfstools-doc: Homepage: http://daniel-baumann.ch/software/dosfstools dosfstools-doc: EOF sudo mv /tmp/slack-desc install/ && sudo makepkg -l y -c n $PKGS/dosfstools-doc-4.2-noarch-mlfs.txz sudo rm -rf /BMAN/* sudo rm -rf $BUILD/*