debmaker/ressources/zigbee2mqtt/debmaker
2023-07-11 23:00:08 +02:00

39 lines
816 B
Bash
Executable file

#!/bin/bash
<<<<<<< HEAD
VERSION=1.32.1
=======
VERSION=1.31.2
>>>>>>> parent of 0925d5a (Suivi de version)
APP=zigbee2mqtt
DEPOT=https://github.com/Koenkk/zigbee2mqtt.git
GIT_VERSION=${VERSION}
DEB_VERSION=${VERSION}-$(date +%Y%m%d%H%M)
DEBIAN_VERSION_CODENAME=bookworm
IMAGE_SIZE=2
PACKAGE_DEPENDENCY="nodejs make g++ gcc"
main(){
base_package_upgrade
configure_depot_nodejs 18
install_package_dependency
get_git_source
build
makedeb
}
build() {
cd /tmp/${APP}
npm ci
npm run build
}
makedeb(){
PATH_DEB=/tmp/src/rootfs
cp -fr /tmp/zigbee2mqtt/data/configuration.yaml ${PATH_DEB}/etc/zigbee2mqtt/configuration.yaml
cp -fr /tmp/zigbee2mqtt/* ${PATH_DEB}/usr/lib/zigbee2mqtt/
sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist
}