backage builder

This commit is contained in:
udo
2022-02-11 01:51:32 +00:00
parent 0a6ebc60f0
commit 6f6919f3f0
16 changed files with 194 additions and 94 deletions
+29
View File
@@ -0,0 +1,29 @@
#!/bin/bash
cd "$(dirname "$0")"
cd ..
BUILDMODE=${2:-"debug"}
OPT_FLAG="O3"
GF="uce_fastcgi"
mkdir bin > /dev/null 2>&1
mkdir bin/tmp > /dev/null 2>&1
mkdir bin/assets > /dev/null 2>&1
mkdir work > /dev/null 2>&1
COMPILER="clang++"
FLAGS="-g -rdynamic -w -Wall -$OPT_FLAG -std=c++17 -fpermissive -ffast-math"
LIBS="-ldl -lm -lpthread `mysql_config --cflags --libs`"
SRCFLAGS="-D EXEC_NAME=\"$GF\" -D PLATFORM_NAME=\"linux\""
echo "Compliling executable..."
time -p $COMPILER src/linux_fastcgi.cpp $SRCFLAGS $FLAGS $LIBS -o bin/$GF.linux.bin 2>&1
if [ $? -eq 0 ]
then
ls -lh bin/ | grep $GF
exit 0
else
exit 1
fi
+1 -1
View File
@@ -28,7 +28,7 @@ COMPILER="clang++"
#COMPILER="g++"
FLAGS="-shared -g -rdynamic -w -Wall -$OPT_FLAG -std=c++14 -fpermissive -ffast-math -fPIC"
LIBS="-ldl -lm -lpthread "
LIBS="-ldl -lm -lpthread"
SRCFLAGS="-D PLATFORM_NAME=\"linux\""
# echo "Compliling executable..."
+7
View File
@@ -0,0 +1,7 @@
Package: uce
Section: web
Priority: optional
Architecture: amd64
Depends: clang (>= 1:13.0)
Maintainer: Udo Schroeter <udo@openfu.com>
Description: Write server-side web stuff in C++
+45
View File
@@ -0,0 +1,45 @@
#!/bin/bash
cd "$(dirname "$0")"
cd ..
if [ -z "$1" ]
then
echo "Usage: make_deb.sh VERSION"
exit
fi
VERSION=$1
REV=1
PROJECT="uce"
PKG_NAME="${PROJECT}_$VERSION.$REV"
echo "Making package $PKG_NAME"
echo "==================================="
scripts/build_linux.sh
rm -r "pkg/$PKG_NAME"
mkdir -p "pkg/$PKG_NAME/opt/uce/"
mkdir -p "pkg/$PKG_NAME/DEBIAN/"
mkdir -p "pkg/$PKG_NAME/etc/uce/"
mkdir -p "dist"
cp scripts/control "pkg/$PKG_NAME/DEBIAN/"
echo "Version: $VERSION" >> "pkg/$PKG_NAME/DEBIAN/control"
echo "" >> "pkg/$PKG_NAME/DEBIAN/control"
cp -r bin "pkg/$PKG_NAME/opt/"
cp -r doc "pkg/$PKG_NAME/opt/"
cp -r examples "pkg/$PKG_NAME/opt/"
cp -r scripts "pkg/$PKG_NAME/opt/"
cp -r test "pkg/$PKG_NAME/opt/"
du -sh "pkg/$PKG_NAME/"*
cd pkg
dpkg-deb --build "$PKG_NAME"
mv "$PKG_NAME.deb" "../dist/"
cd ..
ls -lh "dist/" | grep "$PKG_NAME"
+3
View File
@@ -0,0 +1,3 @@
#!/bin/bash
rm -r /tmp/uce/work/* ; scripts/build_linux.sh && bin/uce_fastcgi.linux.bin