From 0255348d22dbb13a1683c7e91fefdb893398b1cc Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Mon, 5 Feb 2018 10:09:41 +0100 Subject: [PATCH] add nord-xresources --- .../nord-xresources.SlackBuild | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100755 xap/nord-xresources/nord-xresources.SlackBuild diff --git a/xap/nord-xresources/nord-xresources.SlackBuild b/xap/nord-xresources/nord-xresources.SlackBuild new file mode 100755 index 00000000..7bcf176c --- /dev/null +++ b/xap/nord-xresources/nord-xresources.SlackBuild @@ -0,0 +1,69 @@ +#!/bin/sh +set -x + +CWD=$(pwd) + +PRGNAM=$(basename $CWD) +BUILD=1 +TAG=cyco +ARCH=noarch + +OUTPUT=/tmp +TMP=/tmp/$TAG +PKG=$TMP/pkg-$PRGNAM + +REPOSITORY=/home/installs/SlackBuilds/repositories/$PRGNAM + +PREFIX=/usr + +mkdir -p $TMP + +# Cleaning +rm -fr $PRGNAM $PKG + +# Fetching sources +[ ! -e $REPOSITORY ] && git clone https://github.com/arcticicestudio/nord-xresources.git $REPOSITORY +( cd $REPOSITORY && git pull ) +VERSION="$( cd $REPOSITORY && git log -1 --format=%h_%ad --date=format:%Y.%m.%d )" + +cp -R $REPOSITORY $TMP/$PRGNAM + +# Preparation +cd $TMP/$PRGNAM +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +# Installation +mkdir -p $PKG$PREFIX/{doc,share}/$PRGNAM +mv src/nord $PKG$PREFIX/share/$PRGNAM/nord.Xresources +mv * $PKG$PREFIX/doc/$PRGNAM + +# Cleaning +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +# Packaging +mkdir install +cat < install/slack-desc +$PRGNAM: $PRGNAM (An arctic, north-bluish clean and elegant Xresources color theme.) +$PRGNAM: +$PRGNAM: +$PRGNAM: +$PRGNAM: +$PRGNAM: +$PRGNAM: +$PRGNAM: +$PRGNAM: +$PRGNAM: https://git.io/nord-xresources +$PRGNAM: +EOF + +makepkg -l y -c n $OUTPUT/$PRGNAM-$(echo $VERSION | tr -d '-')-$ARCH-$BUILD$TAG.txz