diff --git a/compilators/debian/php/control b/compilators/debian/php/control new file mode 100644 index 0000000..e402a5d --- /dev/null +++ b/compilators/debian/php/control @@ -0,0 +1,9 @@ +Source: phyre-php +Package: phyre-php +Priority: optional +Version: 8.2.0 +Section: web +Maintainer: CloudVision Ltd. +Homepage: https://www.phyrepanel.com +Architecture: amd64 +Description: Phyre Panel PHP SDK diff --git a/compilators/debian/php/php-compile.sh b/compilators/debian/php/php-compile.sh index 0973231..35bcb07 100644 --- a/compilators/debian/php/php-compile.sh +++ b/compilators/debian/php/php-compile.sh @@ -23,9 +23,33 @@ sudo ./configure --prefix=/usr/local/phyre/php \ --with-zip \ --enable-mbstring -#sudo ./configure --prefix=/usr/local/phyre/php \ -# --enable-fpm --with-fpm-user=admin --with-fpm-group=admin - # Compile PHP sudo make sudo make install + +PACKAGE_MAIN_DIR=$MAIN_DIR/phyre-php-8.2.0 +sudo mkdir $PACKAGE_MAIN_DIR + +# Create debian package directories +sudo mkdir -p $PACKAGE_MAIN_DIR/DEBIAN + +# Copy php compiled files +sudo mv /usr/local/phyre/php $PACKAGE_MAIN_DIR/usr/local/phyre + +# Copy debian package META file +sudo cp $MAIN_DIR/control $PACKAGE_MAIN_DIR/DEBIAN +sudo cp $MAIN_DIR/postinst $PACKAGE_MAIN_DIR/DEBIAN +sudo cp $MAIN_DIR/postrm $PACKAGE_MAIN_DIR/DEBIAN + +# Set debian package post files permissions +sudo chmod +x $PACKAGE_MAIN_DIR/DEBIAN/postinst +sudo chmod +x $PACKAGE_MAIN_DIR/DEBIAN/postrm + +# Make debian package +sudo dpkg-deb --build $PACKAGE_MAIN_DIR +sudo dpkg --info $MAIN_DIR/phyre-php-8.2.0.deb +sudo dpkg --contents $MAIN_DIR/phyre-php-8.2.0.deb + +# Move debian package to dist folder +sudo mkdir -p $MAIN_DIR/dist +sudo mv $MAIN_DIR/phyre-php-8.2.0.deb $MAIN_DIR/dist diff --git a/compilators/debian/php/postinst b/compilators/debian/php/postinst new file mode 100644 index 0000000..a9bf588 --- /dev/null +++ b/compilators/debian/php/postinst @@ -0,0 +1 @@ +#!/bin/bash diff --git a/compilators/debian/php/postrm b/compilators/debian/php/postrm new file mode 100644 index 0000000..13f4793 --- /dev/null +++ b/compilators/debian/php/postrm @@ -0,0 +1,2 @@ +#!/bin/sh +