2017 © Pedro Peláez
 

library php-deb-packager

A simple debian packager for PHP applications

image

wdalmut/php-deb-packager

A simple debian packager for PHP applications

  • Tuesday, July 18, 2017
  • by wdalmut
  • Repository
  • 4 Watchers
  • 51 Stars
  • 21,617 Installations
  • PHP
  • 3 Dependents
  • 0 Suggesters
  • 6 Forks
  • 0 Open issues
  • 10 Versions
  • 3 % Grown

The README.md

Debian packager (PHP)

  • Develop: Build Status
  • Master : Build Status

A simple debian packager for PHP applications, (*1)

Get composer:, (*2)

curl -sS http://getcomposer.org/installer | php 

Install dependencies and autoloader, (*3)

php composer.phar install

Use it:, (*4)

<?php

require_once __DIR__ . '/vendor/autoload.php';

$control = 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", "walter.dalmut@corley.it")
    ->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();

Create the Package, (*5)

$(php pack.php)

Pre-Post scripts

Optianally you can add script for different hooks, (*6)

  • pre-install
    • Run pre install
  • post-install
    • Run post install
  • pre-remove
    • Run pre package remove
  • post-remove
    • Run post package remove

Adding scripts, (*7)

$packager->setPreInstallScript(__DIR__ . '/my-pre-install-script.sh');
$packager->setPostInstallScript(__DIR__ . '/my-post-install-script.sh');
$packager->setPreRemoveScript(__DIR__ . '/my-pre-remove-script.sh');
$packager->setPostRemoveScript(__DIR__ . '/my-post-remove-script.sh');

See a script example, (*8)

#!/bin/sh
#postinst script for upcloo

set -e

echo "Goodbye Cruel World"

exit 0

Use Yaml files instead the library directly

Just take a look to wdalmut/php-deb-describe, (*9)

The Versions

18/07 2017

dev-master

9999999-dev

A simple debian packager for PHP applications

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

packager ubuntu debian deb php-deb

18/07 2017

0.0.14

0.0.14.0

A simple debian packager for PHP applications

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

packager ubuntu debian deb php-deb

27/05 2015

dev-develop

dev-develop

A simple debian packager for PHP applications

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

packager ubuntu debian deb php-deb

27/05 2015

0.0.13

0.0.13.0

A simple debian packager for PHP applications

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

packager ubuntu debian deb php-deb

26/05 2015

0.0.12

0.0.12.0

A simple debian packager for PHP applications

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

packager ubuntu debian deb php-deb

21/05 2015

0.0.11

0.0.11.0

A simple debian packager for PHP applications

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

packager ubuntu debian deb php-deb

12/04 2015

0.0.10

0.0.10.0

A simple debian packager for PHP applications

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

packager ubuntu debian deb php-deb

12/04 2015

0.0.9

0.0.9.0

A simple debian packager for PHP applications

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

packager ubuntu debian deb php-deb

31/07 2012

0.0.3

0.0.3.0

A simple debian packager for PHP applications

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

packager ubuntu deb php-deb

31/07 2012

0.0.8

0.0.8.0

A simple debian packager for PHP applications

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

packager ubuntu deb php-deb