# HG changeset patch # User Leonardo Laporte # Date 1458184288 10800 # Node ID 88ac4a69bf11168cf68e6360ad4a11ed4d8ea3f6 # Parent 8ea64ddbb51ea7c0046c19ccaa29d50f2b7676a4 Add: Backgrounds created by the community. See: https://github.com/hackdorte/slitaz-community-backgrounds diff -r 8ea64ddbb51e -r 88ac4a69bf11 get-community-backgrounds/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/get-community-backgrounds/receipt Thu Mar 17 00:11:28 2016 -0300 @@ -0,0 +1,23 @@ +# SliTaz package receipt. + +PACKAGE="get-community-backgrounds" +VERSION="001" +CATEGORY="x-window" +SHORT_DESC="Beautiful wallpapers created by the Slitaz Community." +MAINTAINER="hackdorte@sapo.pt" +LICENSE="BSD" +WEB_SITE="https://github.com/hackdorte/slitaz-community-backgrounds" +TAGS="artwork background wallpaper" + +DEPENDS="unzip" + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/usr/bin + cp stuff/* $fs/usr/bin +} +post_install() +{ + get-community-backgrounds +} \ No newline at end of file diff -r 8ea64ddbb51e -r 88ac4a69bf11 get-community-backgrounds/stuff/get-community-backgrounds --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/get-community-backgrounds/stuff/get-community-backgrounds Thu Mar 17 00:11:28 2016 -0300 @@ -0,0 +1,80 @@ +#!/bin/sh -e + +[ -f '/etc/slitaz/slitaz.conf' ] && . /etc/slitaz/slitaz.conf +[ -z "$INSTALLED" ] && INSTALLED='/var/lib/tazpkg/installed' + +PACKAGE="get-community-backgrounds" +PKGNAME="slitaz-community-backgrounds" +VERSION="001" +CATEGORY="x-window" +SHORT_DESC="Beautiful wallpapers created by the Slitaz Community." +MAINTAINER="hackdorte@sapo.pt" +LICENSE="BSD" +WEB_SITE="https://github.com/hackdorte/slitaz-community-backgrounds" +TAGS="artwork background wallpaper" +DEPENDS="unzip" + +ROOT="$1" +[ -d "$ROOT" ] || ROOT="" + +if [ $(id -u) -ne 0 ]; then + echo -e "\nYou must be root to run `basename $0`." + echo -e "Please type 'su' and root password to become super-user.\n" + exit 0 +fi + +if [ -d $ROOT$INSTALLED/$PKGNAME ]; then + [ -n "$ROOT" ] && exit 1 + tazpkg remove $PKGNAME + [ -d $INSTALLED/$PKGNAME ] && exit 1 +fi + +# Source Download +TARBALL="master.zip" +URL="${WEB_SITE}/archive/$TARBALL" +TMP_DIR="$(mktemp -d)" +CUR_DIR=$(pwd) +cd $TMP_DIR +busybox wget -O $TARBALL $URL + +if [ ! -f $TARBALL ]; then + echo "Could not download $TARBALL. Exiting." + exit 1 +fi + +# Unzip Package +unzip $TARBALL + +# Building Base +mkdir -p $PKGNAME-$VERSION/fs/usr/share/images +mv $PKGNAME-master/* $PKGNAME-$VERSION/fs/usr/share/images +rm -irf $PKGNAME-$VERSION/fs/usr/share/images/README.md +rm -irf $PKGNAME-master +rm -irf $TARBALL + + +# Writing The Receipt +cat > $PKGNAME-$VERSION/receipt <