From f7b8bc6142deceddaa509923e9f079c50c7fa787 Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Tue, 18 Dec 2018 15:00:10 +0100 Subject: [PATCH] i3blocks-contrib --- fonts/Font-Awesome/SlackBuild | 8 ++--- xap/i3blocks-contrib/SlackBuild | 63 +++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+), 5 deletions(-) create mode 100755 xap/i3blocks-contrib/SlackBuild diff --git a/fonts/Font-Awesome/SlackBuild b/fonts/Font-Awesome/SlackBuild index e6aef237..2cf0c3f5 100755 --- a/fonts/Font-Awesome/SlackBuild +++ b/fonts/Font-Awesome/SlackBuild @@ -27,11 +27,9 @@ rm -rf $OUTPUT/{configure,make,install,error,makepkg}-$PRGNAM.log VERSION="$( cd $REPOSITORY && git log -1 --format=%h_%ad --date=format:%Y.%m.%d )" # Move the fonts into place: -mkdir -p $PKG$FONTDIR/{OTF,TTF} $PKG/usr/doc/ -cp -R $REPOSITORY $PKG/usr/doc/$PRGNAM -rm -fr $PKG/usr/doc/$PRGNAM/.git{ignore,} -cp $REPOSITORY/font/*.ttf $PKG$FONTDIR/TTF -cp $REPOSITORY/font/*.otf $PKG$FONTDIR/OTF +mkdir -p $PKG$FONTDIR/OTF $PKG/usr/doc/$PRGNAM +cp $REPOSITORY/*.{md,txt} $PKG/usr/doc/$PRGNAM +cp $REPOSITORY/otfs/*.otf $PKG$FONTDIR/OTF # Post-install script: mkdir -p $PKG/install diff --git a/xap/i3blocks-contrib/SlackBuild b/xap/i3blocks-contrib/SlackBuild new file mode 100755 index 00000000..3abbedb3 --- /dev/null +++ b/xap/i3blocks-contrib/SlackBuild @@ -0,0 +1,63 @@ +#!/bin/sh + +# variables +CWD=$(pwd) + +PRGNAM=$(basename $(pwd)) +BRANCH= +ARCH=${ARCH:-$(uname -m)} +BUILD=1 + +TAG=cyco +TMP=/tmp/$TAG +PKG=$TMP/pkg-$PRGNAM +OUTPUT=/tmp + +REPOSITORIES=/home/installs/SlackBuilds/repositories + +PREFIX=/usr + +[ ! -e $REPOSITORIES/$PRGNAM ] && git clone https://github.com/vivien/i3blocks-contrib $REPOSITORIES/$PRGNAM +( cd $REPOSITORIES/$PRGNAM + git pull +) +VERSION="$( cd $REPOSITORIES/$PRGNAM && git log -1 --format=%h_%ad --date=format:%Y.%m.%d )" + +# nettoyage préalable +rm -fr $PKG + +mkdir -p $PKG$PREFIX/libexec/ + +# installation +cp -R $REPOSITORIES/$PRGNAM $PKG$PREFIX/libexec/ +cd $PKG$PREFIX/libexec/$PRGNAM/ +rm .gitignore +rm -fr .git + +mkdir -p $PKG$PREFIX/doc/$PRGNAM +mv *.md *.adoc config.example $PKG$PREFIX/doc/$PRGNAM + +# correction +cd $PKG +chown -R root:root * + +# embaumement +mkdir -p $PKG/install +cat < $PKG/install/slack-desc +$PRGNAM: $PRGNAM (Official repository for community contributed blocklets) +$PRGNAM: +$PRGNAM: This repository contains a set of scripts (a.k.a. blocklets) for i3blocks, +$PRGNAM: contributed by the community. +$PRGNAM: +$PRGNAM: +$PRGNAM: +$PRGNAM: +$PRGNAM: +$PRGNAM: https://github.com/vivien/i3blocks-contrib +$PRGNAM: +EOF + +# empaquetage +cd $PKG +rm -f $PKG/{,usr/}lib$(uname -m | grep -o 64)/*.la +makepkg -l y -c n $OUTPUT/$PRGNAM-$(echo $VERSION | sed 's/-//g')-$ARCH-$BUILD$TAG.txz