Files
BMLFS/build-scripts/parted.build
2023-11-01 16:53:22 -05:00

69 lines
2.4 KiB
Bash

#! /bin/bash
# parted
# Source: https://ftp.gnu.org/gnu/parted/parted-3.6.tar.xz
#
# $BUILD = Directory to temporarily install
# $PKGS = Directory to store built packages
#
# DEPS
# Required: NONE
# Recommended: LVM2
# Optional: dosfstools, pth, texlive, Digest:CRC
# If coptimizing with GCC:
export CFLAGS="-march=native -pipe "
export CFLAGS+="-O3 -Os -fdata-sections -ffat-lto-objects "
export CFLAGS+="-ffunction-sections -flto=4 -fno-semantic-interposition "
export CXXFLAGS=$CFLAGS
export LDFLAGS="-flto=4 -Wl,-O2 -Wl,--as-needed "
# libparted-fs-resize: require libuuid
patch -Np1 -i ../patches/parted-chimera/uuid.patch
./configure --prefix=/usr --disable-static \
--enable-device-mapper $BUILDTRUPLE &&
read -p "Compile?" && make -j2 &&
sudo -S make DESTDIR=$BUILD install &&
sudo -S mkdir -pv /BMAN/install /BMAN/usr/share && \
sudo -S mv $BUILD/usr/share/man /BMAN/usr/share/ && \
sudo -S mv $BUILD/usr/share/info /BMAN/usr/share/ && \
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------------------------------------------------------|
parted: parted (GNU disk partitioning tool)
parted:
parted: GNU Parted is a program for creating, destroying, resizing, checking
parted: and copying partitions, and the filesystems on them. This is useful
parted: for creating space for new operating systems, reorganizing disk
parted: usage, copying data between hard disks, and disk imaging.
parted:
parted:
parted:
parted:
parted:
EOF
sudo -S mv -v /tmp/slack-desc install/ &&
sudo -S makepkg -l y -c n $PKGS/parted-3.6-$PSUFFIX && \
cd /BMAN && \
cat > /tmp/slack-desc << "EOF"
parted-doc: Manuals for parted
parted-doc:
parted-doc: A program for creating, destroying, resizing, checking and copying
parted-doc: partitions, and the filesystems on them.
parted-doc:
EOF
sudo -S mv -v /tmp/slack-desc install/ && \
sudo -S makepkg -l y -c n $PKGS/parted-doc-3.6-$NOPSUFFIX && \
sudo -S rm -rf ${BUILD}/* /BMAN/*