Skip to content

Generating the package for Ubuntu

Rael Gugelmin Cunha edited this page Jul 23, 2019 · 3 revisions

Requirements

If it's your first time generating a .deb package, please follow ALL instructions from Ubuntu Packaging Guide: http://packaging.ubuntu.com/html/getting-set-up.html

Generating the Ubuntu package

Now let's create the Ubuntu package and upload to the PPA.

1. Clone this repo

Clone the repo and enter into the folder:

git clone [email protected]:rvm/ubuntu_rvm.git
cd ubuntu_rvm

2. Download stable RVM into src folder

Download stable RVM, extract it and rename it to src:

wget https://github.com/wayneeseguin/rvm/archive/stable.tar.gz
tar -xzvf stable.tar.gz
rm stable.tar.gz
mv rvm-stable src

3. Remove .git* files from src

Enter src folder and remove .git files from the debian package:

cd src
rm -Rf `find | grep '\.git'`

4. Update the install file

This file is used by the .deb package to describe files to be installed. Let's go back one folder and create it:

cd ..
find -L src -type f | sed 's,src\(.*\)/\(.*\),src\1/\2 usr/share/rvm/src/rvm\1,' > debian/install

5. Update the VERSION file

Using any text editor, update the VERSION file in the ubuntu_rvm folder. This file must use the same version as RVM (i.e., the same content as the src/VERSION file).

6. Update the changelog

Run dch -i to bump the version in debian/changelog. For the version, add an additional number to identify the package build version. Example: if RVM version is 1.29.9, first package build will be 1.29.9-1.

7. Generate the .source file

Inside the ubuntu_rvm folder run:

version=`cat VERSION`
dh_make --indep --createorig --yes -c apache -p rvm_$version
debuild -S -sa

8. Upload to the PPA

Inside the ubuntu_rvm folder run:

version=`cat VERSION`
dput ppa:rael-gc/rvm rvm_${version}-1_source.changes

9. Push changes to GitHub

Add changes, Commit and Push.