#!/bin/sh set -x CWD=$(pwd) HOME=/home/cycojesus TMP=/tmp REPOSITORIES=$HOME/projets/packages/repositories PRGNAM=$(basename $CWD) PRGNAM1=$PRGNAM PRGNAM2=sur VERSION=hg$(date +%F | tr -d '-' ) BUILD=1 PACKAGER=cyco PKG=$TMP/$PACKAGER/pkg-$PRGNAM ARCH=$(uname -m) PREFIX=/usr [ -e $PKG ] && rm -fr $PKG function get_build_install() { COMPONENT=$1 [ -e $TMP/$COMPONENT-$VERSION ] && rm -fr $TMP/$COMPONENT-$VERSION ( cd $TMP if [ -e $CWD/$COMPONENT-$VERSION.tar.?z* ]; then tar xf $CWD/$COMPONENT-$VERSION.tar.?z* else if [ ! -e $REPOSITORIES/$COMPONENT ]; then hg clone http://hg.scrapping.cc/$COMPONENT $REPOSITORIES/$COMPONENT else ( cd $REPOSITORIES/$COMPONENT hg pull -u ) fi cp -R $REPOSITORIES/$COMPONENT $TMP/$COMPONENT-$VERSION fi ) ( cd $TMP/$COMPONENT-$VERSION RAKE_OPTIONS=$([ ! -e ./Rakefile ] && echo " -f $REPOSITORIES/$COMPONENT/Rakefile ") rake $RAKE_OPTIONS destdir=$PKG prefix=$PREFIX config rake $RAKE_OPTIONS destdir=$PKG prefix=$PREFIX build rake $RAKE_OPTIONS destdir=$PKG prefix=$PREFIX install ) [ -e $PKG$PREFIX/share/man ] && cp -a $PKG$PREFIX/share/man $PKG$PREFIX && rm -fr $PKG$PREFIX/share/man } get_build_install $PRGNAM1 get_build_install $PRGNAM2 mkdir -p $PKG/etc/X11/xinit/ cp $CWD/xinitrc.$PRGNAM $PKG/etc/X11/xinit/ chmod +x $PKG/etc/X11/xinit/xinitrc.$PRGNAM ( cd $PKG mkdir -p install cat < install/slack-desc $PRGNAM: $PRGNAM (is a grid-based manual tiling window manager) $PRGNAM: $PRGNAM: with a strong focus on easy but customizable look and feel. In comparison to $PRGNAM: other tiling windows managers, subtle has no automatic tiling of the screen $PRGNAM: size in any way, instead windows are arranged according to positions inside $PRGNAM: of a grid - these positions are called gravities. $PRGNAM: http://unexist.scrapping.cc/projects/subtle $PRGNAM: ------- $PRGNAM: $PRGNAM2 (Subtle User Repository ("rubbygem-like" repository of sublets)) $PRGNAM: {required gems: curb, sinatra, datamapper} $PRGNAM: http://unexist.scrapping.cc/projects/sur EOF ) ( cd $PKG makepkg -l y -c n $TMP/$PRGNAM-$(echo $VERSION | tr - .)-$ARCH-$BUILD$PACKAGER.txz )