PHP Classes

PHP RPM Packager: Create RPM packages for PHP applications

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 225 All time: 8,218 This week: 560Up
Version License PHP version Categories
php-rpm-package 0.1.9MIT/X Consortium ...5.3PHP 5, Tools, Unix, Compression
Description 

Author

This package can create RPM packages for PHP applications.

The spec class can define with several details of a RPM package like the name, version, description, summary, project URL, etc..

The packager class can map existing project directories to mount directories to be used in the RPM package, create the mount directories and build the RPM package from the files in the mounted directories.

Innovation Award
PHP Programming Innovation award nominee
June 2015
Number 11
RPM is a popular packaging format used by several Linux distributions to provide packages to be installed on the system.

This package can build RPM package files, so you can install them on Linux distributions based on RPM.

Manuel Lemos
Picture of Sergey Vanyushin
  Performance   Level  
Name: Sergey Vanyushin is available for providing paid consulting. Contact Sergey Vanyushin .
Classes: 15 packages by
Country: Russian Federation Russian Federation
Age: 28
All time rank: 57216 in Russian Federation Russian Federation
Week rank: 12 Up1 in Russian Federation Russian Federation Up
Innovation award
Innovation award
Nominee: 15x

Winner: 2x

Documentation

RPM packager (PHP)

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)

  Files folder image Files (8)  
File Role Description
Files folder imagesrc (2 files)
Files folder imagetests (2 files)
Plain text file .travis.yml Data Auxiliary data
Plain text file composer.json Data Auxiliary data
Plain text file LICENSE Lic. License text
Plain text file README.md Doc. Documentation

  Files folder image Files (8)  /  src  
File Role Description
  Plain text file Packager.php Class Class source
  Plain text file Spec.php Class Class source

  Files folder image Files (8)  /  tests  
File Role Description
  Plain text file PackagerTest.php Test Unit test script
  Plain text file SpecTest.php Test Unit test script

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:225
This week:0
All time:8,218
This week:560Up