How to create .DEB package for Unix Debian-like systems

This guide isn’t complete. Create valid .DEB file is a much harder than I thought. So I will create .DEB file (and update this article) when I will have a more free time.

This is how now looks lintian result ;-( :

dev@user-virtual-machine:~/dev/Applications/AtomixDevelopment/DeployInfo/Ubuntu$ lintian ormdesigner.deb 
E: orm-designer: arch-dependent-file-in-usr-share usr/share/orm-designer/OrmDesigner2
E: orm-designer: unstripped-binary-or-object usr/share/orm-designer/OrmDesigner2
E: orm-designer: arch-dependent-file-in-usr-share usr/share/orm-designer/libs/libQtCore.so.4
E: orm-designer: arch-dependent-file-in-usr-share usr/share/orm-designer/libs/libQtGui.so.4
E: orm-designer: arch-dependent-file-in-usr-share usr/share/orm-designer/libs/libboost_chrono.so
E: orm-designer: unstripped-binary-or-object usr/share/orm-designer/libs/libboost_chrono.so
E: orm-designer: arch-dependent-file-in-usr-share usr/share/orm-designer/libs/libboost_chrono.so.1.49.0
E: orm-designer: unstripped-binary-or-object usr/share/orm-designer/libs/libboost_chrono.so.1.49.0
E: orm-designer: arch-dependent-file-in-usr-share usr/share/orm-designer/libs/libboost_date_time.so.1.49.0
E: orm-designer: unstripped-binary-or-object usr/share/orm-designer/libs/libboost_date_time.so.1.49.0
E: orm-designer: arch-dependent-file-in-usr-share usr/share/orm-designer/libs/libboost_filesystem.so.1.49.0
E: orm-designer: unstripped-binary-or-object usr/share/orm-designer/libs/libboost_filesystem.so.1.49.0
E: orm-designer: arch-dependent-file-in-usr-share usr/share/orm-designer/libs/libboost_iostreams.so.1.49.0
E: orm-designer: unstripped-binary-or-object usr/share/orm-designer/libs/libboost_iostreams.so.1.49.0
E: orm-designer: arch-dependent-file-in-usr-share usr/share/orm-designer/libs/libboost_regex.so.1.49.0
E: orm-designer: unstripped-binary-or-object usr/share/orm-designer/libs/libboost_regex.so.1.49.0
E: orm-designer: arch-dependent-file-in-usr-share usr/share/orm-designer/libs/libboost_system.so.1.49.0
E: orm-designer: unstripped-binary-or-object usr/share/orm-designer/libs/libboost_system.so.1.49.0
E: orm-designer: arch-dependent-file-in-usr-share usr/share/orm-designer/libs/libboost_thread.so.1.49.0
E: orm-designer: unstripped-binary-or-object usr/share/orm-designer/libs/libboost_thread.so.1.49.0
E: orm-designer: arch-dependent-file-in-usr-share usr/share/orm-designer/libs/libexslt.so.0
E: orm-designer: arch-dependent-file-in-usr-share usr/share/orm-designer/libs/libxml2.so.2
E: orm-designer: embedded-library usr/share/orm-designer/libs/libxml2.so.2: libxml2
E: orm-designer: arch-dependent-file-in-usr-share usr/share/orm-designer/libs/libxslt.so.1
E: orm-designer: arch-dependent-file-in-usr-share usr/share/orm-designer/libs/libyaml-cpp.so.0.2
E: orm-designer: unstripped-binary-or-object usr/share/orm-designer/libs/libyaml-cpp.so.0.2
W: orm-designer: unknown-control-file control~
E: orm-designer: control-file-has-bad-permissions postinst 0775 != 0755
E: orm-designer: control-file-has-bad-owner postinst dev/dev != root/root
W: orm-designer: unknown-control-file postinst~
E: orm-designer: control-file-has-bad-permissions postrm 0775 != 0755
E: orm-designer: control-file-has-bad-owner postrm dev/dev != root/root
W: orm-designer: unknown-control-file postrm~
E: orm-designer: no-copyright-file
W: orm-designer: extended-description-line-too-long
W: orm-designer: package-relation-with-self breaks: orm-designer (<< 2.0.1)
E: orm-designer: wrong-file-owner-uid-or-gid usr/ 1001/1001
W: orm-designer: non-standard-dir-perm usr/ 0775 != 0755
E: orm-designer: wrong-file-owner-uid-or-gid usr/share/ 1001/1001
W: orm-designer: non-standard-dir-perm usr/share/ 0775 != 0755
E: orm-designer: wrong-file-owner-uid-or-gid usr/share/orm-designer/ 1001/1001
W: orm-designer: non-standard-dir-perm usr/share/orm-designer/ 0775 != 0755
E: orm-designer: wrong-file-owner-uid-or-gid usr/share/orm-designer/OrmDesigner2 1001/1001
W: orm-designer: non-standard-executable-perm usr/share/orm-designer/OrmDesigner2 0775 != 0755
E: orm-designer: wrong-file-owner-uid-or-gid usr/share/orm-designer/libs/ 1001/1001
W: orm-designer: non-standard-dir-perm usr/share/orm-designer/libs/ 0775 != 0755
E: orm-designer: wrong-file-owner-uid-or-gid usr/share/orm-designer/libs/libQtCore.so.4 1001/1001
E: orm-designer: wrong-file-owner-uid-or-gid usr/share/orm-designer/libs/libQtGui.so.4 1001/1001
E: orm-designer: wrong-file-owner-uid-or-gid usr/share/orm-designer/libs/libboost_chrono.so 1001/1001
W: orm-designer: non-standard-executable-perm usr/share/orm-designer/libs/libboost_chrono.so 0775 != 0755
E: orm-designer: wrong-file-owner-uid-or-gid usr/share/orm-designer/libs/libboost_chrono.so.1.49.0 1001/1001
W: orm-designer: non-standard-executable-perm usr/share/orm-designer/libs/libboost_chrono.so.1.49.0 0775 != 0755
E: orm-designer: wrong-file-owner-uid-or-gid usr/share/orm-designer/libs/libboost_date_time.so.1.49.0 1001/1001
W: orm-designer: non-standard-executable-perm usr/share/orm-designer/libs/libboost_date_time.so.1.49.0 0775 != 0755
E: orm-designer: wrong-file-owner-uid-or-gid usr/share/orm-designer/libs/libboost_filesystem.so.1.49.0 1001/1001
W: orm-designer: non-standard-executable-perm usr/share/orm-designer/libs/libboost_filesystem.so.1.49.0 0775 != 0755
E: orm-designer: wrong-file-owner-uid-or-gid usr/share/orm-designer/libs/libboost_iostreams.so.1.49.0 1001/1001
W: orm-designer: non-standard-executable-perm usr/share/orm-designer/libs/libboost_iostreams.so.1.49.0 0775 != 0755
E: orm-designer: wrong-file-owner-uid-or-gid usr/share/orm-designer/libs/libboost_regex.so.1.49.0 1001/1001
W: orm-designer: non-standard-executable-perm usr/share/orm-designer/libs/libboost_regex.so.1.49.0 0775 != 0755
E: orm-designer: wrong-file-owner-uid-or-gid usr/share/orm-designer/libs/libboost_system.so.1.49.0 1001/1001
W: orm-designer: non-standard-executable-perm usr/share/orm-designer/libs/libboost_system.so.1.49.0 0775 != 0755
E: orm-designer: wrong-file-owner-uid-or-gid usr/share/orm-designer/libs/libboost_thread.so.1.49.0 1001/1001
W: orm-designer: non-standard-executable-perm usr/share/orm-designer/libs/libboost_thread.so.1.49.0 0775 != 0755
E: orm-designer: wrong-file-owner-uid-or-gid usr/share/orm-designer/libs/libexslt.so.0 1001/1001
E: orm-designer: wrong-file-owner-uid-or-gid usr/share/orm-designer/libs/libxml2.so.2 1001/1001
E: orm-designer: wrong-file-owner-uid-or-gid usr/share/orm-designer/libs/libxslt.so.1 1001/1001
E: orm-designer: wrong-file-owner-uid-or-gid usr/share/orm-designer/libs/libyaml-cpp.so.0.2 1001/1001
W: orm-designer: maintainer-script-ignores-errors postinst
W: orm-designer: maintainer-script-ignores-errors postrm~
W: orm-designer: maintainer-script-ignores-errors postrm
W: orm-designer: maintainer-script-ignores-errors postinst~
E: orm-designer: shlib-with-executable-bit usr/share/orm-designer/libs/libboost_chrono.so 0775
E: orm-designer: shlib-with-executable-bit usr/share/orm-designer/libs/libboost_chrono.so.1.49.0 0775
E: orm-designer: shlib-with-executable-bit usr/share/orm-designer/libs/libboost_date_time.so.1.49.0 0775
E: orm-designer: shlib-with-executable-bit usr/share/orm-designer/libs/libboost_filesystem.so.1.49.0 0775
E: orm-designer: shlib-with-executable-bit usr/share/orm-designer/libs/libboost_iostreams.so.1.49.0 0775
E: orm-designer: shlib-with-executable-bit usr/share/orm-designer/libs/libboost_regex.so.1.49.0 0775
E: orm-designer: shlib-with-executable-bit usr/share/orm-designer/libs/libboost_system.so.1.49.0 0775
E: orm-designer: shlib-with-executable-bit usr/share/orm-designer/libs/libboost_thread.so.1.49.0 0775

Prerequisities

sudo apt-get install build-essential autoconf automake autotools-dev dh-make debhelper devscripts fakeroot xutils lintian pbuilder

Commands

#creates .deb file
dpkg -b ormdesigner-2.0.1 ormdesigner.deb

#validate .deb file
lintian ormdesigner

How to add screenshot to .DEB file

http://screenshots.debian.net/
http://stackoverflow.com/questions/4776624/how-to-create-deb-package-with-screenshot-for-ubuntu

Errors

E: orm-designer: wrong-file-owner-uid-or-gid usr/ 1001/1001
...

External links

http://www.ibm.com/developerworks/linux/library/l-debpkg/index.html
How to create DEB from source files
How to remove some litian errors

Leave a Reply

Your email address will not be published. Required fields are marked *