All Projects → wdalmut → php-deb-packager

wdalmut / php-deb-packager

Licence: other
A PHP library to generate `.deb` packages (Software distribution)

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to php-deb-packager

packer-kvm
Create VM templates with Packer for usage with Libvirt/KVM virtualization : CentOS 7, CentOS 8, CentOS 8 Stream, Alma Linux, Rocky Linux, Bionic (Ubuntu 1804), Focal (Ubuntu 2004), Debian 11 (stable), Kali Linux, Fedora 33 and Fedora 34.
Stars: ✭ 99 (+83.33%)
Mutual labels:  packer, debian
Ubuntu-Launchpad
The Ubuntu version of Apple's/MacOS Launchpad application
Stars: ✭ 21 (-61.11%)
Mutual labels:  debian, debian-packages
Packer Build
Packer Automated VM Image and Vagrant Box Builds
Stars: ✭ 199 (+268.52%)
Mutual labels:  packer, debian
Robox
The tools needed to robotically create/configure/provision a large number of operating systems, for a variety of hypervisors, using packer.
Stars: ✭ 303 (+461.11%)
Mutual labels:  packer, debian
intellij-idea-community
Unofficial .deb packages of IntelliJ IDEA Community Edition. This is a mirror of
Stars: ✭ 32 (-40.74%)
Mutual labels:  debian, debian-packages
Packer Boxes
Jeff Geerling's Packer build configurations for Vagrant boxes.
Stars: ✭ 495 (+816.67%)
Mutual labels:  packer, debian
Ts3server Package
A script that generates a debian package for a TeamSpeak 3 Server
Stars: ✭ 5 (-90.74%)
Mutual labels:  package, debian
intellij-idea-ultimate
Unofficial .deb packages of IntelliJ IDEA Ultimate Edition. This is a mirror of https://gitlab.com/mmk2410/intellij-idea-ultimate
Stars: ✭ 16 (-70.37%)
Mutual labels:  debian, debian-packages
debianopt-repo
Additional debian repository for awesome open-source projects.
Stars: ✭ 47 (-12.96%)
Mutual labels:  debian, debian-packages
Patchman
Patchman is a Linux Patch Status Monitoring System
Stars: ✭ 163 (+201.85%)
Mutual labels:  package, debian
cloud-desktops
Cloud-based Virtual Desktops on Google Cloud Platform
Stars: ✭ 14 (-74.07%)
Mutual labels:  packer, debian
debian-packaging
Create Debian packages of non-free, closed-source and other software.
Stars: ✭ 19 (-64.81%)
Mutual labels:  debian, debian-packages
ansible-role-packer-debian
Ansible Role - Packer Debian/Ubuntu Configuration for Vagrant VirtualBox
Stars: ✭ 32 (-40.74%)
Mutual labels:  packer, debian
Packer Templates
Stars: ✭ 90 (+66.67%)
Mutual labels:  packer, debian
Dh Virtualenv
Python virtualenvs in Debian packages
Stars: ✭ 1,504 (+2685.19%)
Mutual labels:  debian, debian-packages
repogen
Easy-to-use signed APT repository generator with a web-based package browser.
Stars: ✭ 34 (-37.04%)
Mutual labels:  package, debian
maldetect
Debian packaging of Linux Malware Detect (https://github.com/rfxn/linux-malware-detect)
Stars: ✭ 48 (-11.11%)
Mutual labels:  debian, debian-packages
Debreate
A utility for creating Debian packages.
Stars: ✭ 70 (+29.63%)
Mutual labels:  package, debian
docker-debian-repository
A local repository for publishing deb files for use with apt.
Stars: ✭ 49 (-9.26%)
Mutual labels:  debian, debian-packages
wakemeops
A Debian repository for portable applications
Stars: ✭ 54 (+0%)
Mutual labels:  debian, debian-packages

Debian packager (PHP)

  • Develop: Build Status
  • Master : Build Status

A simple debian 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';

$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", "[email protected]")
    ->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

$(php pack.php)

Pre-Post scripts

Optianally you can add script for different hooks

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

Adding scripts

$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

#!/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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].