Files
BMLFS/build-scripts/wget.build
2023-05-27 20:18:25 -05:00

82 lines
2.7 KiB
Bash

#! /bin/bash
# Wget
# Source: https://ftp.gnu.org/gnu/wget/wget-1.21.4.tar.gz
#
# $BUILD = Directory to temporarily install
# $PKGS = Directory to store built package
#
# DEPS
# Required: NONE
# Recommended: ca-certificates
# Optional: gnuTLS, HTTP-Daemon, IO-Socket-SSL,
# Optional: libidn2, libpsl, PCRE or pcre2, and Valgrind
# LTO: Tested with LLVM
# If optimizing,
# Recommended not to use LTO
export CFLAGS="-march=native -mtune=native -pipe "
export CFLAGS+="-fno-lto -fstack-protector-strong -fzero-call-used-regs=used "
export CXXFLAGS=$CFLAGS
unset LDFLAGS
ac_cv_header_sys_cdefs_h=false \
./configure --prefix=/usr \
--sysconfdir=/etc \
--with-ssl=openssl $BUILDTRUPLE &&
read -p "Compile? " && make -j2 &&
# if not using a package manager:
# make install
# if using pkgtools from Slackware, then:
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/info /BMAN/usr/share/
sudo -S mv /BUILD/usr/share/man /BMAN/usr/share/
# Build package
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------------------------------------------------------|
wget: wget (a non-interactive network retriever)
wget:
wget: GNU Wget is a free network utility to retrieve files from the
wget: World Wide Web using HTTP and FTP, the two most widely used Internet
wget: protocols. It works non-interactively, thus enabling work in the
wget: background after having logged off.
wget:
wget: The author of Wget is Hrvoje Niksic <hniksic@srce.hr>.
wget:
wget:
wget:
EOF
sudo mv /tmp/slack-desc install/ &&
sudo makepkg -l y -c n $PKGS/wget-1.21.4-$PSUFFIX &&
cd /BMAN
cat > /tmp/slack-desc << "EOF"
wget-doc: Manuals for wget (a non-interactive network retriever)
wget-doc:
wget-doc: GNU Wget is a free network utility to retrieve files from the
wget-doc: World Wide Web using HTTP and FTP, the two most widely used Internet
wget-doc: protocols. It works non-interactively, thus enabling work in the
wget-doc: background after having logged off.
wget-doc:
wget-doc: The author of Wget is Hrvoje Niksic <hniksic@srce.hr>.
wget-doc:
EOF
sudo mv /tmp/slack-desc install/ &&
sudo makepkg -l y -c n $PKGS/wget-doc-1.21.4-$NOPSUFFIX
sudo rm -rf /BMAN/*
sudo rm -rf $BUILD/*