debmaker/ressources/flame/debmaker
2023-09-02 22:51:34 +02:00

36 lines
1,006 B
Bash
Executable file

#!/bin/bash
VERSION=2.3.1
APP=flame
DEPOT=https://github.com/pawelmalak/flame.git
GIT_VERSION=v${VERSION}
DEB_VERSION=${VERSION}-$(date +%Y%m%d%H%M)
DEBIAN_VERSION_CODENAME=bullseye
IMAGE_SIZE=3
PACKAGE_DEPENDENCY="build-essential nodejs npm"
STEP="base_package_upgrade install_package_dependency get_git_source build makedeb"
build() {
cd /tmp/${APP}/
npm install mkdirp
npm run dev-init
cd client
npm run build
rm -fr ../public/*
mv build/* ../public/
}
makedeb(){
PATH_DEB=/tmp/src/rootfs
cp -fr /tmp/${APP}/* ${PATH_DEB}/usr/share/flame/
cp -fr /tmp/${APP}/.env ${PATH_DEB}/usr/share/flame/
mv ${PATH_DEB}/usr/share/flame/data ${PATH_DEB}/var/lib/${APP}/data
mv ${PATH_DEB}/usr/share/flame/public ${PATH_DEB}/var/lib/${APP}/public
ln -fs /var/lib/${APP}/data ${PATH_DEB}/usr/share/${APP}/data
ln -fs /var/lib/${APP}/public ${PATH_DEB}/usr/share/${APP}/public
sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist
}