Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Better to know this:
- 1. Compiling
- 2. Linking
- 3. Building
- Compiling:
- Compiling is the act of turning source code into object code.
- Linking is the act of combining object code with libraries into a raw executable.
- Building is the sequence composed of compiling and linking, with possibly other tasks such as installer creation.
- Many compilers handle the linking step automatically after compiling source code
- So we want to learn today the 3rd part - Building or in easier terms "how to build the .DEB packages""
- Let's start with Hello World tarball. Say, I have Hello world pre-compiled source code and now I want to build DEB Package out of it.
- http://santi-bassett.blogspot.in/2014/07/how-to-create-debian-package.html
- 1. Download Hello World pre-compiled source code:
- root@dell-virtual-machine:~# wget http://ftp.gnu.org/gnu/hello/hello-2.1.0.tar.gz
- --2015-10-29 23:22:31-- http://ftp.gnu.org/gnu/hello/hello-2.1.0.tar.gz
- Connecting to 10.116.2.242:80... connected.
- Proxy request sent, awaiting response... 200 OK
- Length: 389049 (380K) [application/x-gzip]
- Saving to: ‘hello-2.1.0.tar.gz’
- 100%[======================================>] 389,049 185KB/s in 2.0s
- 2015-10-29 23:22:34 (185 KB/s) - ‘hello-2.1.0.tar.gz’ saved [389049/389049]
- 1. The package creation process:
- There are several tools involved in this process, used to build, check and sign the package. Debuild is a wrapper that will call them appropriately, so we don't need to do it manually. Here is a brief description of the tools it invokes:
- dpkg-buildpackage: It creates a temporary directory with the package files, building later the .deb package with its content. To work properly, it heavily relies on the files in the special debian subdirectory: control, rules, changelog, etc.
- lintian: Dissects Debian packages trying to find bugs or policy violations.
- debsign: Signs packages (.dsc and .changes files) using GPG or PGP.
- 2. Installing necessary software to build our packages:
- root@dell-virtual-machine:~# apt-get install dh-make build-essential
- Reading package lists... Done
- Building dependency tree
- Reading state information... Done
- build-essential is already the newest version.
- dh-make is already the newest version.
- dh-make set to manually installed.
- 0 upgraded, 0 newly installed, 0 to remove and 135 not upgraded.
- root@dell-virtual-machine:~# apt-get install devscripts fakeroot debootstrap pbuilder
- Reading package lists... Done
- Building dependency tree
- Reading state information... Done
- fakeroot is already the newest version.
- debootstrap is already the newest version.
- debootstrap set to manually installed.
- devscripts is already the newest version.
- devscripts set to manually installed.
- pbuilder is already the newest version.
- 0 upgraded, 0 newly installed, 0 to remove and 135 not upgraded.
- 3. Setting up Environmental Variables:
- root@dell-virtual-machine:~# export DEBEMAIL="Ajeet_Raina@dell.com"
- root@dell-virtual-machine:~# export DEBFULLNAME="Ajeet"
- 4. Uncompressing our source code (format of the tar.gz file is software-version.tar.gz)
- In my case, for the purpose of this little how-to, I will build the Debian package for a simple "hello world" program written in C.
- root@dell-virtual-machine:~# tar xvfz hello-2.1.0.tar.gz
- hello-2.1.0/
- hello-2.1.0/intl/
- hello-2.1.0/intl/ChangeLog
- hello-2.1.0/intl/Makefile.in
- hello-2.1.0/intl/config.charset
- hello-2.1.0/intl/locale.alias
- hello-2.1.0/intl/ref-add.sin
- hello-2.1.0/intl/ref-del.sin
- hello-2.1.0/intl/gmo.h
- hello-2.1.0/intl/gettextP.h
- hello-2.1.0/intl/hash-string.h
- hello-2.1.0/intl/plural-exp.h
- hello-2.1.0/intl/eval-plural.h
- hello-2.1.0/intl/os2compat.h
- hello-2.1.0/intl/libgnuintl.h
- hello-2.1.0/intl/loadinfo.h
- hello-2.1.0/intl/bindtextdom.c
- hello-2.1.0/intl/dcgettext.c
- hello-2.1.0/intl/dgettext.c
- hello-2.1.0/intl/gettext.c
- hello-2.1.0/intl/finddomain.c
- hello-2.1.0/intl/loadmsgcat.c
- hello-2.1.0/intl/localealias.c
- hello-2.1.0/intl/textdomain.c
- hello-2.1.0/intl/l10nflist.c
- hello-2.1.0/intl/explodename.c
- hello-2.1.0/intl/dcigettext.c
- hello-2.1.0/intl/dcngettext.c
- hello-2.1.0/intl/dngettext.c
- hello-2.1.0/intl/ngettext.c
- hello-2.1.0/intl/plural.y
- hello-2.1.0/intl/plural-exp.c
- hello-2.1.0/intl/localcharset.c
- hello-2.1.0/intl/localename.c
- hello-2.1.0/intl/osdep.c
- hello-2.1.0/intl/os2compat.c
- hello-2.1.0/intl/intl-compat.c
- hello-2.1.0/intl/plural.c
- hello-2.1.0/intl/VERSION
- hello-2.1.0/po/
- hello-2.1.0/po/Makefile.in.in
- hello-2.1.0/po/Makevars
- hello-2.1.0/po/remove-potcdate.sin
- hello-2.1.0/po/quot.sed
- hello-2.1.0/po/boldquot.sed
- hello-2.1.0/po/en@quot.header
- hello-2.1.0/po/en@boldquot.header
- hello-2.1.0/po/insert-header.sin
- hello-2.1.0/po/Rules-quot
- hello-2.1.0/po/POTFILES.in
- hello-2.1.0/po/hello.pot
- hello-2.1.0/po/ca.po
- hello-2.1.0/po/da.po
- hello-2.1.0/po/de.po
- hello-2.1.0/po/de_DE.po
- hello-2.1.0/po/el.po
- hello-2.1.0/po/eo.po
- hello-2.1.0/po/es.po
- hello-2.1.0/po/et.po
- hello-2.1.0/po/fi.po
- hello-2.1.0/po/fr.po
- hello-2.1.0/po/gl.po
- hello-2.1.0/po/he.po
- hello-2.1.0/po/hr.po
- hello-2.1.0/po/hu.po
- hello-2.1.0/po/id.po
- hello-2.1.0/po/it.po
- hello-2.1.0/po/ja.po
- hello-2.1.0/po/ko.po
- hello-2.1.0/po/lv.po
- hello-2.1.0/po/nb.po
- hello-2.1.0/po/nl.po
- hello-2.1.0/po/nn.po
- hello-2.1.0/po/pl.po
- hello-2.1.0/po/pt.po
- hello-2.1.0/po/pt_BR.po
- hello-2.1.0/po/ru.po
- hello-2.1.0/po/sk.po
- hello-2.1.0/po/sl.po
- hello-2.1.0/po/sv.po
- hello-2.1.0/po/tr.po
- hello-2.1.0/po/uk.po
- hello-2.1.0/po/ca.gmo
- hello-2.1.0/po/da.gmo
- hello-2.1.0/po/de.gmo
- hello-2.1.0/po/de_DE.gmo
- hello-2.1.0/po/el.gmo
- hello-2.1.0/po/eo.gmo
- hello-2.1.0/po/es.gmo
- hello-2.1.0/po/et.gmo
- hello-2.1.0/po/fi.gmo
- hello-2.1.0/po/fr.gmo
- hello-2.1.0/po/gl.gmo
- hello-2.1.0/po/he.gmo
- hello-2.1.0/po/hr.gmo
- hello-2.1.0/po/hu.gmo
- hello-2.1.0/po/id.gmo
- hello-2.1.0/po/it.gmo
- hello-2.1.0/po/ja.gmo
- hello-2.1.0/po/ko.gmo
- hello-2.1.0/po/lv.gmo
- hello-2.1.0/po/nb.gmo
- hello-2.1.0/po/nl.gmo
- hello-2.1.0/po/nn.gmo
- hello-2.1.0/po/pl.gmo
- hello-2.1.0/po/pt.gmo
- hello-2.1.0/po/pt_BR.gmo
- hello-2.1.0/po/ru.gmo
- hello-2.1.0/po/sk.gmo
- hello-2.1.0/po/sl.gmo
- hello-2.1.0/po/sv.gmo
- hello-2.1.0/po/tr.gmo
- hello-2.1.0/po/uk.gmo
- hello-2.1.0/po/ChangeLog
- hello-2.1.0/po/LINGUAS
- hello-2.1.0/README
- hello-2.1.0/ABOUT-NLS
- hello-2.1.0/AUTHORS
- hello-2.1.0/COPYING
- hello-2.1.0/ChangeLog
- hello-2.1.0/INSTALL
- hello-2.1.0/Makefile.am
- hello-2.1.0/Makefile.in
- hello-2.1.0/NEWS
- hello-2.1.0/THANKS
- hello-2.1.0/TODO
- hello-2.1.0/aclocal.m4
- hello-2.1.0/config.guess
- hello-2.1.0/config.h.in
- hello-2.1.0/config.rpath
- hello-2.1.0/config.sub
- hello-2.1.0/configure
- hello-2.1.0/configure.ac
- hello-2.1.0/depcomp
- hello-2.1.0/install-sh
- hello-2.1.0/missing
- hello-2.1.0/mkinstalldirs
- hello-2.1.0/BUGS
- hello-2.1.0/ChangeLog.O
- hello-2.1.0/contrib/
- hello-2.1.0/contrib/ChangeLog
- hello-2.1.0/contrib/Makefile.am
- hello-2.1.0/contrib/Makefile.in
- hello-2.1.0/contrib/de_franconian_po.txt
- hello-2.1.0/contrib/evolution.txt
- hello-2.1.0/contrib/hello.1
- hello-2.1.0/doc/
- hello-2.1.0/doc/gpl.texi
- hello-2.1.0/doc/ChangeLog
- hello-2.1.0/doc/Makefile.am
- hello-2.1.0/doc/Makefile.in
- hello-2.1.0/doc/mdate-sh
- hello-2.1.0/doc/stamp-vti
- hello-2.1.0/doc/texinfo.tex
- hello-2.1.0/doc/version.texi
- hello-2.1.0/doc/hello.texi
- hello-2.1.0/doc/hello.info
- hello-2.1.0/src/
- hello-2.1.0/src/ChangeLog
- hello-2.1.0/src/Makefile.am
- hello-2.1.0/src/Makefile.in
- hello-2.1.0/src/alloca.c
- hello-2.1.0/src/hello.c
- hello-2.1.0/src/version.c
- hello-2.1.0/src/getopt.c
- hello-2.1.0/src/getopt1.c
- hello-2.1.0/src/getopt.h
- hello-2.1.0/src/system.h
- hello-2.1.0/man/
- hello-2.1.0/man/ChangeLog
- hello-2.1.0/man/Makefile.am
- hello-2.1.0/man/Makefile.in
- hello-2.1.0/man/hello.1
- hello-2.1.0/man/help2man
- hello-2.1.0/m4/
- hello-2.1.0/m4/README
- hello-2.1.0/m4/ChangeLog
- hello-2.1.0/m4/Makefile.am
- hello-2.1.0/m4/Makefile.in
- hello-2.1.0/m4/codeset.m4
- hello-2.1.0/m4/gettext.m4
- hello-2.1.0/m4/glibc21.m4
- hello-2.1.0/m4/iconv.m4
- hello-2.1.0/m4/isc-posix.m4
- hello-2.1.0/m4/lcmessage.m4
- hello-2.1.0/m4/lib-ld.m4
- hello-2.1.0/m4/lib-link.m4
- hello-2.1.0/m4/lib-prefix.m4
- hello-2.1.0/m4/progtest.m4
- hello-2.1.0/tests/
- hello-2.1.0/tests/ChangeLog
- hello-2.1.0/tests/Makefile.am
- hello-2.1.0/tests/Makefile.in
- hello-2.1.0/tests/hello-1
- hello-2.1.0/tests/world-1
- hello-2.1.0/tests/nothing-1
- 5. Change directory to hello-2.1.0
- root@dell-virtual-machine:~# cd hello-2.1.0
- 6. Displaying the contents of the files and driectories
- root@dell-virtual-machine:~/hello-2.1.0# ls
- ABOUT-NLS config.guess contrib intl mkinstalldirs THANKS
- aclocal.m4 config.h.in COPYING m4 NEWS TODO
- AUTHORS config.rpath depcomp Makefile.am po
- BUGS config.sub doc Makefile.in README
- ChangeLog configure INSTALL man src
- ChangeLog.O configure.ac install-sh missing tests
- root@dell-virtual-machine:~/hello-2.1.0# ls -la
- total 632
- drwxrwxrwx 10 270 users 4096 May 29 2002 .
- drwx------ 11 root root 4096 Oct 29 23:23 ..
- -rw-r--r-- 1 270 users 22132 May 22 2002 ABOUT-NLS
- -rw-r--r-- 1 270 users 93990 May 25 2002 aclocal.m4
- -rw-r--r-- 1 270 users 401 Jun 2 2001 AUTHORS
- -rw-r--r-- 1 270 users 71 Jun 2 2001 BUGS
- -rw-r--r-- 1 270 users 17760 May 25 2002 ChangeLog
- -rw-r--r-- 1 270 users 5605 Jun 2 2001 ChangeLog.O
- -rwxr-xr-x 1 270 users 38657 May 22 2002 config.guess
- -rw-r--r-- 1 270 users 5869 May 25 2002 config.h.in
- -rwxr-xr-x 1 270 users 14108 May 22 2002 config.rpath
- -rwxr-xr-x 1 270 users 28962 May 22 2002 config.sub
- -rwxr-xr-x 1 270 users 235695 May 25 2002 configure
- -rw-r--r-- 1 270 users 1671 May 25 2002 configure.ac
- drwxrwxrwx 2 270 users 4096 May 29 2002 contrib
- -rw-r--r-- 1 270 users 17992 May 22 2002 COPYING
- -rwxr-xr-x 1 270 users 12509 May 22 2002 depcomp
- drwxrwxrwx 2 270 users 4096 May 29 2002 doc
- -rw-r--r-- 1 270 users 9414 May 22 2002 INSTALL
- -rwxr-xr-x 1 270 users 5561 May 22 2002 install-sh
- drwxrwxrwx 2 270 users 4096 May 29 2002 intl
- drwxrwxrwx 2 270 users 4096 May 29 2002 m4
- -rw-r--r-- 1 270 users 2497 May 25 2002 Makefile.am
- -rw-r--r-- 1 270 users 15892 May 25 2002 Makefile.in
- drwxrwxrwx 2 270 users 4096 May 29 2002 man
- -rwxr-xr-x 1 270 users 10280 May 22 2002 missing
- -rwxr-xr-x 1 270 users 1858 May 22 2002 mkinstalldirs
- -rw-r--r-- 1 270 users 1999 May 25 2002 NEWS
- drwxrwxrwx 2 270 users 4096 May 29 2002 po
- -rw-r--r-- 1 270 users 777 May 25 2002 README
- drwxrwxrwx 2 270 users 4096 May 29 2002 src
- drwxrwxrwx 2 270 users 4096 May 29 2002 tests
- -rw-r--r-- 1 270 users 765 May 22 2002 THANKS
- -rw-r--r-- 1 270 users 1470 Jun 2 2001 TODO
- root@dell-virtual-machine:~/hello-2.1.0# vi Makefile.
- root@dell-virtual-machine:~/hello-2.1.0# vi Makefile.
- Makefile.am Makefile.in
- root@dell-virtual-machine:~/hello-2.1.0# vi Makefile.
- Makefile.am Makefile.in
- root@dell-virtual-machine:~/hello-2.1.0# vi Makefile.am
- There are a two interesting things that we can see in our Makefile:
- It uses DESTDIR variable to support the DESTDIR convention.
- Dpkg-buildflags is used to get C compiler options (CFLAGS) as well as linker options (LDFLAGS). This complies with the hardening requirements described in Debian documentation.
- On the other hand, if your software has any external dependencies, you would need to install those, so you can compile it successfully. Typically you would be able to install them using apt-get.
- 6. Building the Debian files skeleton
- root@dell-virtual-machine:~/hello-2.1.0# dh_make -f ../hello-2.1.0.tar.gz
- Type of package: single binary, indep binary, multiple binary, library, kernel module, kernel patch?
- [s/i/m/l/k/n] s
- Maintainer name : Ajeet
- Email-Address : Ajeet_Raina@dell.com
- Date : Thu, 29 Oct 2015 23:24:22 -0400
- Package Name : hello
- Version : 2.1.0
- License : blank
- Type of Package : Single
- Hit <enter> to confirm:
- Done. Please edit the files in the debian/ subdirectory now. hello
- uses a configure script, so you probably don't have to edit the Makefiles.
- root@dell-virtual-machine:~/hello-2.1.0# ls
- ABOUT-NLS config.guess contrib install-sh missing tests
- aclocal.m4 config.h.in COPYING intl mkinstalldirs THANKS
- AUTHORS config.rpath debian m4 NEWS TODO
- BUGS config.sub depcomp Makefile.am po
- ChangeLog configure doc Makefile.in README
- ChangeLog.O configure.ac INSTALL man src
- root@dell-virtual-machine:~/hello-2.1.0# cd ..
- root@dell-virtual-machine:~# ls
- Desktop hello-2.1.0 hello_2.1.0.orig.tar.gz hello-2.1.0.tar.gz test123
- root@dell-virtual-machine:~# cd -
- /root/hello-2.1.0
- root@dell-virtual-machine:~/hello-2.1.0# ls
- ABOUT-NLS config.guess contrib install-sh missing tests
- aclocal.m4 config.h.in COPYING intl mkinstalldirs THANKS
- AUTHORS config.rpath debian m4 NEWS TODO
- BUGS config.sub depcomp Makefile.am po
- ChangeLog configure doc Makefile.in README
- ChangeLog.O configure.ac INSTALL man src
- root@dell-virtual-machine:~/hello-2.1.0# cd debian/
- root@dell-virtual-machine:~/hello-2.1.0/debian# ls
- changelog hello.cron.d.ex manpage.1.ex postrm.ex rules
- compat hello.default.ex manpage.sgml.ex preinst.ex source
- control hello.doc-base.EX manpage.xml.ex prerm.ex watch.ex
- copyright info menu.ex README.Debian
- docs init.d.ex postinst.ex README.source
- root@dell-virtual-machine:~/hello-2.1.0/debian# ls -la
- total 116
- drwxr-xr-x 3 root root 4096 Oct 29 23:24 .
- drwxrwxrwx 11 270 users 4096 Oct 29 23:24 ..
- -rw-r--r-- 1 root root 180 Oct 29 23:24 changelog
- -rw-r--r-- 1 root root 2 Oct 29 23:24 compat
- -rw-r--r-- 1 root root 518 Oct 29 23:24 control
- -rw-r--r-- 1 root root 1666 Oct 29 23:24 copyright
- -rw-r--r-- 1 root root 34 Oct 29 23:24 docs
- -rw-r--r-- 1 root root 125 Oct 29 23:24 hello.cron.d.ex
- -rw-r--r-- 1 root root 229 Oct 29 23:24 hello.default.ex
- -rw-r--r-- 1 root root 493 Oct 29 23:24 hello.doc-base.EX
- -rw-r--r-- 1 root root 15 Oct 29 23:24 info
- -rw-r--r-- 1 root root 4574 Oct 29 23:24 init.d.ex
- -rw-r--r-- 1 root root 1620 Oct 29 23:24 manpage.1.ex
- -rw-r--r-- 1 root root 4646 Oct 29 23:24 manpage.sgml.ex
- -rw-r--r-- 1 root root 10999 Oct 29 23:24 manpage.xml.ex
- -rw-r--r-- 1 root root 120 Oct 29 23:24 menu.ex
- -rw-r--r-- 1 root root 955 Oct 29 23:24 postinst.ex
- -rw-r--r-- 1 root root 928 Oct 29 23:24 postrm.ex
- -rw-r--r-- 1 root root 688 Oct 29 23:24 preinst.ex
- -rw-r--r-- 1 root root 875 Oct 29 23:24 prerm.ex
- -rw-r--r-- 1 root root 170 Oct 29 23:24 README.Debian
- -rw-r--r-- 1 root root 255 Oct 29 23:24 README.source
- -rwxr-xr-x 1 root root 135 Oct 29 23:24 rules
- drwxr-xr-x 2 root root 4096 Oct 29 23:24 source
- -rw-r--r-- 1 root root 769 Oct 29 23:24 watch.ex
- As we only want to build a single binary package, I chose that option. Multiple binary package option would in fact, build multiple .deb packages.
- Now we have a new directory, called "debian", with all the necessary Debian files that we need to build our package, including examples. This includes important files like:
- control: includes meta data about the package
- rules: specifies how the package is going to be built
- changelog: history of the debian package
- copyright: copyright information
- As well, some other example files are created by dh_make, that we won't use at this point and can be deleted safely.
- Control FILE:
- The control file has two sections, the first part refers to the source package and the second to the binary one. More information about the different fields can be found in deb-control manual page.
- root@dell-virtual-machine:~/hello-2.1.0/debian# vi control
- Source: hello
- Section: unknown
- Priority: optional
- Maintainer: Ajeet <Ajeet_Raina@dell.com>
- Build-Depends: debhelper (>= 8.0.0), autotools-dev
- Standards-Version: 3.9.4
- Homepage: <insert the upstream URL, if relevant>
- #Vcs-Git: git://git.debian.org/collab-maint/hello.git
- #Vcs-Browser: http://git.debian.org/?p=collab-maint/hello.git;a=summary
- Package: hello
- Architecture: any
- Depends: ${shlibs:Depends}, ${misc:Depends}
- Description: <insert up to 60 chars description>
- <insert long description, indented with spaces>
- The variable ${shlibs:Depends} will be substituted by the shared library dependencies needed to build our binary package. Those are calculated automatically by dh_shlibdeps, one of the tools of the debhelper suite.
- root@dell-virtual-machine:~/hello-2.1.0/debian# rm -f *.e *.EX README.*
- root@dell-virtual-machine:~/hello-2.1.0/debian# ls
- changelog docs init.d.ex menu.ex prerm.ex
- compat hello.cron.d.ex manpage.1.ex postinst.ex rules
- control hello.default.ex manpage.sgml.ex postrm.ex source
- copyright info manpage.xml.ex preinst.ex watch.ex
- root@dell-virtual-machine:~/hello-2.1.0/debian# vi rules
- root@dell-virtual-machine:~/hello-2.1.0/debian# vi control
- Changelog:
- hello (2.1.0-1ubuntu1) UNRELEASED; urgency=medium
- *
- -- Ajeet S Raina <Ajeet_Raina@dell.com> Thu, 29 Oct 2015 23:27:20 -0400
- hello (2.1.0-1) unstable; urgency=low
- * Initial release (Closes: #nnnn) <nnnn is the bug number of your ITP>
- -- Ajeet <Ajeet_Raina@dell.com> Thu, 29 Oct 2015 23:24:22 -0400
- ITP stands for Intend to Package and, for our package to be included in a Debian distribution, the changelog file should close an existing bug. For our example we closed bug #100, this way we won't see lintian warnings requiring for this number later.
- Note: We can use "dch -i" command to edit our changelog file.
- root@dell-virtual-machine:~/hello-2.1.0/debian# cat changelog
- hello (2.1.0-1) unstable; urgency=low
- * Initial release (Closes: #nnnn) <nnnn is the bug number of your ITP>
- -- Ajeet <Ajeet_Raina@dell.com> Thu, 29 Oct 2015 23:24:22 -0400
- root@dell-virtual-machine:~/hello-2.1.0/debian# dch -i
- Addijg
- Select an editor. To change later, run 'select-editor'.
- 1. /bin/ed
- 2. /bin/nano <---- easiest
- 3. /usr/bin/vim.tiny
- Choose 1-3 2
- Choose 1-3 [2]:
- root@dell-virtual-machine:~/hello-2.1.0/debian# cat changelog
- hello (2.1.0-1ubuntu1) UNRELEASED; urgency=medium
- *
- -- Ajeet S Raina <Ajeet_Raina@dell.com> Thu, 29 Oct 2015 23:27:20 -0400
- hello (2.1.0-1) unstable; urgency=low
- * Initial release (Closes: #nnnn) <nnnn is the bug number of your ITP>
- -- Ajeet <Ajeet_Raina@dell.com> Thu, 29 Oct 2015 23:24:22 -0400
- root@dell-virtual-machine:~/hello-2.1.0/debian# cat copyright
- Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
- Upstream-Name: hello
- Source: <url://example.com>
- Files: *
- Copyright: <years> <put author's name and email here>
- <years> <likewise for another author>
- License: <special license>
- <Put the license of the package here indented by 1 space>
- <This follows the format of Description: lines in control file>
- .
- <Including paragraphs>
- # If you want to use GPL v2 or later for the /debian/* files use
- # the following clauses, or change it to suit. Delete these two lines
- Files: debian/*
- Copyright: 2015 Ajeet <Ajeet_Raina@dell.com>
- License: GPL-2+
- This package is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
- .
- This package is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
- .
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>
- .
- On Debian systems, the complete text of the GNU General
- Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
- # Please also look if there are files or directories which have a
- # different copyright/license attached and list them here.
- # Please avoid to pick license terms that are more restrictive than the
- # packaged work, as it may make Debian's contributions unacceptable upstream.
- root@dell-virtual-machine:~/hello-2.1.0/debian# q!
- q!: command not found
- root@dell-virtual-machine:~/hello-2.1.0/debian# cd ..
- Rules files:
- Rules file
- The rules file invokes the original software Makefile script, as well as the debhelper suite of tools (with the prefix "dh_). These tools handle different tasks, including the creation of the .deb file (dh_builddeb).
- #!/usr/bin/make -f
- # -*- makefile -*-
- # Uncomment this to turn on verbose mode.
- #export DH_VERBOSE=1
- %:
- dh $@ --with autotools-dev
- The rules file can be run with different targets: clean (invokes make clean), build (invokes make) and binary (invokes make install). Usage of fakeroot command is recommended so you don't need to build your packages as root
- root@dell-virtual-machine:~/hello-2.1.0# fakeroot debian/rules clean
- dh clean --with autotools-dev
- dh_testdir
- dh_auto_clean
- dh_autotools-dev_restoreconfig
- dh_clean
- root@dell-virtual-machine:~/hello-2.1.0# fakeroot debian/rules build
- dh build --with autotools-dev
- dh_testdir
- dh_autotools-dev_updateconfig
- dh_auto_configure
- checking for a BSD-compatible install... /usr/bin/install -c
- checking whether build environment is sane... yes
- checking for gawk... no
- checking for mawk... mawk
- checking whether make sets ${MAKE}... yes
- checking for gcc... gcc
- checking for C compiler default output... a.out
- checking whether the C compiler works... yes
- checking whether we are cross compiling... no
- checking for suffix of executables...
- checking for suffix of object files... o
- checking whether we are using the GNU C compiler... yes
- checking whether gcc accepts -g... yes
- checking for style of include used by make... GNU
- checking dependency style of gcc... none
- checking for strerror in -lcposix... no
- checking how to run the C preprocessor... gcc -E
- checking for ANSI C header files... yes
- checking for sys/types.h... yes
- checking for sys/stat.h... yes
- checking for stdlib.h... yes
- checking for string.h... yes
- checking for memory.h... yes
- checking for strings.h... yes
- checking for inttypes.h... yes
- checking for stdint.h... yes
- checking for unistd.h... yes
- checking for string.h... (cached) yes
- checking fcntl.h usability... yes
- checking fcntl.h presence... yes
- checking for fcntl.h... yes
- checking sys/file.h usability... yes
- checking sys/file.h presence... yes
- checking for sys/file.h... yes
- checking sys/param.h usability... yes
- checking sys/param.h presence... yes
- checking for sys/param.h... yes
- checking for working alloca.h... yes
- checking for alloca... yes
- checking for struct stat.st_blksize... yes
- checking for msgfmt... /usr/bin/msgfmt
- checking for gmsgfmt... /usr/bin/msgfmt
- checking for xgettext... /usr/bin/xgettext
- checking for msgmerge... /usr/bin/msgmerge
- checking build system type... x86_64-pc-linux-gnu
- checking host system type... x86_64-pc-linux-gnu
- checking for ranlib... ranlib
- checking for gcc option to accept ANSI C... none needed
- checking for an ANSI C-conforming const... yes
- checking for inline... inline
- checking for off_t... yes
- checking for size_t... yes
- checking for stdlib.h... (cached) yes
- checking for unistd.h... (cached) yes
- checking for getpagesize... yes
- checking for working mmap... yes
- checking whether we are using the GNU C Library 2.1 or newer... yes
- checking for ld used by GCC... /usr/bin/ld
- checking if the linker (/usr/bin/ld) is GNU ld... yes
- checking for shared library run path origin... done
- checking for iconv... yes
- checking argz.h usability... yes
- checking argz.h presence... yes
- checking for argz.h... yes
- checking limits.h usability... yes
- checking limits.h presence... yes
- checking for limits.h... yes
- checking locale.h usability... yes
- checking locale.h presence... yes
- checking for locale.h... yes
- checking nl_types.h usability... yes
- checking nl_types.h presence... yes
- checking for nl_types.h... yes
- checking malloc.h usability... yes
- checking malloc.h presence... yes
- checking for malloc.h... yes
- checking stddef.h usability... yes
- checking stddef.h presence... yes
- checking for stddef.h... yes
- checking for stdlib.h... (cached) yes
- checking for string.h... (cached) yes
- checking for unistd.h... (cached) yes
- checking for sys/param.h... (cached) yes
- checking for feof_unlocked... yes
- checking for fgets_unlocked... yes
- checking for getc_unlocked... yes
- checking for getcwd... yes
- checking for getegid... yes
- checking for geteuid... yes
- checking for getgid... yes
- checking for getuid... yes
- checking for mempcpy... yes
- checking for munmap... yes
- checking for putenv... yes
- checking for setenv... yes
- checking for setlocale... yes
- checking for stpcpy... yes
- checking for strcasecmp... yes
- checking for strdup... yes
- checking for strtoul... yes
- checking for tsearch... yes
- checking for __argz_count... yes
- checking for __argz_stringify... yes
- checking for __argz_next... yes
- checking for iconv declaration...
- extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
- checking for nl_langinfo and CODESET... yes
- checking for LC_MESSAGES... yes
- checking for bison... no
- checking whether NLS is requested... yes
- checking whether included gettext is requested... no
- checking for GNU gettext in libc... yes
- checking for perl... perl
- configure: creating ./config.status
- config.status: creating Makefile
- config.status: creating contrib/Makefile
- config.status: creating doc/Makefile
- config.status: creating intl/Makefile
- config.status: creating man/Makefile
- config.status: creating po/Makefile.in
- config.status: creating m4/Makefile
- config.status: creating src/Makefile
- config.status: creating tests/Makefile
- config.status: creating config.h
- config.status: executing depfiles commands
- config.status: executing default-1 commands
- config.status: creating po/POTFILES
- config.status: creating po/Makefile
- config.status: executing default commands
- dh_auto_build
- make[1]: Entering directory `/root/hello-2.1.0'
- make all-recursive
- make[2]: Entering directory `/root/hello-2.1.0'
- Making all in contrib
- make[3]: Entering directory `/root/hello-2.1.0/contrib'
- make[3]: Nothing to be done for `all'.
- make[3]: Leaving directory `/root/hello-2.1.0/contrib'
- Making all in doc
- make[3]: Entering directory `/root/hello-2.1.0/doc'
- make[3]: Nothing to be done for `all'.
- make[3]: Leaving directory `/root/hello-2.1.0/doc'
- Making all in intl
- make[3]: Entering directory `/root/hello-2.1.0/intl'
- make[3]: Nothing to be done for `all'.
- make[3]: Leaving directory `/root/hello-2.1.0/intl'
- Making all in po
- make[3]: Entering directory `/root/hello-2.1.0/po'
- make[3]: Nothing to be done for `all'.
- make[3]: Leaving directory `/root/hello-2.1.0/po'
- Making all in src
- make[3]: Entering directory `/root/hello-2.1.0/src'
- gcc -DLOCALEDIR=\"/usr/share/locale\" -DHAVE_CONFIG_H -I. -I. -I.. -I. -I. -I.. -I../intl -I../intl -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -c `test -f 'hello.c' || echo './'`hello.c
- gcc -DLOCALEDIR=\"/usr/share/locale\" -DHAVE_CONFIG_H -I. -I. -I.. -I. -I. -I.. -I../intl -I../intl -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -c `test -f 'version.c' || echo './'`version.c
- gcc -DLOCALEDIR=\"/usr/share/locale\" -DHAVE_CONFIG_H -I. -I. -I.. -I. -I. -I.. -I../intl -I../intl -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -c `test -f 'getopt.c' || echo './'`getopt.c
- gcc -DLOCALEDIR=\"/usr/share/locale\" -DHAVE_CONFIG_H -I. -I. -I.. -I. -I. -I.. -I../intl -I../intl -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -c `test -f 'getopt1.c' || echo './'`getopt1.c
- gcc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -o hello hello.o version.o getopt.o getopt1.o
- make[3]: Leaving directory `/root/hello-2.1.0/src'
- Making all in man
- make[3]: Entering directory `/root/hello-2.1.0/man'
- perl help2man --name="Friendly Greeting Program" ../src/hello >hello.1
- make[3]: Leaving directory `/root/hello-2.1.0/man'
- Making all in m4
- make[3]: Entering directory `/root/hello-2.1.0/m4'
- make[3]: Nothing to be done for `all'.
- make[3]: Leaving directory `/root/hello-2.1.0/m4'
- Making all in tests
- make[3]: Entering directory `/root/hello-2.1.0/tests'
- make[3]: Nothing to be done for `all'.
- make[3]: Leaving directory `/root/hello-2.1.0/tests'
- make[3]: Entering directory `/root/hello-2.1.0'
- make[3]: Leaving directory `/root/hello-2.1.0'
- make[2]: Leaving directory `/root/hello-2.1.0'
- make[1]: Leaving directory `/root/hello-2.1.0'
- dh_auto_test
- make[1]: Entering directory `/root/hello-2.1.0'
- Making check in contrib
- make[2]: Entering directory `/root/hello-2.1.0/contrib'
- make[2]: Nothing to be done for `check'.
- make[2]: Leaving directory `/root/hello-2.1.0/contrib'
- Making check in doc
- make[2]: Entering directory `/root/hello-2.1.0/doc'
- make[2]: Nothing to be done for `check'.
- make[2]: Leaving directory `/root/hello-2.1.0/doc'
- Making check in intl
- make[2]: Entering directory `/root/hello-2.1.0/intl'
- make[2]: Nothing to be done for `check'.
- make[2]: Leaving directory `/root/hello-2.1.0/intl'
- Making check in po
- make[2]: Entering directory `/root/hello-2.1.0/po'
- make[2]: Nothing to be done for `check'.
- make[2]: Leaving directory `/root/hello-2.1.0/po'
- Making check in src
- make[2]: Entering directory `/root/hello-2.1.0/src'
- make[2]: Nothing to be done for `check'.
- make[2]: Leaving directory `/root/hello-2.1.0/src'
- Making check in man
- make[2]: Entering directory `/root/hello-2.1.0/man'
- make[2]: Nothing to be done for `check'.
- make[2]: Leaving directory `/root/hello-2.1.0/man'
- Making check in m4
- make[2]: Entering directory `/root/hello-2.1.0/m4'
- make[2]: Nothing to be done for `check'.
- make[2]: Leaving directory `/root/hello-2.1.0/m4'
- Making check in tests
- make[2]: Entering directory `/root/hello-2.1.0/tests'
- make check-TESTS
- make[3]: Entering directory `/root/hello-2.1.0/tests'
- PASS: hello-1
- PASS: world-1
- PASS: nothing-1
- ==================
- All 3 tests passed
- ==================
- make[3]: Leaving directory `/root/hello-2.1.0/tests'
- make[2]: Leaving directory `/root/hello-2.1.0/tests'
- make[2]: Entering directory `/root/hello-2.1.0'
- make[2]: Leaving directory `/root/hello-2.1.0'
- make[1]: Leaving directory `/root/hello-2.1.0'
- root@dell-virtual-machine:~/hello-2.1.0# ls
- ABOUT-NLS config.h.in COPYING Makefile.am stamp-h
- aclocal.m4 config.log debian Makefile.in stamp-h1
- AUTHORS config.rpath depcomp man tests
- BUGS config.status doc missing THANKS
- ChangeLog config.sub INSTALL mkinstalldirs TODO
- ChangeLog.O config.sub.dh-orig install-sh NEWS
- config.guess configure intl po
- config.guess.dh-orig configure.ac m4 README
- config.h contrib Makefile src
- root@dell-virtual-machine:~/hello-2.1.0# fakeroot debian/rules binary
- dh binary --with autotools-dev
- dh_testroot
- dh_prep
- dh_auto_install
- make[1]: Entering directory `/root/hello-2.1.0'
- Making install in contrib
- make[2]: Entering directory `/root/hello-2.1.0/contrib'
- make[3]: Entering directory `/root/hello-2.1.0/contrib'
- make[3]: Nothing to be done for `install-exec-am'.
- make[3]: Nothing to be done for `install-data-am'.
- make[3]: Leaving directory `/root/hello-2.1.0/contrib'
- make[2]: Leaving directory `/root/hello-2.1.0/contrib'
- Making install in doc
- make[2]: Entering directory `/root/hello-2.1.0/doc'
- make[3]: Entering directory `/root/hello-2.1.0/doc'
- make[3]: Nothing to be done for `install-exec-am'.
- /bin/bash ../mkinstalldirs /root/hello-2.1.0/debian/hello/usr/share/info
- mkdir -p -- /root/hello-2.1.0/debian/hello/usr/share/info
- /usr/bin/install -c -m 644 ./hello.info /root/hello-2.1.0/debian/hello/usr/share/info/hello.info
- install-info --info-dir=/root/hello-2.1.0/debian/hello/usr/share/info /root/hello-2.1.0/debian/hello/usr/share/info/hello.info
- This is not dpkg install-info anymore, but GNU install-info
- See the man page for ginstall-info for command line arguments
- make[3]: Leaving directory `/root/hello-2.1.0/doc'
- make[2]: Leaving directory `/root/hello-2.1.0/doc'
- Making install in intl
- make[2]: Entering directory `/root/hello-2.1.0/intl'
- if test "hello" = "gettext" \
- && test '' = 'intl-compat.o'; then \
- /bin/sh `case "./mkinstalldirs" in /*) echo "./mkinstalldirs" ;; *) echo ".././mkinstalldirs" ;; esac` /root/hello-2.1.0/debian/hello/usr/lib/x86_64-linux-gnu /root/hello-2.1.0/debian/hello/usr/include; \
- /usr/bin/install -c -m 644 libintl.h /root/hello-2.1.0/debian/hello/usr/include/libintl.h; \
- @LIBTOOL@ --mode=install \
- /usr/bin/install -c -m 644 libintl.a /root/hello-2.1.0/debian/hello/usr/lib/x86_64-linux-gnu/libintl.a; \
- else \
- : ; \
- fi
- if test 'no' = yes; then \
- test yes != no || /bin/sh `case "./mkinstalldirs" in /*) echo "./mkinstalldirs" ;; *) echo ".././mkinstalldirs" ;; esac` /root/hello-2.1.0/debian/hello/usr/lib/x86_64-linux-gnu; \
- temp=/root/hello-2.1.0/debian/hello/usr/lib/x86_64-linux-gnu/t-charset.alias; \
- dest=/root/hello-2.1.0/debian/hello/usr/lib/x86_64-linux-gnu/charset.alias; \
- if test -f /root/hello-2.1.0/debian/hello/usr/lib/x86_64-linux-gnu/charset.alias; then \
- orig=/root/hello-2.1.0/debian/hello/usr/lib/x86_64-linux-gnu/charset.alias; \
- sed -f ref-add.sed $orig > $temp; \
- /usr/bin/install -c -m 644 $temp $dest; \
- rm -f $temp; \
- else \
- if test yes = no; then \
- orig=charset.alias; \
- sed -f ref-add.sed $orig > $temp; \
- /usr/bin/install -c -m 644 $temp $dest; \
- rm -f $temp; \
- fi; \
- fi; \
- /bin/sh `case "./mkinstalldirs" in /*) echo "./mkinstalldirs" ;; *) echo ".././mkinstalldirs" ;; esac` /root/hello-2.1.0/debian/hello/usr/share/locale; \
- test -f /root/hello-2.1.0/debian/hello/usr/share/locale/locale.alias \
- && orig=/root/hello-2.1.0/debian/hello/usr/share/locale/locale.alias \
- || orig=./locale.alias; \
- temp=/root/hello-2.1.0/debian/hello/usr/share/locale/t-locale.alias; \
- dest=/root/hello-2.1.0/debian/hello/usr/share/locale/locale.alias; \
- sed -f ref-add.sed $orig > $temp; \
- /usr/bin/install -c -m 644 $temp $dest; \
- rm -f $temp; \
- else \
- : ; \
- fi
- if test "hello" = "gettext"; then \
- /bin/sh `case "./mkinstalldirs" in /*) echo "./mkinstalldirs" ;; *) echo ".././mkinstalldirs" ;; esac` /root/hello-2.1.0/debian/hello/usr/share/gettext/intl; \
- /usr/bin/install -c -m 644 VERSION /root/hello-2.1.0/debian/hello/usr/share/gettext/intl/VERSION; \
- /usr/bin/install -c -m 644 ChangeLog.inst /root/hello-2.1.0/debian/hello/usr/share/gettext/intl/ChangeLog; \
- dists="COPYING.LIB-2.0 COPYING.LIB-2.1 Makefile.in config.charset locale.alias ref-add.sin ref-del.sin gmo.h gettextP.h hash-string.h plural-exp.h eval-plural.h os2compat.h libgnuintl.h loadinfo.h bindtextdom.c dcgettext.c dgettext.c gettext.c finddomain.c loadmsgcat.c localealias.c textdomain.c l10nflist.c explodename.c dcigettext.c dcngettext.c dngettext.c ngettext.c plural.y plural-exp.c localcharset.c localename.c osdep.c os2compat.c intl-compat.c"; \
- for file in $dists; do \
- /usr/bin/install -c -m 644 ./$file \
- /root/hello-2.1.0/debian/hello/usr/share/gettext/intl/$file; \
- done; \
- chmod a+x /root/hello-2.1.0/debian/hello/usr/share/gettext/intl/config.charset; \
- dists="plural.c"; \
- for file in $dists; do \
- if test -f $file; then dir=.; else dir=.; fi; \
- /usr/bin/install -c -m 644 $dir/$file \
- /root/hello-2.1.0/debian/hello/usr/share/gettext/intl/$file; \
- done; \
- dists="xopen-msg.sed linux-msg.sed po2tbl.sed.in cat-compat.c COPYING.LIB-2 gettext.h libgettext.h plural-eval.c"; \
- for file in $dists; do \
- rm -f /root/hello-2.1.0/debian/hello/usr/share/gettext/intl/$file; \
- done; \
- else \
- : ; \
- fi
- make[2]: Leaving directory `/root/hello-2.1.0/intl'
- Making install in po
- make[2]: Entering directory `/root/hello-2.1.0/po'
- /bin/sh `case "./mkinstalldirs" in /*) echo "./mkinstalldirs" ;; *) echo ".././mkinstalldirs" ;; esac` /root/hello-2.1.0/debian/hello/usr/share
- mkdir -p -- /root/hello-2.1.0/debian/hello/usr/share/locale/ca/LC_MESSAGES
- installing ca.gmo as /root/hello-2.1.0/debian/hello/usr/share/locale/ca/LC_MESSAGES/hello.mo
- mkdir -p -- /root/hello-2.1.0/debian/hello/usr/share/locale/da/LC_MESSAGES
- installing da.gmo as /root/hello-2.1.0/debian/hello/usr/share/locale/da/LC_MESSAGES/hello.mo
- mkdir -p -- /root/hello-2.1.0/debian/hello/usr/share/locale/de/LC_MESSAGES
- installing de.gmo as /root/hello-2.1.0/debian/hello/usr/share/locale/de/LC_MESSAGES/hello.mo
- mkdir -p -- /root/hello-2.1.0/debian/hello/usr/share/locale/de_DE/LC_MESSAGES
- installing de_DE.gmo as /root/hello-2.1.0/debian/hello/usr/share/locale/de_DE/LC_MESSAGES/hello.mo
- mkdir -p -- /root/hello-2.1.0/debian/hello/usr/share/locale/el/LC_MESSAGES
- installing el.gmo as /root/hello-2.1.0/debian/hello/usr/share/locale/el/LC_MESSAGES/hello.mo
- mkdir -p -- /root/hello-2.1.0/debian/hello/usr/share/locale/eo/LC_MESSAGES
- installing eo.gmo as /root/hello-2.1.0/debian/hello/usr/share/locale/eo/LC_MESSAGES/hello.mo
- mkdir -p -- /root/hello-2.1.0/debian/hello/usr/share/locale/es/LC_MESSAGES
- installing es.gmo as /root/hello-2.1.0/debian/hello/usr/share/locale/es/LC_MESSAGES/hello.mo
- mkdir -p -- /root/hello-2.1.0/debian/hello/usr/share/locale/et/LC_MESSAGES
- installing et.gmo as /root/hello-2.1.0/debian/hello/usr/share/locale/et/LC_MESSAGES/hello.mo
- mkdir -p -- /root/hello-2.1.0/debian/hello/usr/share/locale/fi/LC_MESSAGES
- installing fi.gmo as /root/hello-2.1.0/debian/hello/usr/share/locale/fi/LC_MESSAGES/hello.mo
- mkdir -p -- /root/hello-2.1.0/debian/hello/usr/share/locale/fr/LC_MESSAGES
- installing fr.gmo as /root/hello-2.1.0/debian/hello/usr/share/locale/fr/LC_MESSAGES/hello.mo
- mkdir -p -- /root/hello-2.1.0/debian/hello/usr/share/locale/gl/LC_MESSAGES
- installing gl.gmo as /root/hello-2.1.0/debian/hello/usr/share/locale/gl/LC_MESSAGES/hello.mo
- mkdir -p -- /root/hello-2.1.0/debian/hello/usr/share/locale/he/LC_MESSAGES
- installing he.gmo as /root/hello-2.1.0/debian/hello/usr/share/locale/he/LC_MESSAGES/hello.mo
- mkdir -p -- /root/hello-2.1.0/debian/hello/usr/share/locale/hr/LC_MESSAGES
- installing hr.gmo as /root/hello-2.1.0/debian/hello/usr/share/locale/hr/LC_MESSAGES/hello.mo
- mkdir -p -- /root/hello-2.1.0/debian/hello/usr/share/locale/hu/LC_MESSAGES
- installing hu.gmo as /root/hello-2.1.0/debian/hello/usr/share/locale/hu/LC_MESSAGES/hello.mo
- mkdir -p -- /root/hello-2.1.0/debian/hello/usr/share/locale/id/LC_MESSAGES
- installing id.gmo as /root/hello-2.1.0/debian/hello/usr/share/locale/id/LC_MESSAGES/hello.mo
- mkdir -p -- /root/hello-2.1.0/debian/hello/usr/share/locale/it/LC_MESSAGES
- installing it.gmo as /root/hello-2.1.0/debian/hello/usr/share/locale/it/LC_MESSAGES/hello.mo
- mkdir -p -- /root/hello-2.1.0/debian/hello/usr/share/locale/ja/LC_MESSAGES
- installing ja.gmo as /root/hello-2.1.0/debian/hello/usr/share/locale/ja/LC_MESSAGES/hello.mo
- mkdir -p -- /root/hello-2.1.0/debian/hello/usr/share/locale/ko/LC_MESSAGES
- installing ko.gmo as /root/hello-2.1.0/debian/hello/usr/share/locale/ko/LC_MESSAGES/hello.mo
- mkdir -p -- /root/hello-2.1.0/debian/hello/usr/share/locale/lv/LC_MESSAGES
- installing lv.gmo as /root/hello-2.1.0/debian/hello/usr/share/locale/lv/LC_MESSAGES/hello.mo
- mkdir -p -- /root/hello-2.1.0/debian/hello/usr/share/locale/nb/LC_MESSAGES
- installing nb.gmo as /root/hello-2.1.0/debian/hello/usr/share/locale/nb/LC_MESSAGES/hello.mo
- mkdir -p -- /root/hello-2.1.0/debian/hello/usr/share/locale/nl/LC_MESSAGES
- installing nl.gmo as /root/hello-2.1.0/debian/hello/usr/share/locale/nl/LC_MESSAGES/hello.mo
- mkdir -p -- /root/hello-2.1.0/debian/hello/usr/share/locale/nn/LC_MESSAGES
- installing nn.gmo as /root/hello-2.1.0/debian/hello/usr/share/locale/nn/LC_MESSAGES/hello.mo
- mkdir -p -- /root/hello-2.1.0/debian/hello/usr/share/locale/pl/LC_MESSAGES
- installing pl.gmo as /root/hello-2.1.0/debian/hello/usr/share/locale/pl/LC_MESSAGES/hello.mo
- mkdir -p -- /root/hello-2.1.0/debian/hello/usr/share/locale/pt/LC_MESSAGES
- installing pt.gmo as /root/hello-2.1.0/debian/hello/usr/share/locale/pt/LC_MESSAGES/hello.mo
- mkdir -p -- /root/hello-2.1.0/debian/hello/usr/share/locale/pt_BR/LC_MESSAGES
- installing pt_BR.gmo as /root/hello-2.1.0/debian/hello/usr/share/locale/pt_BR/LC_MESSAGES/hello.mo
- mkdir -p -- /root/hello-2.1.0/debian/hello/usr/share/locale/ru/LC_MESSAGES
- installing ru.gmo as /root/hello-2.1.0/debian/hello/usr/share/locale/ru/LC_MESSAGES/hello.mo
- mkdir -p -- /root/hello-2.1.0/debian/hello/usr/share/locale/sk/LC_MESSAGES
- installing sk.gmo as /root/hello-2.1.0/debian/hello/usr/share/locale/sk/LC_MESSAGES/hello.mo
- mkdir -p -- /root/hello-2.1.0/debian/hello/usr/share/locale/sl/LC_MESSAGES
- installing sl.gmo as /root/hello-2.1.0/debian/hello/usr/share/locale/sl/LC_MESSAGES/hello.mo
- mkdir -p -- /root/hello-2.1.0/debian/hello/usr/share/locale/sv/LC_MESSAGES
- installing sv.gmo as /root/hello-2.1.0/debian/hello/usr/share/locale/sv/LC_MESSAGES/hello.mo
- mkdir -p -- /root/hello-2.1.0/debian/hello/usr/share/locale/tr/LC_MESSAGES
- installing tr.gmo as /root/hello-2.1.0/debian/hello/usr/share/locale/tr/LC_MESSAGES/hello.mo
- mkdir -p -- /root/hello-2.1.0/debian/hello/usr/share/locale/uk/LC_MESSAGES
- installing uk.gmo as /root/hello-2.1.0/debian/hello/usr/share/locale/uk/LC_MESSAGES/hello.mo
- if test "hello" = "gettext"; then \
- /bin/sh `case "./mkinstalldirs" in /*) echo "./mkinstalldirs" ;; *) echo ".././mkinstalldirs" ;; esac` /root/hello-2.1.0/debian/hello/usr/share/gettext/po; \
- for file in Makefile.in.in Makevars remove-potcdate.sin quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot ; do \
- /usr/bin/install -c -m 644 ./$file \
- /root/hello-2.1.0/debian/hello/usr/share/gettext/po/$file; \
- done; \
- else \
- : ; \
- fi
- make[2]: Leaving directory `/root/hello-2.1.0/po'
- Making install in src
- make[2]: Entering directory `/root/hello-2.1.0/src'
- make[3]: Entering directory `/root/hello-2.1.0/src'
- /bin/bash ../mkinstalldirs /root/hello-2.1.0/debian/hello/usr/bin
- mkdir -p -- /root/hello-2.1.0/debian/hello/usr/bin
- /usr/bin/install -c hello /root/hello-2.1.0/debian/hello/usr/bin/hello
- make[3]: Nothing to be done for `install-data-am'.
- make[3]: Leaving directory `/root/hello-2.1.0/src'
- make[2]: Leaving directory `/root/hello-2.1.0/src'
- Making install in man
- make[2]: Entering directory `/root/hello-2.1.0/man'
- make[3]: Entering directory `/root/hello-2.1.0/man'
- make[3]: Nothing to be done for `install-exec-am'.
- /bin/bash ../mkinstalldirs /root/hello-2.1.0/debian/hello/usr/share/man/man1
- mkdir -p -- /root/hello-2.1.0/debian/hello/usr/share/man/man1
- /usr/bin/install -c -m 644 ./hello.1 /root/hello-2.1.0/debian/hello/usr/share/man/man1/hello.1
- make[3]: Leaving directory `/root/hello-2.1.0/man'
- make[2]: Leaving directory `/root/hello-2.1.0/man'
- Making install in m4
- make[2]: Entering directory `/root/hello-2.1.0/m4'
- make[3]: Entering directory `/root/hello-2.1.0/m4'
- make[3]: Nothing to be done for `install-exec-am'.
- make[3]: Nothing to be done for `install-data-am'.
- make[3]: Leaving directory `/root/hello-2.1.0/m4'
- make[2]: Leaving directory `/root/hello-2.1.0/m4'
- Making install in tests
- make[2]: Entering directory `/root/hello-2.1.0/tests'
- make[3]: Entering directory `/root/hello-2.1.0/tests'
- make[3]: Nothing to be done for `install-exec-am'.
- make[3]: Nothing to be done for `install-data-am'.
- make[3]: Leaving directory `/root/hello-2.1.0/tests'
- make[2]: Leaving directory `/root/hello-2.1.0/tests'
- make[2]: Entering directory `/root/hello-2.1.0'
- make[3]: Entering directory `/root/hello-2.1.0'
- make[3]: Nothing to be done for `install-exec-am'.
- make[3]: Nothing to be done for `install-data-am'.
- make[3]: Leaving directory `/root/hello-2.1.0'
- make[2]: Leaving directory `/root/hello-2.1.0'
- make[1]: Leaving directory `/root/hello-2.1.0'
- dh_installdocs
- dh_installchangelogs
- dh_installman
- dh_installinfo
- dh_perl
- dh_link
- dh_compress
- dh_fixperms
- dh_strip
- dh_makeshlibs
- dh_shlibdeps
- dh_installdeb
- dh_gencontrol
- dh_md5sums
- dh_builddeb
- dpkg-deb: building package `hello' in `../hello_2.1.0-1ubuntu1_amd64.deb'.
- root@dell-virtual-machine:~/hello-2.1.0# ls
- ABOUT-NLS config.h.in COPYING Makefile.am stamp-h
- aclocal.m4 config.log debian Makefile.in stamp-h1
- AUTHORS config.rpath depcomp man tests
- BUGS config.status doc missing THANKS
- ChangeLog config.sub INSTALL mkinstalldirs TODO
- ChangeLog.O config.sub.dh-orig install-sh NEWS
- config.guess configure intl po
- config.guess.dh-orig configure.ac m4 README
- config.h contrib Makefile src
- root@dell-virtual-machine:~/hello-2.1.0# cd ..
- root@dell-virtual-machine:~# ls
- Desktop hello_2.1.0-1ubuntu1_amd64.deb hello-2.1.0.tar.gz
- hello-2.1.0 hello_2.1.0.orig.tar.gz test123
- root@dell-virtual-machine:~# dpkg -i hello_2.1.0-1ubuntu1_amd64.deb
- Selecting previously unselected package hello.
- (Reading database ... 176742 files and directories currently installed.)
- Preparing to unpack hello_2.1.0-1ubuntu1_amd64.deb ...
- Unpacking hello (2.1.0-1ubuntu1) ...
- Setting up hello (2.1.0-1ubuntu1) ...
- Processing triggers for install-info (5.2.0.dfsg.1-2) ...
- Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
- root@dell-virtual-machine:~# hel
- hello help helpztags
- root@dell-virtual-machine:~# hel
- hello help helpztags
- root@dell-virtual-machine:~# hello
- Hello, world!
- root@dell-virtual-machine:~#
- At this point we have already our .deb file created!. We can see the shared libraries needed to build our program (in this case libc6, because of the stdio.h include) listed in our debian/hello.substvars file:
- root@dell-virtual-machine:~/hello-2.1.0/debian# cat hello.substvars
- shlibs:Depends=libc6 (>= 2.3.4)
- misc:Depends=
- Inspecting package contents:
- root@dell-virtual-machine:~/hello-2.1.0# find debian/hello
- debian/hello
- debian/hello/usr
- debian/hello/usr/bin
- debian/hello/usr/bin/hello
- debian/hello/usr/share
- debian/hello/usr/share/doc
- debian/hello/usr/share/doc/hello
- debian/hello/usr/share/doc/hello/README
- debian/hello/usr/share/doc/hello/NEWS.gz
- debian/hello/usr/share/doc/hello/TODO
- debian/hello/usr/share/doc/hello/copyright
- debian/hello/usr/share/doc/hello/ChangeLog.O.gz
- debian/hello/usr/share/doc/hello/BUGS
- debian/hello/usr/share/doc/hello/changelog.Debian.gz
- debian/hello/usr/share/locale
- debian/hello/usr/share/locale/tr
- debian/hello/usr/share/locale/tr/LC_MESSAGES
- debian/hello/usr/share/locale/tr/LC_MESSAGES/hello.mo
- debian/hello/usr/share/locale/ru
- debian/hello/usr/share/locale/ru/LC_MESSAGES
- debian/hello/usr/share/locale/ru/LC_MESSAGES/hello.mo
- debian/hello/usr/share/locale/fr
- debian/hello/usr/share/locale/fr/LC_MESSAGES
- debian/hello/usr/share/locale/fr/LC_MESSAGES/hello.mo
- debian/hello/usr/share/locale/hr
- debian/hello/usr/share/locale/hr/LC_MESSAGES
- debian/hello/usr/share/locale/hr/LC_MESSAGES/hello.mo
- debian/hello/usr/share/locale/nb
- debian/hello/usr/share/locale/nb/LC_MESSAGES
- debian/hello/usr/share/locale/nb/LC_MESSAGES/hello.mo
- debian/hello/usr/share/locale/ja
- debian/hello/usr/share/locale/ja/LC_MESSAGES
- debian/hello/usr/share/locale/ja/LC_MESSAGES/hello.mo
- debian/hello/usr/share/locale/fi
- debian/hello/usr/share/locale/fi/LC_MESSAGES
- debian/hello/usr/share/locale/fi/LC_MESSAGES/hello.mo
- debian/hello/usr/share/locale/hu
- debian/hello/usr/share/locale/hu/LC_MESSAGES
- debian/hello/usr/share/locale/hu/LC_MESSAGES/hello.mo
- debian/hello/usr/share/locale/es
- debian/hello/usr/share/locale/es/LC_MESSAGES
- debian/hello/usr/share/locale/es/LC_MESSAGES/hello.mo
- debian/hello/usr/share/locale/da
- debian/hello/usr/share/locale/da/LC_MESSAGES
- debian/hello/usr/share/locale/da/LC_MESSAGES/hello.mo
- debian/hello/usr/share/locale/he
- debian/hello/usr/share/locale/he/LC_MESSAGES
- debian/hello/usr/share/locale/he/LC_MESSAGES/hello.mo
- debian/hello/usr/share/locale/ca
- debian/hello/usr/share/locale/ca/LC_MESSAGES
- debian/hello/usr/share/locale/ca/LC_MESSAGES/hello.mo
- debian/hello/usr/share/locale/pt_BR
- debian/hello/usr/share/locale/pt_BR/LC_MESSAGES
- debian/hello/usr/share/locale/pt_BR/LC_MESSAGES/hello.mo
- debian/hello/usr/share/locale/de
- debian/hello/usr/share/locale/de/LC_MESSAGES
- debian/hello/usr/share/locale/de/LC_MESSAGES/hello.mo
- debian/hello/usr/share/locale/eo
- debian/hello/usr/share/locale/eo/LC_MESSAGES
- debian/hello/usr/share/locale/eo/LC_MESSAGES/hello.mo
- debian/hello/usr/share/locale/pt
- debian/hello/usr/share/locale/pt/LC_MESSAGES
- debian/hello/usr/share/locale/pt/LC_MESSAGES/hello.mo
- debian/hello/usr/share/locale/it
- debian/hello/usr/share/locale/it/LC_MESSAGES
- debian/hello/usr/share/locale/it/LC_MESSAGES/hello.mo
- debian/hello/usr/share/locale/de_DE
- debian/hello/usr/share/locale/de_DE/LC_MESSAGES
- debian/hello/usr/share/locale/de_DE/LC_MESSAGES/hello.mo
- debian/hello/usr/share/locale/sv
- debian/hello/usr/share/locale/sv/LC_MESSAGES
- debian/hello/usr/share/locale/sv/LC_MESSAGES/hello.mo
- debian/hello/usr/share/locale/sl
- debian/hello/usr/share/locale/sl/LC_MESSAGES
- debian/hello/usr/share/locale/sl/LC_MESSAGES/hello.mo
- debian/hello/usr/share/locale/sk
- debian/hello/usr/share/locale/sk/LC_MESSAGES
- debian/hello/usr/share/locale/sk/LC_MESSAGES/hello.mo
- debian/hello/usr/share/locale/id
- debian/hello/usr/share/locale/id/LC_MESSAGES
- debian/hello/usr/share/locale/id/LC_MESSAGES/hello.mo
- debian/hello/usr/share/locale/uk
- debian/hello/usr/share/locale/uk/LC_MESSAGES
- debian/hello/usr/share/locale/uk/LC_MESSAGES/hello.mo
- debian/hello/usr/share/locale/nl
- debian/hello/usr/share/locale/nl/LC_MESSAGES
- debian/hello/usr/share/locale/nl/LC_MESSAGES/hello.mo
- debian/hello/usr/share/locale/gl
- debian/hello/usr/share/locale/gl/LC_MESSAGES
- debian/hello/usr/share/locale/gl/LC_MESSAGES/hello.mo
- debian/hello/usr/share/locale/el
- debian/hello/usr/share/locale/el/LC_MESSAGES
- debian/hello/usr/share/locale/el/LC_MESSAGES/hello.mo
- debian/hello/usr/share/locale/nn
- debian/hello/usr/share/locale/nn/LC_MESSAGES
- debian/hello/usr/share/locale/nn/LC_MESSAGES/hello.mo
- debian/hello/usr/share/locale/et
- debian/hello/usr/share/locale/et/LC_MESSAGES
- debian/hello/usr/share/locale/et/LC_MESSAGES/hello.mo
- debian/hello/usr/share/locale/ko
- debian/hello/usr/share/locale/ko/LC_MESSAGES
- debian/hello/usr/share/locale/ko/LC_MESSAGES/hello.mo
- debian/hello/usr/share/locale/pl
- debian/hello/usr/share/locale/pl/LC_MESSAGES
- debian/hello/usr/share/locale/pl/LC_MESSAGES/hello.mo
- debian/hello/usr/share/locale/lv
- debian/hello/usr/share/locale/lv/LC_MESSAGES
- debian/hello/usr/share/locale/lv/LC_MESSAGES/hello.mo
- debian/hello/usr/share/info
- debian/hello/usr/share/info/dir.gz
- debian/hello/usr/share/info/hello.info.gz
- debian/hello/usr/share/man
- debian/hello/usr/share/man/man1
- debian/hello/usr/share/man/man1/hello.1.gz
- debian/hello/DEBIAN
- debian/hello/DEBIAN/control
- debian/hello/DEBIAN/md5sums
- root@dell-virtual-machine:~/hello-2.1.0#
- Package maintenance scripts
- It is possible to supply scripts that will run when the package is installed, upgraded or removed. These scripts are the control information files: preinst, postinst, prerm, postrm. And in some cases, may prompt the user if necessary, typically through a program such as debconf. More information on how to create this scripts can be found at the Debian Policy Manual.
- <TBD>
- Debuild:
- As mentioned before, we can use debuild to build the Debian binary and source packages, check it with lintian, and sign it with debsign. We can use "debuild -us -uc" to build the packages without signing the .changes file. More information can be found with "man debuild
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement