debmaker/ressources/phpbb/debmaker
2023-02-06 13:57:24 +01:00

50 lines
1.3 KiB
Bash
Executable file

#!/bin/bash
VERSION=3.3.10
APP=phpbb
DEPOT=https://github.com/phpbb/phpbb.git
GIT_VERSION=release-$VERSION
DEB_VERSION=$VERSION-$(date +%Y%m%d%H%M)
DEBIAN_VERSION_CODENAME=bullseye
IMAGE_SIZE=2
PACKAGE_DEPENDENCY="php-simplexml php-curl php-zip php-cli"
main(){
base_package_upgrade
install_package_dependency
default_prebuild
build
makedeb
}
build(){
cd /tmp/${APP}/phpBB
php ../composer.phar install -n
}
makedeb(){
PATH_DEB=/tmp/src/rootfs
PATH_DEB_INSTALL=/tmp/src/rootfs-install
mv /tmp/${APP}/phpBB/install ${PATH_DEB_INSTALL}/usr/share/phpbb
cp -fr /tmp/${APP}/phpBB ${PATH_DEB}/usr/share/phpbb
touch ${PATH_DEB}/etc/${APP}/config.php
ln -s /etc/${APP}/config.php ${PATH_DEB}/usr/share/phpbb/config.php
for tmp in ext files store images
do
mv ${PATH_DEB}/usr/share/phpbb/${tmp} ${PATH_DEB}/var/lib/phpbb/${tmp}
ln -s /var/lib/phpbb/${tmp} ${PATH_DEB}/usr/share/phpbb/${tmp}
done
mv ${PATH_DEB}/usr/share/phpbb/cache ${PATH_DEB}/var/lib/phpbb/cache
ln -s /var/cache/phpbb ${PATH_DEB}/usr/share/phpbb/cache
sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist
sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB_INSTALL}/DEBIAN/control
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB_INSTALL} /tmp/dist
}