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
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
VERSION=4.34.2
|
||||
VERSION=4.34.3
|
||||
RELEASE=1
|
||||
|
||||
[ -e ./lib/function.sh ] && source ./lib/function.sh
|
|
@ -6,7 +6,7 @@ RELEASE=3
|
|||
[ -e ./lib/function.sh ] && source ./lib/function.sh
|
||||
|
||||
APP=element-web
|
||||
DEPOT=https://github.com/vector-im/element-web.git /tmp/git
|
||||
DEPOT=https://github.com/vector-im/element-web.git
|
||||
GIT_VERSION=v${VERSION}
|
||||
DEB_VERSION=${VERSION}-${RELEASE}
|
||||
DEBIAN_VERSION_CODENAME=bullseye
|
61
ressources/glpi/debmaker
Executable file
61
ressources/glpi/debmaker
Executable file
|
@ -0,0 +1,61 @@
|
|||
#!/bin/bash
|
||||
|
||||
VERSION=10.0.0-rc2-thl
|
||||
RELEASE=1
|
||||
|
||||
[ -e ./lib/function.sh ] && source ./lib/function.sh
|
||||
|
||||
APP=glpi
|
||||
DEPOT=https://github.com/tomamplius/glpi.git
|
||||
GIT_VERSION=${VERSION}
|
||||
DEB_VERSION=${VERSION}-${RELEASE}
|
||||
DEBIAN_VERSION_CODENAME=bullseye
|
||||
IMAGE_SIZE=2
|
||||
|
||||
STEP="envinit prebuild build makedeb"
|
||||
|
||||
envinit() {
|
||||
if [ $(dpkg -l | grep -e 'ii composer ' | wc -l) -eq 1 ];
|
||||
then
|
||||
apt-get update
|
||||
apt-get dist-upgrade -y
|
||||
else
|
||||
apt install -y --no-install-recommends git fakeroot dpkg patch composer php-json php-xml php-curl php-gd php-intl php-ldap php-zip php-mysql wget gettext
|
||||
wget -qO - https://deb.nodesource.com/setup_16.x | bash
|
||||
apt install 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 -fr /tmp/git/. /tmp/${APP}
|
||||
}
|
||||
|
||||
build(){
|
||||
cd /tmp/${APP}
|
||||
./tools/make_release.sh -y . ${VERSION}
|
||||
}
|
||||
|
||||
makedeb(){
|
||||
PATH_DEB=/tmp/src/rootfs
|
||||
|
||||
tar -zxvf /tmp/${APP}-${VERSION}.tgz -C ${PATH_DEB}/usr/share/
|
||||
mv ${PATH_DEB}/usr/share/glpi/*.md ${PATH_DEB}/usr/share/doc/glpi/
|
||||
gzip ${PATH_DEB}/usr/share/doc/glpi/*
|
||||
|
||||
mv ${PATH_DEB}/usr/share/glpi/files ${PATH_DEB}/var/lib/glpi/
|
||||
ln -s /var/lib/glpi/files ${PATH_DEB}/usr/share/glpi/files
|
||||
|
||||
mv ${PATH_DEB}/usr/share/glpi/marketplace ${PATH_DEB}/var/lib/glpi/
|
||||
ln -s /var/lib/glpi/marketplace ${PATH_DEB}/usr/share/glpi/marketplace
|
||||
|
||||
cp -r ${PATH_DEB}/usr/share/glpi/config/. ${PATH_DEB}/etc/glpi/
|
||||
rm -fr ${PATH_DEB}/usr/share/glpi/config/
|
||||
ln -s /etc/glpi/ ${PATH_DEB}/usr/share/glpi/config
|
||||
|
||||
sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control
|
||||
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist
|
||||
}
|
||||
|
0
ressources/glpi/rootfs/DEBIAN/changelog
Normal file
0
ressources/glpi/rootfs/DEBIAN/changelog
Normal file
8
ressources/glpi/rootfs/DEBIAN/control
Normal file
8
ressources/glpi/rootfs/DEBIAN/control
Normal file
|
@ -0,0 +1,8 @@
|
|||
Package: glpi
|
||||
Version: %VERSION%
|
||||
Section: base
|
||||
Priority: optional
|
||||
Architecture: all
|
||||
Depends: php-json, php-xml, php-curl, php-gd, php-intl, php-ldap, php-zip, php-mysql, php-bz2, php-mbstring
|
||||
Maintainer: Thomas Legay <thomas@syngate.fr>
|
||||
Description: glpi
|
3
ressources/glpi/rootfs/DEBIAN/postinst
Executable file
3
ressources/glpi/rootfs/DEBIAN/postinst
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
chown -R www-data:www-data /var/lib/glpi
|
||||
chown -R www-data:www-data /etc/glpi
|
1
ressources/glpi/rootfs/etc/glpi/.gitkeep
Normal file
1
ressources/glpi/rootfs/etc/glpi/.gitkeep
Normal file
|
@ -0,0 +1 @@
|
|||
|
10
ressources/glpi/rootfs/usr/share/doc/glpi/apache2-glpi.conf
Normal file
10
ressources/glpi/rootfs/usr/share/doc/glpi/apache2-glpi.conf
Normal file
|
@ -0,0 +1,10 @@
|
|||
<VirtualHost *:80>
|
||||
ServerName glpi.domaine.com
|
||||
DocumentRoot /usr/share/glpi
|
||||
|
||||
<directory /usr/share/glpi>
|
||||
Options FollowSymLinks
|
||||
AllowOverride all
|
||||
Require all granted
|
||||
</directory>
|
||||
</VirtualHost>
|
1
ressources/glpi/rootfs/var/lib/glpi/.gitkeep
Normal file
1
ressources/glpi/rootfs/var/lib/glpi/.gitkeep
Normal file
|
@ -0,0 +1 @@
|
|||
|
52
ressources/metabase/debmaker
Executable file
52
ressources/metabase/debmaker
Executable file
|
@ -0,0 +1,52 @@
|
|||
#!/bin/bash
|
||||
|
||||
VERSION=0.42.2
|
||||
RELEASE=2
|
||||
|
||||
[ -e ./lib/function.sh ] && source ./lib/function.sh
|
||||
|
||||
APP=metabase
|
||||
DEPOT=https://github.com/metabase/metabase.git
|
||||
GIT_VERSION=v$VERSION
|
||||
DEB_VERSION=${VERSION}-${RELEASE}
|
||||
DEBIAN_VERSION_CODENAME=bullseye
|
||||
IMAGE_SIZE=10
|
||||
|
||||
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 build-essential git wget ca-certificates dpkg fakeroot openjdk-17-jdk curl
|
||||
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 nodejs yarn
|
||||
curl https://download.clojure.org/install/linux-install-1.10.3.1087.sh | bash
|
||||
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}/
|
||||
PATH=$PATH:/usr/local/bin
|
||||
./bin/build
|
||||
}
|
||||
|
||||
makedeb(){
|
||||
PATH_DEB=/tmp/src/rootfs
|
||||
|
||||
cp /tmp/${APP}/target/uberjar/metabase.jar ${PATH_DEB}/usr/share/metabase/
|
||||
sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control
|
||||
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
[ -e ./lib/function.sh ] && source ./lib/function.sh
|
||||
|
||||
APP=metabase
|
||||
VERSION=0.42.2
|
||||
GIT_VERSION=v$VERSION
|
||||
DEB_VERSION=$VERSION-1
|
||||
DEBIAN_VERSION_CODENAME=bullseye
|
||||
IMAGE_SIZE=10
|
||||
|
||||
STEP="envinit prebuild build makedeb"
|
||||
|
||||
envinit() {
|
||||
apt install -y --no-install-recommends build-essential git wget ca-certificates dpkg fakeroot openjdk-17-jdk curl
|
||||
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 nodejs yarn
|
||||
curl https://download.clojure.org/install/linux-install-1.10.3.1087.sh | bash
|
||||
}
|
||||
|
||||
prebuild(){
|
||||
git clone --depth 1 -b ${GIT_VERSION} https://github.com/metabase/metabase.git /tmp/metabase
|
||||
}
|
||||
|
||||
build() {
|
||||
cd /tmp/metabase/
|
||||
PATH=$PATH:/usr/local/bin
|
||||
./bin/build
|
||||
}
|
||||
|
||||
makedeb(){
|
||||
PATH_DEB=/tmp/src/rootfs
|
||||
|
||||
cp /tmp/metabase/target/uberjar/metabase.jar ${PATH_DEB}/usr/share/metabase/
|
||||
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