{"id":15286587,"url":"https://github.com/wdalmut/php-deb-packager","last_synced_at":"2025-08-21T04:30:39.229Z","repository":{"id":3473972,"uuid":"4528966","full_name":"wdalmut/php-deb-packager","owner":"wdalmut","description":"A PHP library to generate `.deb` packages (Software distribution)","archived":false,"fork":false,"pushed_at":"2021-01-09T13:23:33.000Z","size":58,"stargazers_count":54,"open_issues_count":1,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-08T05:34:50.495Z","etag":null,"topics":["debian","debian-packages","package","packer","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wdalmut.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-06-02T12:11:40.000Z","updated_at":"2024-10-18T02:38:03.000Z","dependencies_parsed_at":"2022-09-07T07:31:33.155Z","dependency_job_id":null,"html_url":"https://github.com/wdalmut/php-deb-packager","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wdalmut%2Fphp-deb-packager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wdalmut%2Fphp-deb-packager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wdalmut%2Fphp-deb-packager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wdalmut%2Fphp-deb-packager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wdalmut","download_url":"https://codeload.github.com/wdalmut/php-deb-packager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230487844,"owners_count":18233865,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["debian","debian-packages","package","packer","php"],"created_at":"2024-09-30T15:17:17.374Z","updated_at":"2024-12-19T19:08:23.540Z","avatar_url":"https://github.com/wdalmut.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Debian packager (PHP)\n\n * Develop: [![Build Status](https://travis-ci.org/wdalmut/php-deb-packager.svg?branch=develop)](https://travis-ci.org/wdalmut/php-deb-packager)\n * Master : [![Build Status](https://travis-ci.org/wdalmut/php-deb-packager.svg?branch=master)](https://travis-ci.org/wdalmut/php-deb-packager)\n\nA simple debian packager for PHP applications\n\nGet composer:\n\n```\ncurl -sS http://getcomposer.org/installer | php \n```\n\nInstall dependencies and autoloader\n\n```\nphp composer.phar install\n```\n\nUse it:\n\n```php\n\u003c?php\n\nrequire_once __DIR__ . '/vendor/autoload.php';\n\n$control = new \\wdm\\debian\\control\\StandardFile();\n$control\n    -\u003esetPackageName(\"my-package-name\")\n    -\u003esetVersion(\"0.1.1\")\n    -\u003esetDepends(array(\"php5\", \"php5-cli\", \"php5-xsl\"))\n    -\u003esetInstalledSize(4096)\n    -\u003esetMaintainer(\"Walter Dal Mut\", \"walter.dalmut@corley.it\")\n    -\u003esetProvides(\"my-package-name\")\n    -\u003esetDescription(\"My software description\");\n;\n\n$packager = new \\wdm\\debian\\Packager();\n\n$packager-\u003esetOutputPath(\"/path/to/out\");\n$packager-\u003esetControl($control);\n\n$packager-\u003emount(\"/path/to/source-conf\", \"/etc/my-sw\");\n$packager-\u003emount(\"/path/to/exec\", \"/usr/bin/my-sw\");\n$packager-\u003emount(\"/path/to/docs\", \"/usr/share/docs\");\n\n//Creates folders using mount points\n$packager-\u003erun();\n\n//Get the Debian package command\necho $packager-\u003ebuild();\n```\n\n**Create the Package**\n\n```\n$(php pack.php)\n```\n\n## Pre-Post scripts\n\nOptianally you can add script for different hooks\n\n * pre-install\n   * Run pre install\n * post-install\n   * Run post install\n * pre-remove\n   * Run pre package remove\n * post-remove\n   * Run post package remove\n\nAdding scripts\n\n```php\n$packager-\u003esetPreInstallScript(__DIR__ . '/my-pre-install-script.sh');\n$packager-\u003esetPostInstallScript(__DIR__ . '/my-post-install-script.sh');\n$packager-\u003esetPreRemoveScript(__DIR__ . '/my-pre-remove-script.sh');\n$packager-\u003esetPostRemoveScript(__DIR__ . '/my-post-remove-script.sh');\n```\n\nSee a script example\n\n```shell\n#!/bin/sh\n#postinst script for upcloo\n\nset -e\n\necho \"Goodbye Cruel World\"\n\nexit 0\n```\n\n## Use Yaml files instead the library directly\n\nJust take a look to [wdalmut/php-deb-describe](https://github.com/wdalmut/php-deb-describe)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwdalmut%2Fphp-deb-packager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwdalmut%2Fphp-deb-packager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwdalmut%2Fphp-deb-packager/lists"}