mirror of
https://github.com/dslm4515/BMLFS.git
synced 2025-08-03 16:40:25 +00:00
60 lines
1.8 KiB
Bash
60 lines
1.8 KiB
Bash
#! /bin/bash
|
|
|
|
# Libgit2
|
|
# Source: https://github.com/libgit2/libgit2/archive/refs/tags/v1.7.1.tar.gz
|
|
#
|
|
# $BUILD = Directory to temporarily install
|
|
# $PKGS = Directory to store built packages
|
|
#
|
|
# DEPS
|
|
# Required: CMake, OpenSSL or LibreSSL
|
|
# Recommended: PCRE
|
|
# Optional: libssh2, http-parser
|
|
|
|
# If coptimizing with GCC:
|
|
export CFLAGS="-march=native -pipe "
|
|
export CFLAGS+="-O3 -ffat-lto-objects -flto=4 "
|
|
export LDFLAGS="-flto=4 -Wl,-O2 -Wl,--as-needed "
|
|
|
|
mkdir -v build && cd build &&
|
|
|
|
CFLAGS="-D__ANDROID_API__" \
|
|
cmake -DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DCMAKE_BUILD_TYPE="Release" \
|
|
-DTHREADSAFE=ON .. &&
|
|
|
|
read -p "Compile? " && make -j2 &&
|
|
|
|
# If not using any package manager:
|
|
#sudo -S make install
|
|
|
|
sudo -S make DESTDIR=$BUILD install &&
|
|
|
|
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------------------------------------------------------|
|
|
libgit2: libgit2 (C library for custom Git applications)
|
|
libgit2:
|
|
libgit2: libgit2 is a portable, pure C implementation of the Git core methods
|
|
libgit2: provided as a re-entrant linkable library with a solid API, allowing
|
|
libgit2: you to write native speed custom Git applications in any language
|
|
libgit2: which supports C bindings.
|
|
libgit2:
|
|
libgit2: Homepage: https://libgit2.github.com/
|
|
libgit2:
|
|
libgit2:
|
|
libgit2:
|
|
EOF
|
|
|
|
sudo -S mv -v /tmp/slack-desc install/ &&
|
|
sudo -S makepkg -l y -c n $PKGS/libgit2-1.7.1-$PSUFFIX &&
|
|
sudo -S rm -rf ${BUILD}/*
|
|
|