wapmorgan / php-rpm-packager
RPM packager for PHP applications.
Installs: 5 108
Dependents: 0
Suggesters: 0
Security: 0
Stars: 10
Watchers: 2
Forks: 3
Open Issues: 0
Requires
- ext-phar: *
Requires (Dev)
- phpunit/phpunit: 4.6.7
README
A simple rpm packager for PHP applications.
Get composer:
curl -sS http://getcomposer.org/installer | php
Install dependencies and autoloader
php composer.phar install
Use it:
<?php require_once __DIR__ . '/vendor/autoload.php'; $spec = new \wapmorgan\rpm\Spec(); $spec ->setPackageName("my-package-name") ->setVersion("0.1.1") ->setDescription("My software description") ->setSummary('simple summary') ->setRelease('1') ->setUrl('http://...'); ; $packager = new \wapmorgan\rpm\Packager(); $packager->setOutputPath("/path/to/out"); $packager->setSpec($spec); $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 rpmbuild command echo $packager->build();
Create the Package
$(php pack.php)