- Custom script to convert a directory structure in a rpm .
- noarch rpm generation , Right now it deals good with flat files , like .war , custom scripts , config files packaging , php files anything whatever so ever which doesn't require build/make stuff .
- If you have a linux server then installing it just one step.
- Clone the multipkg repository
git clone git@github.com:sverma/multipkg.git
cd multipkg
make install
- /usr/local/bin/multipkg ( Ruby Script )
- /etc/multipkg/spec_template.erb ( Ruby template for spec file )
-
First plan your directory structure where you want your files to go on the server .
-
Let suppose you have following 4 files which should be packaged in rpm and installed on the server with the below directory structure.
/etc/myapplication/default.conf
/var/www/html/myapplication/myapplication.php
/var/www/html/myapplication/myapplicationLogic.php
/etc/init.d/myapplication
- To create a RPM with the above files , create a directory with your application name "myapplication" and "myapplication/root" .
myapplication/
myapplication/root ( Will ACT as FAKE ROOT DIRECTORY )
- Create a version file myapplication/version Containing the version , release , architecture information
name: myapplication
version : 0.1
release: 1
arch: noarch
- Execute the command
sudo multipkg --dir myapplication
- This is create myapplication.<version>.<release>.noarch.rpm in following folder
myapplication/packages
- Adding installation scripts
- If you have any post/pre installation/uninstallation commands you can add them in version file with the following tags
- pre , post , preun , postun
- Adding source rpm support
- Adding build/make support