2022-02-12 18:30:28 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
2022-09-15 01:04:23 +02:00
|
|
|
VERSION=1.11.5
|
2022-02-28 23:26:47 +01:00
|
|
|
APP=element-web
|
2022-03-06 00:37:44 +01:00
|
|
|
DEPOT=https://github.com/vector-im/element-web.git
|
2022-03-04 20:50:46 +01:00
|
|
|
GIT_VERSION=v${VERSION}
|
2022-04-12 22:51:18 +02:00
|
|
|
DEB_VERSION=${VERSION}-$(date +%Y%m%d%H%M)
|
2022-02-28 23:26:47 +01:00
|
|
|
DEBIAN_VERSION_CODENAME=bullseye
|
2022-03-02 22:15:23 +01:00
|
|
|
IMAGE_SIZE=4
|
2022-02-28 23:26:47 +01:00
|
|
|
|
2022-08-17 20:35:16 +02:00
|
|
|
STEP="base_package_upgrade envinit get_git_source build makedeb"
|
2022-02-20 15:02:18 +01:00
|
|
|
|
2022-02-12 18:30:28 +01:00
|
|
|
envinit() {
|
2022-08-05 06:12:11 +02:00
|
|
|
configure_depot_yarn
|
|
|
|
configure_depot_nodejs
|
2022-08-12 23:00:22 +02:00
|
|
|
apt install -y --no-install-recommends yarn nodejs
|
2022-02-12 18:30:28 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
2022-03-04 21:47:14 +01:00
|
|
|
cd /tmp/${APP}
|
2022-02-12 18:30:28 +01:00
|
|
|
yarn install
|
|
|
|
yarn dist
|
|
|
|
}
|
|
|
|
|
|
|
|
makedeb(){
|
2022-02-24 00:02:53 +01:00
|
|
|
PATH_DEB=/tmp/src/rootfs
|
2022-02-20 15:02:18 +01:00
|
|
|
|
2022-07-07 23:11:32 +02:00
|
|
|
tar -zxf /tmp/${APP}/dist/element-${GIT_VERSION}.tar.gz --strip-components=1 -C ${PATH_DEB}/usr/share/element-web/
|
2022-03-04 21:47:14 +01:00
|
|
|
cp /tmp/${APP}/config.sample.json ${PATH_DEB}/etc/element-web/config.json
|
2022-02-24 00:02:53 +01:00
|
|
|
sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control
|
|
|
|
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist
|
2022-02-12 18:30:28 +01:00
|
|
|
}
|