1. Go to this page and download the library: Download wdalmut/php-deb-packager library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
wdalmut / php-deb-packager example snippets
rol = new \wdm\debian\control\StandardFile();
$control
->setPackageName("my-package-name")
->setVersion("0.1.1")
->setDepends(array("php5", "php5-cli", "php5-xsl"))
->setInstalledSize(4096)
->setMaintainer("Walter Dal Mut", "[email protected]")
->setProvides("my-package-name")
->setDescription("My software description");
;
$packager = new \wdm\debian\Packager();
$packager->setOutputPath("/path/to/out");
$packager->setControl($control);
$packager->mount("/path/to/source-conf", "/etc/my-sw");
$packager->mount("/path/to/exec", "/usr/bin/my-sw");
$packager->mount("/path/to/docs", "/usr/share/docs");
//Creates folders using mount points
$packager->run();
//Get the Debian package command
echo $packager->build();