Quantcast
Channel: Pinguy OS Forum - All Forums
Viewing all articles
Browse latest Browse all 1646

How to create a .deb from an already-compiled program

$
0
0
The simplest way is to use Debreate.

But if you encounter issues its a bit harder to trouble shoot.

To do it manually follow these two guides:
  • http://ubuntuforums.org/showthread.php?t=910717&p=5728953
  • https://praxisintermedia.wordpress.com/2013/03/28/packaging-as-a-deb/

The first guide shows you the basics needed.
The seconded guide goes into more details and helps make the .deb lintian complaint.

One thing missing from both guides is:

Code:
Installed-Size:

This is needed for the package to be lintian complaint.
You can find out the size by CD'ing into the project folder and running:

Code:
du -s

This will give you the correct value to enter into the control file.

Example of a control file:

Code:
Package: pinguybuilder
Version: 4.3-2
Architecture: all
Maintainer: pinguy <antoni.normang@gmail.com>
Section: utils
Priority: optional
Depends: memtest86+, coreutils, dialog, mkisofs | genisoimage, findutils, bash, passwd, sed, squashfs-tools, casper, rsync, mount, eject, libdebian-installer4, os-prober, ubiquity-frontend-debconf, user-setup, discover, laptop-detect, syslinux, syslinux-common, util-linux, xresprobe, aufs-tools | unionfs-fuse, dpkg-dev, python (>= 2.7), python (<< 2.8), python:any (>= 2.7.1-0ubuntu2), python-glade2, python-vte, plymouth-x11
Description: This script creates a livecd of the installed system and works with *buntu systems.
You can either make a distributable livecd or a backup of your system.
Installed-Size: 11752

The other thing missing from the guides is info about permissions.

You need to make sure all the files have the correct value of 755.

Code:
sudo chmod 755 -R <your-package-directory>

This isn't pointed out in the first guide but is spoke about in the seconded guide.

You must run fakeroot when creating the .deb

Code:
fakeroot dpkg-deb -b <your-package-directory>

Once the package is created run:

Code:
lintian <your-package-deb>

And see if there is any errors.

If there are. You can add them to the overrides file to be ignored:
(Info about overrides can be found in the seconded guide)

Code:
<your-package-directory>/usr/share/lintian/overrides/<package-name>

Example of a overrides file:

Code:
package-name: arch-independent-package-contains-binary-or-object
package-name: missing-dependency-on-libc
package-name: debian-changelog-file-missing
package-name: extended-description-is-empty

Just read up on the errors to make sure that overriding them won't have any negative effects.

Viewing all articles
Browse latest Browse all 1646

Trending Articles