slackbuilds/UNUSED/n/blerg/SlackBuild
2020-07-12 09:22:26 +02:00

82 lines
2.2 KiB
Bash
Executable file

#!/bin/sh
# variables
VERSION=$(date +"%Y.%m.%d_%H.%M")
BUILD=1
TAG=gwh
TMP=/tmp/$TAG
CWD=$(pwd)
OUTPUT=/tmp
PRGNAM=$(basename $CWD)
PKG=$TMP/pkg-$PRGNAM
ARCH=$(uname -m)
REPOSITORY=/home/installs/SlackBuilds/repositories/$PRGNAM
PREFIX=/usr
BASEURL="http://localhost/blerg"
# nettoyage préalable
rm -fr $PKG $TMP/$PRGNAM-$VERSION
mkdir -p $PKG
# mise en place
cd $TMP
if [ ! -e $REPOSITORY ] ; then
mkdir -p $(dirname $REPOSITORY)
git clone http://git.bytex64.net/blerg.git $REPOSITORY
else
( cd $REPOSITORY
git pull
)
fi
[ ! -e $CWD/blerg.dominionofawesome.com ] && (cd $CWD ; wget -c -p http://blerg.dominionofawesome.com/doc/ )
cp -R $REPOSITORY $TMP/
( cd $TMP/$PRGNAM
make
mkdir -p $PKG/srv/www/htdocs/$PRGNAM $PKG$PREFIX/doc/$PRGNAM
cp -R ./* $PKG/srv/www/htdocs/$PRGNAM
cp -R $CWD/blerg.dominionofawesome.com $PKG$PREFIX/doc/$PRGNAM
)
# correction
( cd $PKG
chown -R root:root *
find $PKG$PREFIX/man -name "*.?" -type f -exec gzip -9 {} \;
)
# embaumement
mkdir -p $PKG/install
cat <<EOF > $PKG/install/slack-desc
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
$PRGNAM: $PRGNAM (blogging platform of some sort)
$PRGNAM:
$PRGNAM: Blërg is a microblogging platform. Or maybe a miniblogging platform.
$PRGNAM: Blërg is not sure. Blërg is a lot like Twitter, but aims to fix some
$PRGNAM: of its idiosyncracies. Blërg does not want to be a full blogging
$PRGNAM: platform like Wordpress or Livejournal. Blërg is also an open source
$PRGNAM: tagged text database engine written in C that does the back-end work.
$PRGNAM:
$PRGNAM: http://blerg.dominionofawesome.com/
$PRGNAM: http://blerg.dominionofawesome.com/doc/
$PRGNAM:
EOF
# empaquetage
cd $PKG
rm -f $PKG/{,usr/}lib$(uname -m | grep -o 64)/*.la
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz