use generic file name to store compilation instruction
Add GLPI (with github clone to patch install)
This commit is contained in:
parent
38ded86d9f
commit
853e9f431b
28 changed files with 170 additions and 50 deletions
52
ressources/element-web/debmaker
Executable file
52
ressources/element-web/debmaker
Executable file
|
@ -0,0 +1,52 @@
|
|||
#!/bin/bash
|
||||
|
||||
VERSION=1.10.6
|
||||
RELEASE=3
|
||||
|
||||
[ -e ./lib/function.sh ] && source ./lib/function.sh
|
||||
|
||||
APP=element-web
|
||||
DEPOT=https://github.com/vector-im/element-web.git
|
||||
GIT_VERSION=v${VERSION}
|
||||
DEB_VERSION=${VERSION}-${RELEASE}
|
||||
DEBIAN_VERSION_CODENAME=bullseye
|
||||
IMAGE_SIZE=4
|
||||
|
||||
STEP="envinit prebuild build makedeb"
|
||||
|
||||
envinit() {
|
||||
if [ $(dpkg -l | grep -e 'ii nodejs ' | wc -l) -eq 1 ];
|
||||
then
|
||||
apt-get update
|
||||
apt-get dist-upgrade -y
|
||||
else
|
||||
apt install -y --no-install-recommends git wget ca-certificates dpkg fakeroot
|
||||
wget -qO - https://deb.nodesource.com/setup_16.x | bash
|
||||
wget -qO - https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor > /usr/share/keyrings/yarnkey.gpg
|
||||
echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" > /etc/apt/sources.list.d/yarn.list
|
||||
apt-get update
|
||||
apt-get install -y yarn nodejs
|
||||
fi
|
||||
}
|
||||
|
||||
prebuild(){
|
||||
[ -e /tmp/git ] && rm -fr /tmp/git
|
||||
[ -e /tmp/${APP} ] || mkdir /tmp/${APP}
|
||||
git clone --depth 1 -b ${GIT_VERSION} ${DEPOT} /tmp/git
|
||||
cp -r /tmp/git/. /tmp/${APP}
|
||||
}
|
||||
|
||||
build() {
|
||||
cd /tmp/${APP}
|
||||
yarn install
|
||||
yarn dist
|
||||
}
|
||||
|
||||
makedeb(){
|
||||
PATH_DEB=/tmp/src/rootfs
|
||||
|
||||
tar -zxf /tmp/${APP}/dist/element-${GIT_VERSION}-dirty.tar.gz --strip-components=1 -C ${PATH_DEB}/usr/share/element-web/
|
||||
cp /tmp/${APP}/config.sample.json ${PATH_DEB}/etc/element-web/config.json
|
||||
sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control
|
||||
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue