Files
BMLFS/build-scripts/git.build
2023-10-31 20:27:33 -05:00

56 lines
1.9 KiB
Bash

#! /bin/bash
# Git
# Source: https://www.kernel.org/pub/software/scm/git/git-2.42.0.tar.xz
#
# $BUILD = Directory to temporarily install
# $PKGS = Directory to store built packages
#
# DEPS
# Required: NONE
# Recommended: Git
# Optional: pcre2 or pcre, subversion, tk, valgrind
# If optimizing, use these flags with GCC
export CFLAGS="-march=native -pipe "
export CFLAGS+="-O3 -Ofast -falign-functions=32 -ffat-lto-objects -flto=auto "
export CFLAGS+="-fno-semantic-interposition -mprefer-vector-width=256 "
export LDFLAGS="-flto=auto -Wl,-O2 -Wl,--as-needed "
./configure --prefix=/usr \
--with-gitconfig=/etc/gitconfig \
--with-libpcre2 \
--with-python=python3 $BUILDTRUPLE &&
read -p "Compile? " && make -j2 &&
read -p "Press Enter to install" &&
sudo -S make DESTDIR=$BUILD perllibdir=/usr/lib/perl5/5.36/site_perl install &&
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------------------------------------------------------|
git: git (the stupid content tracker)
git:
git: Git is a fast, scalable, distributed revision control system with an
git: unusually rich command set that provides both high-level operations
git: and full access to internals.
git:
git: "git" can mean anything, depending on your mood.
git:
git: Git was originally written by Linus Torvalds and is currently
git: maintained by Junio C. Hamano.
git:
EOF
sudo mv /tmp/slack-desc install/ &&
sudo makepkg -l y -c n $PKGS/git-2.42.0-$PSUFFIX &&
sudo rm -rf $BUILD/*