Files
BMLFS/build-scripts/popt.build
2023-12-21 22:55:35 -06:00

74 lines
3.0 KiB
Bash

#! /bin/bash
# Popt
# Source: http://ftp.rpm.org/popt/releases/popt-1.x/popt-1.19.tar.gz
#
# $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+="-Os -fdata-sections -ffunction-sections "
export CFLAGS+="-fno-lto -fno-semantic-interposition "
export CXXFLAGS=$CFLAGS
unset LDFLAGS
cp -v ../files/config.sub-musl config.sub &&
cp -v ../files/config.guess-musl 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
sudo -S mkdir -pv /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------------------------------------------------------|
popt: popt (command line parsing library)
popt:
popt: Popt is a C library for parsing command line parameters. Popt was
popt: heavily influenced by the getopt() and getopt_long() functions, but it
popt: improves on them by allowing more powerful argument expansion. Popt
popt: can parse arbitrary argv[] style arrays and automatically set
popt: variables based on command line arguments. Popt allows command line
popt: arguments to be aliased via configuration files and includes utility
popt: functions for parsing arbitrary strings into argv[] arrays using
popt: shell-like rules.
popt:
EOF
sudo -S mv -v /tmp/slack-desc install/ &&
sudo -S makepkg -l y -c n $PKGS/popt-1.19-$PSUFFIX &&
cd /BMAN
cat > /tmp/slack-desc << "EOF"
popt-doc: Manuals for popt (command line parsing library)
popt-doc:
popt-doc: Popt is a C library for parsing command line parameters. Popt was
popt-doc: heavily influenced by the getopt() and getopt_long() functions, but it
popt-doc: improves on them by allowing more powerful argument expansion. Popt
popt-doc: can parse arbitrary argv[] style arrays and automatically set
popt-doc: variables based on command line arguments. Popt allows command line
popt-doc: arguments to be aliased via configuration files and includes utility
popt-doc: functions for parsing arbitrary strings into argv[] arrays using
popt-doc: shell-like rules.
EOF
sudo -S mv -v /tmp/slack-desc install/ &&
sudo -S makepkg -l y -c n $PKGS/popt-doc-1.19-$NOPSUFFIX
sudo -S rm -rf /BMAN/*
sudo -S rm -rf ${BUILD}/*