If you ever tried to package a simple application with the native rpmbuild, you may know, what a pain it could be.
Writing of a spec file, understand the errors and the different build-stages. Automation and deployment can be simple and without additional overhead.
This way will work like s charm from the first try :-)
# Debian way apt-get install ruby-dev # or the SUSE way zypper in ruby-devel sudo gem install fpm |
Basic Syntax:
fpm.ruby2.5 -s source_type -t target_type -n package_name -v version_number source_name_or_location |
RPM run:
fpm.ruby2.5 -s dir -t rpm -n sync-brain -v 0.0.1 -C sync-brain-0.1-1.x86_64 |
Deb run:
fpm.ruby2.5 -s dir -t deb -n sync-brain -v 0.0.1 -C sync-brain-0.1-1.x86_64 |
Add description to the package:
--description "sync-brain logic" |
Script that should be run at the appropriate time:
--after-install --before-install --after-remove --before-remove |
Structure of the source directory:
vagrant-openSUSE-Leap:~ # tree sync-brain-0.1-1.x86_64/ sync-brain-0.1-1.x86_64/ └── opt └── sync-brain.sh |
You see, it’s a simple directory which can contain a simple script or a functional application.
Now its your turn, try it out and be successful with your projects.
Leave a Reply