wdalmut/php-deb-describe

A simple debian packager wrapper for PHP applications

0.0.1 2015-04-12 13:52 UTC

This package is not auto-updated.

Last update: 2024-12-21 18:30:00 UTC


README

Just a simple wrapper around the package wdalmut/php-deb-packager

  • master Build Status

Describe a deb package with Yaml files

output_path: /mnt/out
mount:
  - {src: "/first", dest: "/somewhere"}
  - {src: "/src", dest: "/usr/shara/mysw"}
control:
  package: my-package-name
  version: 0.0.1
  depends: php5, php5-cli, php5-curl
  maintainer: Walter Dal Mut [an-email@email.tld]
  provides: something, something-else
  replaces: first-package, second-package
  suggests: php5-mcrypt, php5-xsl
  pre_depends: build-essentials, libc6
  architecture: all
  section: web

Use with composer

Just require it!

composer require wdalmut/php-deb-describe:dev-master

And use it!

./vendor/bin/pdpkg package your.yml

Use it as phar package

You can create your phar package with clue/phar-composer

phar-composer.phar build wdalmut/php-deb-describe:dev-master

Use the library directly

Just prepare a simple compile.php file

<?php
use Symfony\Component\Yaml\Parser;
use wdm\debian\Packager;
use wdm\debian\control\StandardFile;

$parser = new Parser();
$packager = new Packager();
$packager->setControl(new StandardFile());

$describer = new Describer($parser, $packager);
echo $describer->compose(file_get_contents("/path/to/file.yml"));

And run it!

$(php compile.php)

Now you have your .deb package!