Installing Debian package tools (dpkg-buildpackage) on Amazon Linux

amazon ec2amazon-linuxdebdpkg

I am setting up a web server which packages and hosts different installers for client applications on Windows, Mac OS X, and Linux.

I am using EC2 so I went with Amazon Linux for my base image.

I have the repackaging working fine for creating Windows, Mac OS X, and RPM-based installers, however I can't find dpkg-buildpackage anywhere in the Amazon Linux package repositories, so I currently can't create installers for our Debian and Ubuntu-based clients.

I tried searching for the dpkg-buildpackage source, but it's a fraught search term: all I found were people asking questions about using dpkg-buildpackage to build things from source, but not the source of the build tool itself.

How can I install dpkg-buildpackage on Amazon Linux so I can create .deb installers?

Best Answer

I managed to install it.

Steps:

# install ncurses-devel prereq
yum install ncurses-devel
wget http://http.debian.net/debian/pool/main/d/dpkg/dpkg_1.18.10.tar.xz
tar xvf dpkg_1.18.10.tar.xz
cd dpkg-1.18.10
./configure
make
make install

After installing it, I noticed that running dpkg-buildpackage was failing due to missing the Dpkg.pm perl module, so I installed that:

yum install cpan
cpan install Dpkg

Then the @INC path didn't have the newly installed module's path, so I modified the global profile to include it:

$ cat /etc/profile.d/perl5lib.sh
# perl5lib initialization

export PERL5LIB=$PERL5LIB:/usr/local/share/perl5/vendor_perl

and everything seemed to work.

Related Topic