mirror of
https://github.com/dslm4515/BMLFS.git
synced 2025-08-03 16:40:25 +00:00
109 lines
3.7 KiB
Bash
109 lines
3.7 KiB
Bash
#! /bin/bash
|
|
|
|
# cURL
|
|
# Source: https://curl.se/download/curl-8.14.1.tar.xz
|
|
#
|
|
# $BUILD = Directory to temporarily install
|
|
# $PKGS = Directory to store built packages
|
|
#
|
|
# DEPS
|
|
# Required: NONE
|
|
# Recommended: ca-certificates
|
|
# Optional: Brotli, c-ares, GnuTLS, libidn2, libpsl,
|
|
# Optional: libssh2, MIT Kerberos V5, nghttp2,
|
|
# Optional: OpenLDAP, Samba, impacket, libmetalink,
|
|
# Optinal: librtmp, ngtcp2, quiche, and SPNEGO
|
|
# LTO: No
|
|
|
|
#autoreconf -vfi &&
|
|
|
|
# If optimizing, use these flags
|
|
# Recommened to not use LTO
|
|
export CFLAGS="-march=native -mtune=native -pipe "
|
|
export CFLAGS+="-Os -fdata-sections -ffunction-sections "
|
|
export CFLAGS+="-fno-lto -fno-semantic-interposition "
|
|
export CFLAGS+="-fstack-protector-strong -fzero-call-used-regs=used "
|
|
export CXXFLAGS=$CFLAGS
|
|
unset LDFLAGS
|
|
|
|
#export CFLAGS+="-D_FORTIFY_SOURCE=2 -I/usr/include/"
|
|
#export CPPFLAGS="-D_FORTIFY_SOURCE=2"
|
|
|
|
# Set build options:
|
|
export CARGS="--disable-static "
|
|
export CARGS+="--enable-threaded-resolver "
|
|
export CARGS+="--with-ca-path=/etc/ssl/certs "
|
|
export CARGS+="--enable-ipv6 "
|
|
export CARGS+="--enable-unix-sockets "
|
|
export CARGS+="--with-pic "
|
|
export CARGS+="--with-openssl "
|
|
export CARGS+="--without-libssh2 " # https://bugs.alpinelinux.org/issues/10222
|
|
|
|
export PVER="8.14.1"
|
|
|
|
#ac_cv_sizeof_off_t=8 \
|
|
./configure --prefix=/usr $CARGS
|
|
|
|
read -p "Compile? " && make -j2 &&
|
|
|
|
unset CFLAGS CPPFLAGS
|
|
|
|
read -p "Press Enter to install" &&
|
|
# 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/man /BMAN/usr/share/
|
|
|
|
# Create 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------------------------------------------------------|
|
|
curl: curl (command line URL data transfer tool)
|
|
curl:
|
|
curl: Curl is a command line tool for transferring data specified with URL
|
|
curl: syntax. The command is designed to work without user interaction or
|
|
curl: any kind of interactivity. Curl offers a busload of useful tricks
|
|
curl: like proxy support, user authentication, ftp upload, HTTP post, SSL
|
|
curl: (https:) connections, cookies, file transfer resume and more.
|
|
curl:
|
|
curl: libcurl is a library that Curl uses to do its job. It is readily
|
|
curl: available to be used by your software, too.
|
|
curl:
|
|
EOF
|
|
sudo mv /tmp/slack-desc install/ &&
|
|
|
|
read -p "Enter to build package" &&
|
|
sudo makepkg -l y -c n $PKGS/curl-$PVER-$PSUFFIX &&
|
|
|
|
cd /BMAN
|
|
cat > /tmp/slack-desc << "EOF"
|
|
curl-doc: Manuals for cURL (command line URL data transfer tool)
|
|
curl-doc:
|
|
curl-doc: cURL is a command line tool for transferring data specified with URL
|
|
curl-doc: syntax. The command is designed to work without user interaction or
|
|
curl-doc: any kind of interactivity. Curl offers a busload of useful tricks
|
|
curl-doc: like proxy support, user authentication, ftp upload, HTTP post, SSL
|
|
curl-doc: (https:) connections, cookies, file transfer resume and more.
|
|
curl-doc:
|
|
curl-doc: libcurl is a library that Curl uses to do its job. It is readily
|
|
curl-doc: available to be used by your software, too.
|
|
EOF
|
|
sudo mv /tmp/slack-desc install/
|
|
|
|
sudo makepkg -l y -c n $PKGS/curl-doc-$PVER-$NOPSUFFIX
|
|
sudo -S rm -rf /BMAN/*
|
|
sudo rm -rf $BUILD/*
|
|
unset PVER CARGS
|
|
|