mirror of
https://github.com/dslm4515/BMLFS.git
synced 2025-08-20 14:31:47 +00:00
67 lines
2.5 KiB
Bash
67 lines
2.5 KiB
Bash
#! /bin/bash
|
|
|
|
# libatasmart
|
|
# Source: http://0pointer.de/public/libatasmart-0.19.tar.xz
|
|
#
|
|
# $BUILD = Directory to temporarily install
|
|
# $PKGS = Directory to store built packages
|
|
#
|
|
# DEPS
|
|
# Required: NONE
|
|
# Recommended: NONE
|
|
# Optional: NONE
|
|
|
|
# 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 "
|
|
|
|
cp -v ../files/config.sub-musl build-aux/config.sub &&
|
|
cp -v ../files/config.guess-musl build-aux/config.guess &&
|
|
|
|
./configure --prefix=/usr --disable-static $BUILDTRUPLE &&
|
|
|
|
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/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------------------------------------------------------|
|
|
libatasmart: libatasmart (ATA S.M.A.R.T. library)
|
|
libatasmart:
|
|
libatasmart: libatasmart is a lean, small and clean implementation of an ATA
|
|
libatasmart: S.M.A.R.T. ((Self-Monitoring, Analysis and Reporting Technology)
|
|
libatasmart: reading and parsing library. S.M.A.R.T. is a system used by hard
|
|
libatasmart: drives to monitor factors that may impact drive reliability in the
|
|
libatasmart: hope of predicting a drive failure before it occurs.
|
|
libatasmart:
|
|
libatasmart: Homepage: http://0pointer.de/blog/projects/being-smart.html
|
|
libatasmart:
|
|
libatasmart:
|
|
EOF
|
|
sudo -S mv -v /tmp/slack-desc install/ &&
|
|
sudo -S makepkg -l y -c n $PKGS/libatasmart-0.19-$(uname -m)-mlfs.txz && \
|
|
cd /BMAN && \
|
|
cat > /tmp/slack-desc << "EOF"
|
|
libatasmart-doc: Manuals for libatasmart
|
|
libatasmart-doc:
|
|
libatasmart-doc: A lean, small and clean implementation of an ATA S.M.A.R.T.
|
|
libatasmart-doc: (Self-Monitoring, Analysis and Reporting Technology) reading and
|
|
libatasmart-doc: parsing library.
|
|
libatasmart-doc:
|
|
EOF
|
|
sudo -S mv -v /tmp/slack-desc install/ &&
|
|
sudo -S makepkg -l y -c n $PKGS/libatasmart-doc-0.19-noarch-mlfs.txz && \
|
|
sudo -S rm -rf ${BUILD}/* /BMAN/*
|