sudo apt-get install devscripts build-essential lintian
- Create a directory with prebuild binaries, for example: myproj_1.0.0.orig
- myproj_1.0.0.orig must contains a linux file structure, for exampel: binaries should be in
myproj_1.0.0.orig/usr/bin
, libraries inusr/lib
orusr/lib64
et cetera.. - Create tar.gz from directory:
tar -zcvf myproj_1.0.0.orig.tar.gz myproj_1.0.0.orig
cd myproj_1.0.0.orig
mkdir debian
dch --create -v 1.0.0-1 --package myproj
- this command may ask you about preferred editor, select one- Write changelog respecting syntax:
- asterisk (*) - what was changed, if new, just leave "initial release"
- -- author, write your name and email
echo "10" > debian/compat
- create file
control
indebian
- Example:
Source: myproj
Maintainer: Mike Smith <[email protected]>
Section: misc
Priority: optional
Standards-Version: 4.2.1
Build-Depends: debhelper (>=10), !!! write dependencies here in format: package-name (version_name), comma_separated (version_name)
Package: myproj
Architecture: !!! any (arch doesn't matter) or all or i386 (fox x86) or amd64 (for x86_64) https://www.debian.org/doc/manuals/maint-guide/dreq.html#control
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Write your
multiline description
- Write copyright to
debian/copyright
- Paste to
debian/rules
:
#!/usr/bin/make -f
%:
dh $@
note: The last line should be indented by one TAB character, not by spaces. The file is a makefile, and TAB is what the make command wants
-
mkdir debian/source && echo "3.0 (quilt)" debian/source/format
-
Now, in current root directory (myproj_1.0.0.orig), run:
debuild -us -uc
-
cd .. && ls
-
Done.
For more information about errors and advanced configuration, read official doc