diff --git a/ressources/roundcubemail/debmaker b/ressources/roundcubemail/debmaker new file mode 100755 index 0000000..d98b69a --- /dev/null +++ b/ressources/roundcubemail/debmaker @@ -0,0 +1,45 @@ +#!/bin/bash + +VERSION=1.6.0 + +[ -e ./lib/function.sh ] && source ./lib/function.sh + +APP=roundcubemail +DEPOT=https://github.com/roundcube/roundcubemail.git +GIT_VERSION=${VERSION} +DEB_VERSION=${VERSION}-$(date +%Y%m%d%H%M) +DEBIAN_VERSION_CODENAME=bullseye +IMAGE_SIZE=4 + +STEP="minimum_package envinit default_prebuild build makedeb" + +envinit() { + apt-get update + apt-get dist-upgrade -y + apt-get install -y --no-install-recommends make curl npm nodejs jq php-xml php-pear php-mbstring unzip +} + +build() { + cd /tmp/${APP} + rm roundcubemail-*-git-complete.tar.gz + PATH=$PATH:/tmp/${APP}/node_modules/.bin/ + sed 's/GITREMOTE=git/GITREMOTE=https/' Makefile -i + sed "s/git clone --branch=\$(GITBRANCH)/git clone -b ${GIT_VERSION}/" Makefile -i + make +} + +makedeb(){ + PATH_DEB=/tmp/src/rootfs + + tar -zxf /tmp/${APP}/roundcubemail-*-git-complete.tar.gz --strip-components=1 -C ${PATH_DEB}/usr/share/roundcubemail/ + cp ${PATH_DEB}/usr/share/roundcubemail/config/config.inc.php.sample ${PATH_DEB}/etc/roundcubemail/config.inc.php + mv ${PATH_DEB}/usr/share/roundcubemail/{CHANGELOG.md,INSTALL,LICENSE,README.md,SECURITY.md,UPGRADING} ${PATH_DEB}/usr/share/doc/roundcubemail/ + mv ${PATH_DEB}/usr/share/roundcubemail/{temp,logs} ${PATH_DEB}/var/lib/roundcubemail/ + + ln -s /var/lib/roundcubemail/temp ${PATH_DEB}/usr/share/roundcubemail/temp + ln -s /var/lib/roundcubemail/logs ${PATH_DEB}/usr/share/roundcubemail/logs + ln -s /etc/roundcubemail/config.inc.php ${PATH_DEB}/usr/share/roundcubemail/config/config.inc.php + + sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control + fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist +} diff --git a/ressources/roundcubemail/rootfs/DEBIAN/changelog b/ressources/roundcubemail/rootfs/DEBIAN/changelog new file mode 100644 index 0000000..e69de29 diff --git a/ressources/roundcubemail/rootfs/DEBIAN/conffiles b/ressources/roundcubemail/rootfs/DEBIAN/conffiles new file mode 100644 index 0000000..6fb6a72 --- /dev/null +++ b/ressources/roundcubemail/rootfs/DEBIAN/conffiles @@ -0,0 +1 @@ +/etc/roundcubemail/config.inc.php diff --git a/ressources/roundcubemail/rootfs/DEBIAN/control b/ressources/roundcubemail/rootfs/DEBIAN/control new file mode 100644 index 0000000..3a3bdca --- /dev/null +++ b/ressources/roundcubemail/rootfs/DEBIAN/control @@ -0,0 +1,8 @@ +Package: roundcubemail +Version: %VERSION% +Section: base +Priority: optional +Architecture: all +Depends: php-common, php-xml, php-json, php-gd, php-mbstring, php-xml, php-tidy, php-curl, php-tokenizer, php-bcmath, php-intl, php-fpm, php-sqlite3, php-pgsql, php-mysql +Maintainer: Thomas Legay +Description: roundcubemail diff --git a/ressources/roundcubemail/rootfs/DEBIAN/postinst b/ressources/roundcubemail/rootfs/DEBIAN/postinst new file mode 100755 index 0000000..7c463d6 --- /dev/null +++ b/ressources/roundcubemail/rootfs/DEBIAN/postinst @@ -0,0 +1,2 @@ +#!/bin/bash +chown -R www-data:www-data /var/lib/roundcubemail/ diff --git a/ressources/roundcubemail/rootfs/etc/roundcubemail/.gitkeep b/ressources/roundcubemail/rootfs/etc/roundcubemail/.gitkeep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/ressources/roundcubemail/rootfs/etc/roundcubemail/.gitkeep @@ -0,0 +1 @@ + diff --git a/ressources/roundcubemail/rootfs/usr/share/doc/roundcubemail/apache2-roundcubemail.conf b/ressources/roundcubemail/rootfs/usr/share/doc/roundcubemail/apache2-roundcubemail.conf new file mode 100644 index 0000000..73a2aec --- /dev/null +++ b/ressources/roundcubemail/rootfs/usr/share/doc/roundcubemail/apache2-roundcubemail.conf @@ -0,0 +1,15 @@ + + servername roundcube.domain.com + ServerAdmin admin@domain.com + + DocumentRoot /usr/share/roundcubemail/ + Protocols h2c http/1.1 + + + Options FollowSymLinks + AllowOverride None + Require all granted + + + + diff --git a/ressources/roundcubemail/rootfs/usr/share/roundcubemail/.gitkeep b/ressources/roundcubemail/rootfs/usr/share/roundcubemail/.gitkeep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/ressources/roundcubemail/rootfs/usr/share/roundcubemail/.gitkeep @@ -0,0 +1 @@ + diff --git a/ressources/roundcubemail/rootfs/var/lib/roundcubemail/.gitkeep b/ressources/roundcubemail/rootfs/var/lib/roundcubemail/.gitkeep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/ressources/roundcubemail/rootfs/var/lib/roundcubemail/.gitkeep @@ -0,0 +1 @@ +