Merge branch 'master' of github.com:gwenhael-le-moine/slackbuilds
This commit is contained in:
commit
68c50084c7
1 changed files with 80 additions and 0 deletions
80
ap/ncdu/SlackBuild
Executable file
80
ap/ncdu/SlackBuild
Executable file
|
@ -0,0 +1,80 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# variables
|
||||||
|
VERSION=${VERSION:-latest}
|
||||||
|
|
||||||
|
BUILD=1
|
||||||
|
|
||||||
|
TAG=gwh
|
||||||
|
OUTPUT=/tmp
|
||||||
|
TMP=/tmp/$TAG
|
||||||
|
CWD=$(pwd)
|
||||||
|
|
||||||
|
PRGNAM=$(basename "$CWD")
|
||||||
|
PKG=$TMP/pkg-$PRGNAM
|
||||||
|
|
||||||
|
ARCH=$(uname -m)
|
||||||
|
|
||||||
|
REPOSITORY=/home/installs/SlackBuilds/_repositories/$PRGNAM
|
||||||
|
PREFIX=/usr
|
||||||
|
|
||||||
|
# nettoyage préalable
|
||||||
|
rm -fr "$PKG" "${TMP:?}/$PRGNAM"
|
||||||
|
|
||||||
|
mkdir -p "$PKG"
|
||||||
|
|
||||||
|
# mise en place
|
||||||
|
[ ! -e "$REPOSITORY" ] && git clone https://code.blicky.net/yorhel/ncdu.git --recursive "$REPOSITORY"
|
||||||
|
cd "$REPOSITORY" || exit 1
|
||||||
|
git pull --all
|
||||||
|
git submodule update
|
||||||
|
|
||||||
|
cp -R "$REPOSITORY" $TMP/
|
||||||
|
cd "$TMP/$PRGNAM/" || exit 1
|
||||||
|
|
||||||
|
git checkout zig-0.10
|
||||||
|
|
||||||
|
[ "$VERSION" == "latest" ] && VERSION=$(git describe --tags --abbrev=0)
|
||||||
|
[ "$VERSION" == "" ] && VERSION=trunk
|
||||||
|
[ "$VERSION" == "trunk" ] && VERSION="git_$(git log -1 --format=%h_%ad --date=format:%Y.%m.%d)" || git checkout "$VERSION"
|
||||||
|
|
||||||
|
#zig build -Drelease-safe --prefix "$PKG$PREFIX" install
|
||||||
|
make
|
||||||
|
make install PREFIX="$PKG$PREFIX" MANDIR="$PKG$PREFIX"/man/man1
|
||||||
|
|
||||||
|
mkdir -p "$PKG$PREFIX/doc/$PRGNAM"
|
||||||
|
cp -a LICENSES/ ChangeLog ./*.md "$PKG$PREFIX/doc/$PRGNAM/"
|
||||||
|
|
||||||
|
# correction
|
||||||
|
cd "$PKG" || exit 1
|
||||||
|
chown -R root:root ./*
|
||||||
|
[ -d "$PKG$PREFIX/man" ] && find "$PKG$PREFIX/man" -name "*.?" -type f -exec gzip -9 {} \;
|
||||||
|
|
||||||
|
# embaumement
|
||||||
|
mkdir -p "$PKG/install"
|
||||||
|
|
||||||
|
cat <<EOF > "$PKG/install/slack-desc"
|
||||||
|
# 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------------------------------------------------------|
|
||||||
|
$PRGNAM: $PRGNAM (NCurses Disk Usage)
|
||||||
|
$PRGNAM:
|
||||||
|
$PRGNAM: Ncdu is a disk usage analyzer with an ncurses interface. It is
|
||||||
|
$PRGNAM: designed to find space hogs on a remote server where you don’t have
|
||||||
|
$PRGNAM: an entire graphical setup available, but it is a useful tool even on
|
||||||
|
$PRGNAM: regular desktop systems. Ncdu aims to be fast, simple and easy to
|
||||||
|
$PRGNAM: use, and should be able to run in any minimal POSIX-like environment
|
||||||
|
$PRGNAM: with ncurses installed.
|
||||||
|
$PRGNAM:
|
||||||
|
$PRGNAM:
|
||||||
|
$PRGNAM: https://dev.yorhel.nl/ncdu
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# empaquetage
|
||||||
|
rm -f "$PKG/{,usr/}lib$(uname -m | grep -o 64)/*.la"
|
||||||
|
/sbin/makepkg -l y -c n "$OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz"
|
Loading…
Reference in a new issue