wapmorgan/php-rpm-packager

RPM packager for PHP applications.

v0.1.6 2017-01-24 11:57 UTC

This package is auto-updated.

Last update: 2024-12-12 04:48:44 UTC


README

Composer package Build Status Scrutinizer Code Quality

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)