#! /bin/bash # Trousers # Source: https://sourceforge.net/projects/trousers/files/trousers/0.3.15/trousers-0.3.15.tar.gz # # $BUILD = Directory to temporarily install # $PKGS = Directory to store built packages # # DEPS # Required: NONE # Recommended: NONE # Optional: NONE patch -Np1 -i ../patches/trousers-void/musl-getpwent_r.patch # Fix a typo patch -Np1 -i ../patches/trousers-mlfs/rsakey_not_static.patch CFLAGS+="-fcommon" # Generate configure script ./bootstrap.sh # Configure source ./configure --prefix=/usr --with-gmp $BUILDTRUPLE read -p "Compile?" && make -j2 && 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 sudo -S mv $BUILD/usr/share /BMAN/usr/ read -p "Press Enter to create package description." && 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------------------------------------------------------| trousers: TrouSers trousers: trousers: The open-source TCG Software Stack. trousers: trousers: Provides tools and libraries to use a system's Trusted Platform trousers: Module(TPM). trousers: trousers: https://sourceforge.net/projects/trousers/ trousers: trousers: EOF sudo mv /tmp/slack-desc install/ && read -p "Enter to build package" && sudo makepkg -l y -c n $PKGS/trousers-0.3.15-$(uname -m)-mlfs.txz && cd /BMAN cat > /tmp/slack-desc << "EOF" |-----handy-ruler------------------------------------------------------| trousers-doc: Manuals for TrouSers trousers-doc: trousers-doc: The open-source TCG Software Stack. trousers-doc: trousers-doc: Provides tools and libraries to use a system's Trusted Platform trousers-doc: Module(TPM). trousers-doc: trousers-doc: https://sourceforge.net/projects/trousers/ trousers-doc: trousers-doc: EOF sudo mv /tmp/slack-desc install/ && sudo makepkg -l y -c n $PKGS/trousers-doc-0.3.15-noarch-mlfs.txz sudo rm -rf $BUILD/* sudo rm -rf /BMAN/*