vysokeskoly / deb-build
Utilities for building deb packages of PHP apps
Installs: 13 024
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: ^8.1
- ext-dom: *
- ext-json: *
- ext-mbstring: *
- consolidation/robo: ^4
Requires (Dev)
README
Build deb package of PHP application using Robo task runner.
How to install and use
First install this package as composer dependency:
composer require vysokeskoly/deb-build:dev-master
- NOTE it must NOT be installed as
--dev
dependency, as it is needed forpostinst
which is triggered on during installation on target server.
Then you can copy example RoboFile.php
:
cd {YOUR_PROJECT}
cp vendor/vysokeskoly/deb-build/example/RoboFile.php ./RoboFile.php
Now just edit RoboFile.php
and resolve all TODOs
and check/edit other configuration.
Autoloading
- You can require
Tasks
andTraits
in your ownRoboFile.php
. - Or you can use the predefined autoloader:
require __DIR__ . '/vendor/vysokeskoly/deb-build/src/autoload.php';
- It is not recommended (though it may be possible in some cases) to use
vendor/autoload.php
of your application, because it may (and most probably will) conflict withrobo.phar
inner dependencies (likeSymfony
).
Build a deb package
Build a deb package
sudo apt-get install ruby-dev gcc make
sudo gem install fpm
export BUILD_NUMBER=666
bin/robo build:deb