2021-06-15 10:26:26 +02:00
|
|
|
|
#!/bin/bash
|
2020-11-30 11:02:58 +01:00
|
|
|
|
|
|
|
|
|
# variables
|
|
|
|
|
TAG=gwh
|
|
|
|
|
TMP=/tmp/$TAG
|
|
|
|
|
CWD=$(pwd)
|
|
|
|
|
OUTPUT=/tmp
|
|
|
|
|
|
|
|
|
|
PRGNAM=$(basename $CWD)
|
|
|
|
|
PKG=$TMP/pkg-$PRGNAM
|
|
|
|
|
|
|
|
|
|
ARCH=$(uname -m)
|
|
|
|
|
BUILD=1
|
2021-09-23 15:52:55 +02:00
|
|
|
|
GITHUB_REPO=marazmista/radeon-profile
|
|
|
|
|
VERSION=${VERSION:-$(curl -s https://api.github.com/repos/${GITHUB_REPO}/releases/latest | jq -r .tag_name | sed 's|^null$|trunk|')} # or VERSION=trunk
|
2020-11-30 11:02:58 +01:00
|
|
|
|
|
|
|
|
|
REPOSITORY=/home/installs/SlackBuilds/repositories/$PRGNAM
|
|
|
|
|
|
|
|
|
|
# nettoyage pr<70>alable
|
|
|
|
|
rm -fr $PKG $TMP/$PRGNAM
|
|
|
|
|
|
|
|
|
|
mkdir -p $PKG
|
|
|
|
|
|
|
|
|
|
# mise en place
|
2021-09-23 15:52:55 +02:00
|
|
|
|
[ ! -e $REPOSITORY ] && git clone https://github.com/${GITHUB_REPO}.git $REPOSITORY
|
2021-06-15 10:59:49 +02:00
|
|
|
|
cd $REPOSITORY
|
|
|
|
|
git pull --all
|
2020-11-30 11:02:58 +01:00
|
|
|
|
|
|
|
|
|
cp -R $REPOSITORY $TMP/$PRGNAM
|
|
|
|
|
cd $TMP/$PRGNAM/$PRGNAM/
|
2021-06-15 15:15:18 +02:00
|
|
|
|
[ "x$VERSION" == "xtrunk" ] && VERSION="git_$(git log -1 --format=%h_%ad --date=format:%Y.%m.%d)" || git checkout $VERSION
|
2020-11-30 11:02:58 +01:00
|
|
|
|
|
|
|
|
|
qmake-qt5 DISABLE_UPDATE_CHECK=1 DOCS_DIR=/usr/doc/$PRGNAM MAN_DIR=/usr/man/man1
|
|
|
|
|
CFLAGS="$SLKCFLAGS" \
|
|
|
|
|
CXXFLAGS="$SLKCFLAGS" \
|
|
|
|
|
make
|
|
|
|
|
make INSTALL_ROOT="$PKG" install
|
|
|
|
|
|
|
|
|
|
mkdir -p $PKG/usr/doc/$PRGNAM
|
|
|
|
|
cp ../{LICENSE,README.md} $PKG/usr/doc/$PRGNAM
|
|
|
|
|
|
|
|
|
|
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
|
|
|
|
|
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
|
|
|
|
|
|
|
|
|
|
# correction
|
|
|
|
|
cd $PKG
|
|
|
|
|
chown -R root:root *
|
|
|
|
|
|
|
|
|
|
# embaumement
|
|
|
|
|
mkdir -p $PKG/install
|
|
|
|
|
|
|
|
|
|
cat <<EOF > $PKG/install/slack-desc
|
|
|
|
|
|-----handy-ruler------------------------------------------------------|
|
|
|
|
|
$PRGNAM: $PRGNAM (ATi Radeon cards tool)
|
|
|
|
|
$PRGNAM:
|
|
|
|
|
$PRGNAM: Simple application to read current clocks of ATi Radeon cards
|
|
|
|
|
$PRGNAM: (xf86-video-ati, xf86-video-amdgpu).
|
|
|
|
|
$PRGNAM:
|
|
|
|
|
$PRGNAM:
|
|
|
|
|
$PRGNAM:
|
|
|
|
|
$PRGNAM:
|
|
|
|
|
$PRGNAM:
|
2021-09-23 15:52:55 +02:00
|
|
|
|
$PRGNAM: https://github.com/${GITHUB_REPO}
|
2020-11-30 11:02:58 +01:00
|
|
|
|
$PRGNAM:
|
|
|
|
|
EOF
|
|
|
|
|
|
|
|
|
|
# empaquetage
|
|
|
|
|
cd $PKG
|
|
|
|
|
rm -f $PKG/{,usr/}lib$(uname -m | grep -o 64)/*.la
|
|
|
|
|
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$(echo ${VERSION}_${LIBRARY_VERSION} | sed 's/-//g')-$ARCH-$BUILD$TAG.txz
|