...
 
Commits (3)
......@@ -13,7 +13,8 @@ if [[ -n $DEST ]];then
cp bin/lib/* "$DEST/usr/lib"
cp bin/mod/dll/* "$DEST/usr/module"
find extensions -name "*.bas" -exec cp {} "$DEST/usr/include" \;
"$APT" "$DEST" "$PWD/bin/sb.AppImage"
mkdir -p "PACKAGES"
"$APT" "$DEST" "$PWD/PACKAGES/sb.AppImage"
[[ -d "$DEST" ]] && rm -r "$DEST"
else
printf "\n**WARNING** Missing path to destination folder\n"
......
#! /bin/sh
#
# This file will create the debian package after
# ScriptBasic was compiled and configured
#
# This file is not a source file, do not edit!
#
# This file was generated by the program setup.pl
# when started with the option --install
#
CONFIGDIR=deb/scriba/etc/scriba
INCLUDE=deb/scriba/usr/share/scriba/include
SOURCE=deb/scriba/usr/share/scriba/source
MODULE=deb/scriba/usr/local/lib/scriba
LIB=deb/scriba/usr/local/lib
CACHE=deb/scriba$(HOME)/.scriba/cache
HEBTEMP=deb/scriba$(HOME)/.scriba/hebtemp
BIN=deb/scriba/usr/bin
LOG=deb/scriba$(HOME)/.scriba
ETC=deb/scriba/etc/init.d
#!/usr/bin/env bash
#
# clean old version of the package
#
mkdir -p deb/scriba
rm -rf deb/scriba/* 2>/dev/null
rm deb/*.deb 2>/dev/null
ARCH=$(dpkg --print-architecture)
NAME=scriptbasic
VERSION=2.1
OS=$(uname)
MKTMP=$(mktemp -d)
OUTPUT="$NAME-$VERSION-${OS,,}-$ARCH"
DEST="$MKTMP/$OUTPUT/usr/local"
#
# insert the current build number into the control file
#
perl preparedeb.pl
CONTROL="Package: $OUTPUT
Version: 2.1-1
Architecture: $ARCH
Depends: libcurl3-gnutls, libiodbc2, libmariadbclient18, libncurses5, libsqlite3-0, libssl1.1
Maintainer: support@scriptbasic.org
Description: Basic Scripting Language
"
#
# copy the control files to the place where they have to be
# to build the debian package
#
mkdir -p deb/scriba
cp -R deb/DEBIAN deb/scriba
rm -rf deb/scriba/DEBIAN/CVS
chown root:root deb/scriba/DEBIAN
chown root:root deb/scriba/DEBIAN/*
chmod 075 deb/scriba/DEBIAN
chmod 075 deb/scriba/DEBIAN/*
CONFIG="dll \".so\"
module \"/usr/local/lib/scriba/\"
include \"/usr/local/include/scriba/\"
maxstep 0
maxlocalstep 0
maxlevel 29666
maxmem 0
"
mkdir -p $CONFIGDIR
mkdir -p $BIN
mkdir -p $INCLUDE
mkdir -p $SOURCE
mkdir -p $MODULE
mkdir -p $LIB
mkdir -p $CACHE
mkdir -p $HEBTEMP
mkdir -p $LOG
mkdir -p $ETC
mkdir -p "$MKTMP/$OUTPUT/DEBIAN"
echo "$CONTROL" > "$MKTMP/$OUTPUT/DEBIAN/control"
echo "ldconfig" > "$MKTMP/$OUTPUT/DEBIAN/postinst"
echo "ldconfig" > "$MKTMP/$OUTPUT/DEBIAN/postrm"
echo "$CONFIG" > "$MKTMP/sb.conf"
chmod a+x "$MKTMP/$OUTPUT/DEBIAN/postinst" "$MKTMP/$OUTPUT/DEBIAN/postrm"
cp ./bin/exe/scriba $BIN
cp ./bin/exe/sbhttpd $BIN
cp ./etc-init.d-sbhttpd $ETC/sbhttpd
cp ./bin/mod/dll/*.so $MODULE
cp ./bin/lib/*.a $LIB
cp ./bin/mod/lib/*.a $LIB
cp ./include/* $INCLUDE
./bin/exe/scriba -f $CONFIGDIR/basic.conf -k scriba.conf.unix.lsp
cp ./heber.bas $SOURCE
mkdir -p "$DEST"/{bin,include/scriba,lib/scriba}
cp bin/exe/* "$DEST/bin"
cp bin/lib/* "$DEST/lib"
cp bin/mod/dll/* "$DEST/lib/scriba"
find extensions -name "*.bas" -exec cp {} "$DEST/include/scriba" \;
chown -R root:root deb/scriba
chmod -R 0755 deb
chmod -R 0777 $CACHE
chmod -R 0777 $HEBTEMP
chmod -R 0777 $LOG
cd deb
dpkg --build scriba
mv scriba.deb scriba-v`cat ../version.txt`b`cat ../build.txt`-1_i386.deb
cd ..
mkdir -p "$MKTMP/$OUTPUT/etc/scriba"
./bin/exe/scriba -f "$MKTMP/$OUTPUT/etc/scriba/basic.conf" -k "$MKTMP/sb.conf" 2>/dev/null
mkdir -p PACKAGES
dpkg --build "$MKTMP/$OUTPUT" 1>/dev/null
mv "$MKTMP/$OUTPUT.deb" "PACKAGES/$OUTPUT.deb"
[[ -d $MKTMP ]] && rm -r "$MKTMP"