wok-current rev 18987
Additional themes for Slitaz GNU/Linux.
author | Leonardo Laporte <hackdorte@sapo.pt> |
---|---|
date | Thu Mar 17 05:14:19 2016 -0300 (2016-03-17) |
parents | 98906245f829 |
children | f671f3a6699d |
files | get-slitaz-extra-themes/receipt get-slitaz-extra-themes/stuff/get-slitaz-extra-themes |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/get-slitaz-extra-themes/receipt Thu Mar 17 05:14:19 2016 -0300 1.3 @@ -0,0 +1,21 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="get-slitaz-extra-themes" 1.7 +VERSION="001" 1.8 +CATEGORY="x-window" 1.9 +SHORT_DESC="Additional themes for Slitaz GNU/Linux." 1.10 +MAINTAINER="hackdorte@sapo.pt" 1.11 +LICENSE="BSD" 1.12 +WEB_SITE="https://github.com/hackdorte/slitaz-themes" 1.13 +TAGS="artwork gtk openbox theme" 1.14 + 1.15 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.16 +genpkg_rules() 1.17 +{ 1.18 + mkdir -p $fs/usr/bin 1.19 + cp stuff/* $fs/usr/bin 1.20 +} 1.21 +post_install() 1.22 +{ 1.23 + get-slitaz-extra-themes 1.24 +} 1.25 \ No newline at end of file
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/get-slitaz-extra-themes/stuff/get-slitaz-extra-themes Thu Mar 17 05:14:19 2016 -0300 2.3 @@ -0,0 +1,79 @@ 2.4 +#!/bin/sh -e 2.5 + 2.6 +[ -f '/etc/slitaz/slitaz.conf' ] && . /etc/slitaz/slitaz.conf 2.7 +[ -z "$INSTALLED" ] && INSTALLED='/var/lib/tazpkg/installed' 2.8 + 2.9 +PACKAGE="get-slitaz-extra-themes" 2.10 +PKGNAME="slitaz-extra-themes" 2.11 +PKGSRC="slitaz-themes" 2.12 +VERSION="001" 2.13 +CATEGORY="x-window" 2.14 +SHORT_DESC="Additional themes for Slitaz GNU/Linux." 2.15 +MAINTAINER="hackdorte@sapo.pt" 2.16 +LICENSE="BSD" 2.17 +WEB_SITE="https://github.com/hackdorte/slitaz-themes" 2.18 +TAGS="artwork gtk openbox theme" 2.19 + 2.20 +ROOT="$1" 2.21 +[ -d "$ROOT" ] || ROOT="" 2.22 + 2.23 +if [ $(id -u) -ne 0 ]; then 2.24 + echo -e "\nYou must be root to run `basename $0`." 2.25 + echo -e "Please type 'su' and root password to become super-user.\n" 2.26 + exit 0 2.27 +fi 2.28 + 2.29 +if [ -d $ROOT$INSTALLED/$PKGNAME ]; then 2.30 + [ -n "$ROOT" ] && exit 1 2.31 + tazpkg remove $PKGNAME 2.32 + [ -d $INSTALLED/$PKGNAME ] && exit 1 2.33 +fi 2.34 + 2.35 +# Source Download 2.36 +TARBALL="master.zip" 2.37 +URL="${WEB_SITE}/archive/$TARBALL" 2.38 +TMP_DIR="$(mktemp -d)" 2.39 +CUR_DIR=$(pwd) 2.40 +cd $TMP_DIR 2.41 +busybox wget -O $TARBALL $URL 2.42 + 2.43 +if [ ! -f $TARBALL ]; then 2.44 + echo "Could not download $TARBALL. Exiting." 2.45 + exit 1 2.46 +fi 2.47 + 2.48 +# Unzip Package 2.49 +busybox unzip $TARBALL 2.50 + 2.51 +# Building Base 2.52 +mkdir -p $PKGNAME-$VERSION/fs/usr/share/themes 2.53 +mv $PKGSRC-master/* $PKGNAME-$VERSION/fs/usr/share/themes 2.54 +rm -irf $PKGNAME-$VERSION/fs/usr/share/themes/README.md 2.55 +rm -irf $PKGSRC-master 2.56 +rm -irf $TARBALL 2.57 + 2.58 + 2.59 +# Writing The Receipt 2.60 +cat > $PKGNAME-$VERSION/receipt <<EOT 2.61 +PACKAGE="$PKGNAME" 2.62 +VERSION="$VERSION" 2.63 +CATEGORY="x-window" 2.64 +SHORT_DESC="$SHORT_DESC" 2.65 +WEB_SITE="$WEB_SITE" 2.66 +MAINTAINER="$MAINTAINER" 2.67 +TAGS="$TAGS" 2.68 + 2.69 +EOT 2.70 + 2.71 +# Creating The Tazpkg Package 2.72 +tazpkg pack $PKGNAME-$VERSION 2.73 + 2.74 +# Install Package 2.75 +tazpkg -i $PKGNAME-$VERSION.tazpkg --root=$ROOT 2.76 +case " $@ " in 2.77 +*\ --k*) mv $PKGNAME-$VERSION.tazpkg $CUR_DIR ;; 2.78 +esac 2.79 + 2.80 +# Clean 2.81 +cd $CUR_DIR 2.82 +rm -rf "$TMP_DIR"