Files
BMLFS/build-scripts/krb5.build
2023-12-21 23:09:57 -06:00

112 lines
3.8 KiB
Bash

#! /bin/bash
# MIT Kerberos V5
# Source: https://kerberos.org/dist/krb5/1.21/krb5-1.21.2.tar.gz
#
# $BUILD = Directory to temporarily install
# $PKGS = Directory to store built packages
#
# DEPS
# Required: NONE
# Recommended: NONE
# Optional: GnuPG, keyutils, OpenLDAP, Valgrind, libedit, cmocka, pyrad, resolv_wrapper
#
# Does not support LibreSSL ...without a patch!
cd src &&
patch -Np1 -i ../../patches/krb5-void/libressl.patch
#sed -i -e 's@\^u}@^u cols 300}@' tests/dejagnu/config/default.exp &&
sed -i -e '/eq 0/{N;s/12 //}' plugins/kdb/db2/libdb2/test/run.test &&
#sed -i '/t_iprop.py/d' tests/Makefile.in
#WARN_CFLAGS= ./configure \
./configure \
--prefix=/usr \
--localstatedir=/var/lib \
--sbindir=/usr/bin \
--disable-rpath \
--with-system-et \
--with-system-ss \
--enable-shared \
--disable-nls \
--disable-pkinit \
--without-keyutils $BUILDTRUPLE \
ac_cv_func_pthread_once=yes ac_cv_func_pthread_rwlock_init=yes \
acx_pthread_ok=yes ac_cv_func_regcomp=yes ac_cv_printf_positional=yes \
krb5_cv_attr_constructor_destructor=yes,yes
read -p "Compile?" && make -j2 &&
sudo -S make DESTDIR=$BUILD install &&
# If packing documentation and man pages in seperate package:
sudo mkdir -pv /BMAN/install
sudo install -v -dm755 /BMAN/usr/share/doc/krb5-1.19.2
sudo cp -vfr ../doc/* /BMAN/usr/share/doc/krb5-1.19.2
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------------------------------------------------------|
krb5: krb5 (Network authentication protocol)
krb5:
krb5: Kerberos is a network authentication protocol. It is designed to
krb5: provide strong authentication for client/server applications by using
krb5: secret-key cryptography.
krb5:
krb5: Homepage: http://web.mit.edu/kerberos/
krb5:
krb5:
krb5:
krb5:
EOF
sudo -S mv -v /tmp/slack-desc install/ &&
for f in gssapi_krb5 gssrpc k5crypto kadm5clnt kadm5srv \
kdb5 kdb_ldap krad krb5 krb5support verto ; do
sudo -S find usr/lib -type f -name "lib$f*.so*" -exec chmod -v 755 {} \;
done &&
sudo -S chmod -v 755 usr/bin/ksu &&
# If packing documentation and man pages in seperate package:
sudo mv usr/share/* /BMAN/usr/share/
# Pack the main package
sudo -S makepkg -l y -c n $PKGS/krb5-1.21.2-$PSUFFIX &&
# Pack the doc package
cd /BMAN
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------------------------------------------------------|
krb5-doc: Manuals for krb5 (Network authentication protocol)
krb5-doc:
krb5-doc: Kerberos is a network authentication protocol. It is designed to
krb5-doc: provide strong authentication for client/server applications by using
krb5-doc: secret-key cryptography.
krb5-doc:
krb5-doc: Homepage: http://web.mit.edu/kerberos/
krb5-doc:
krb5-doc:
krb5-doc:
krb5-doc:
EOF
sudo -S mv -v /tmp/slack-desc install/
sudo -S makepkg -l y -c n $PKGS/krb5-doc-1.21.2-$NOPSUFFIX
sudo -S rm -rf ${BUILD}/*
sudo -S rm -rf /BMAN/*