2010-08-03 04:48:17 +02:00
#!/bin/sh
CWD=$(pwd)
PRGNAM=$(basename $CWD)
2010-11-18 11:29:11 +01:00
VERSION=git_$(date +%Y.%m.%d_%H.%M)
2010-08-03 04:48:17 +02:00
ARCH=$(uname -m)
BUILD=1
2011-02-17 05:54:04 +01:00
2010-08-03 04:48:17 +02:00
PREFIX=/usr
LIBSUFFIX=$(echo $ARCH | grep -o 64)
2011-02-17 05:54:04 +01:00
TAG=cyco
2011-02-17 05:58:04 +01:00
TMP=/tmp/$TAG
PKG=$TMP/pkg-$PRGNAM
2011-04-11 09:25:33 +02:00
OUTPUT=/tmp
2010-08-03 04:48:17 +02:00
2011-07-22 08:41:46 +02:00
REPOSITORIES=/home/installs/SlackBuilds/repositories
2010-08-03 04:48:17 +02:00
if [ -e $REPOSITORIES/$PRGNAM ] ; then
( cd $REPOSITORIES/$PRGNAM
git pull
)
else
2011-09-02 13:22:04 +02:00
git clone http://repo.or.cz/r/conkeror.git $REPOSITORIES/$PRGNAM
2010-08-03 04:48:17 +02:00
fi
2013-07-05 11:11:12 +02:00
rm -fr $PKG
2010-08-03 04:48:17 +02:00
mkdir -p $PKG$PREFIX/libexec/
cp -R $REPOSITORIES/$PRGNAM $PKG$PREFIX/libexec/
2011-04-11 09:25:33 +02:00
cd $PKG$PREFIX/libexec/$PRGNAM
make conkeror-spawn-helper
rm -fr .git .gitignore
2010-08-03 04:48:17 +02:00
mkdir -p $PKG$PREFIX/bin
2011-04-11 09:25:33 +02:00
cd $PKG$PREFIX/bin
ln -s ../libexec/$PRGNAM/conkeror-spawn-helper conkeror-spawn-helper
2013-07-05 11:11:36 +02:00
# "Firefox 3 and later ships with a private XULRunner package, which can run any compatible XULRunner application using the -app switch." -- https://developer.mozilla.org/en-US/docs/XULRunner
cat <<EOF > $PKG$PREFIX/bin/conkeror
#!/bin/sh
exec /usr/bin/firefox -app $PREFIX/libexec/$PRGNAM/application.ini "\$@"
EOF
chmod 755 $PKG$PREFIX/bin/conkeror
2010-08-03 04:48:17 +02:00
mkdir -p $PKG$PREFIX/doc/$PRGNAM
2011-04-11 09:25:33 +02:00
cd $PKG$PREFIX/doc/$PRGNAM
for d in COPYING CREDITS INSTALL help ; do
ln -s ../../libexec/$PRGNAM/$d $d
done
2010-08-03 04:48:17 +02:00
mkdir -p $PKG/install
cat <<EOF > $PKG/install/slack-desc
$PRGNAM: $PRGNAM (Web browser)
$PRGNAM:
$PRGNAM: Conkeror is a keyboard-oriented, highly-customizable, highly-extensible
$PRGNAM: web browser based on Mozilla XULRunner, written mainly in JavaScript, and
$PRGNAM: inspired by exceptional software such as Emacs and vi. Conkeror features
$PRGNAM: a sophisticated keyboard system, allowing users to run commands and interact
$PRGNAM: with content in powerful and novel ways. It is self-documenting, featuring a
$PRGNAM: powerful interactive help system.
$PRGNAM:
$PRGNAM: http://conkeror.org/
$PRGNAM:
EOF
2011-04-11 09:25:33 +02:00
cd $PKG
2018-04-20 23:02:35 +02:00
rm -f $PKG/{,usr/}lib$(uname -m | grep -o 64)/*.la
2011-04-11 09:25:33 +02:00
makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz