#! /bin/bash # Smartmontools # Source: https://downloads.sourceforge.net/smartmontools/smartmontools-7.3.tar.gz # # $BUILD = Directory to temporarily install # $PKGS = Directory to store built packages # DEPS # Required: NONE # Recommended: NONE # Optional: cURL or Lynx or Wget, and GnuPG # 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 " ./configure --prefix=/usr \ --sysconfdir=/etc \ --with-initscriptdir=no \ --with-libsystemd=no \ --docdir=/usr/share/doc/smartmontools-7.3 \ $BUILDTRUPLE && read -p "Compile? " && make -j2 && read -p "Install?" && sudo -S make DESTDIR=$BUILD install && sudo -S mkdir -pv /BMAN/install /BMAN/usr/share && \ sudo -S mv $BUILD/usr/share/doc /BMAN/usr/share/ && \ sudo -S mv $BUILD/usr/share/man /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------------------------------------------------------| smartmontools: smartmontools (hard drive monitoring utilities) smartmontools: smartmontools: SMARTMONTOOLS contains utilities that control and monitor storage smartmontools: devices using the Self-Monitoring, Analysis, and Reporting Technology smartmontools: (S.M.A.R.T.) system build into ATA and SCSI Hard Drives. This is used smartmontools: to check the reliability of the hard drive and to predict drive smartmontools: failures. smartmontools: smartmontools: smartmontools: smartmontools: EOF sudo -S mv -v /tmp/slack-desc install/ && sudo -S makepkg -l y -c n $PKGS/smartmontools-7.3-$(uname -m)-mlfs.txz && \ cd /BMAN && \ cat > /tmp/slack-desc << "EOF" smartmontools-docs: Manuals for smartmontools (hard drive monitoring utilities) smartmontools-docs: smartmontools-docs: Utilities that control and monitor storage devices using the smartmontools-docs: Self-Monitoring, Analysis, and Reporting Technology (S.M.A.R.T.) smartmontools-docs: system build into ATA and SCSI Hard Drives. This is used to smartmontools-docs: check the reliability of the hard drive and to predict drive smartmontools-docs: failures. smartmontools-docs: EOF sudo -S mv -v /tmp/slack-desc install/ && \ sudo -S makepkg -l y -c n $PKGS/smartmontools-doc-7.3-noarch-mlfs.txz && \ sudo -S rm -rf ${BUILD}/* /BMAN/*