mkdir ~/build
cd ~/build
gpg --gen-key
gpg -a --output ~/.gnupg/john_doe.gpg --export 'John Doe'
sudo apt-get install build-essential autoconf automake autotools-dev dh-make debhelper devscripts fakeroot xutils lintian pbuilder
bzr co --lightweight -v bzr://bzr.savannah.gnu.org/emacs/trunk emacs-24.0.92
emacs-24.0.92
- must be chosen in accordance with the naming requirements for the directory containing the source codes for the .deb package: packagename-packageversion
in lower case. You can check the version number of the program in the trunk by looking at the README
here: http://bzr.savannah.gnu.org/lh/emacs/trunk/files .configure
script. Run to generate it:cd emacs-24.0.92
./autogen.sh
tar -czvf ../emacs-24.0.92.tgz ../emacs-24.0.92/
dh_make -p emacs -e john.doe@gmail.com -c gpl3 -f ../emacs-24.0.92.tgz
Type of package: single binary, indep binary, multiple binary, library, kernel module, kernel patch?
debian
directory will be created (I always write the names of the files and directories relative to the current directory), which contains the files controlling the build of the package. We'll move on to editing them a bit later, but for now we’ll find out what needs to be written there as necessary packages for building. To do this, run:dpkg-depcheck -d ./configure
checking for library containing tputs... no
configure: error: The required function `tputs' was not found in any library.
These libraries were tried: libncurses, libterminfo, libtermcap, libcurses.
Please try installing whichever of these libraries is most appropriate
for your system, together with its header files.
For example, a libncurses-dev(el) or similar package.
sudo apt-get install libncurses5-dev
apt-cache search .*libncurses.*dev
dpkg-depcheck -d ./configure
) at the very end of a long listing:Packages needed:
libgtk-3-dev
debian/control
file in the “Build-Depends” line, separating the listed packages with a comma and a space. Look at the other fields in this file, edit them if necessary. Here are the contents of my file for comparison:Source: emacs
Section: editors
Priority: extra
Maintainer: John Doe <john.doe@gmail.com>
Build-Depends: debhelper (>= 8.0.0), autotools-dev, libgtk-3-dev
Standards-Version: 3.9.2
Homepage: www.gnu.org/software/emacs
Package: emacs
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: GNU Emacs is an extensible, customizable text editor.
debian/control
file can be found here: http://www.debian.org/doc/manuals/maint-guide/dreq.ru.html#control .configure
command, look at what GNU Emacs will be built with, find the following lines:What operating system and machine description files should Emacs use?
`s/gnu-linux.h' and `m/amdx86-64.h'
What compiler should emacs be built with? gcc -std=gnu99 -g -O2
Should Emacs use the GNU version of malloc? yes
(Using Doug Lea's new malloc from the GNU C Library.)
Should Emacs use a relocating allocator for buffers? no
Should Emacs use mmap(2) for buffer allocation? no
What window system should Emacs use? x11
What toolkit should Emacs use? GTK
Where do we find X Windows header files? Standard dirs
Where do we find X Windows libraries? Standard dirs
Does Emacs use -lXaw3d? no
Does Emacs use -lXpm? yes
Does Emacs use -ljpeg? yes
Does Emacs use -ltiff? yes
Does Emacs use a gif library? yes -lgif
Does Emacs use -lpng? yes
Does Emacs use -lrsvg-2? yes
Does Emacs use imagemagick? yes
Does Emacs use -lgpm? yes
Does Emacs use -ldbus? yes
Does Emacs use -lgconf? no
Does Emacs use GSettings? yes
Does Emacs use -lselinux? yes
Does Emacs use -lgnutls? yes
Does Emacs use -lxml2? yes
Does Emacs use -lfreetype? yes
Does Emacs use -lm17n-flt? yes
Does Emacs use -lotf? yes
Does Emacs use -lxft? yes
Does Emacs use toolkit scroll bars? yes
INSTALL
file describes options for the configure
script, using which you can configure the GNU Emacs assembly in different ways. Keep in mind that you are currently doing a test run of configure
and doing dpkg-depcheck -d ./configure --without-png
, for example, you do not affect the .deb package you create with compiled GNU Emacs. To pass the required parameters to the configure
script during the build of a .deb package, add the following lines to the debian/rules
:override_dh_auto_configure:
dh_auto_configure -- --without-png
debian/
. The build requires debian/{control, rules, copyright, changelog}
all generated by running dh_make
. In principle, you can not edit anything else, but paying tribute to the work of people, I suggest putting the debian/copyright
file in order. Here is an example:Format: dep.debian.net/deps/dep5
Upstream-Name: emacs
Source: savannah.gnu.org/bzr/?group=emacs
Maintainer: John Doe <john.doe@gmail.com>
Files: *
Copyright: Copyright (C) 2007 Free Software Foundation, Inc. <fsf.org>
License: GPL-3.0+
Files: debian/*
Copyright: 2011 John Doe <john.doe@gmail.com>
License: GPL-3.0+
License: GPL-3.0+
This program 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 3 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 <www.gnu.org/licenses>.
.
On Debian systems, the complete text of the GNU General
Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".
Makefile
built in such a way that there is a check target and it will be launched by the .deb build system. And since we leaked a trunk, and not a prepared release, the tests may not pass. At least I have it now. To skip the tests, you must set the environment variable DEB_BUILD_OPTIONS="nocheck"
. So, run the assembly:DEB_BUILD_OPTIONS="nocheck" dpkg-buildpackage -rfakeroot
dpkg-buildpackage -rfakeroot
gtk3
not gtk3
to parameterize configure to build a nice- Gtk3
GUI version with Gtk3
support and Xft
(freetype fonts), just repeat the steps in the as is article and get a normal full GNU Emacs assembly. If you did everything correctly, the package creation will be completed with the question of the secret phrase that was set when generating the PGP key. After that, a level above the current directory will contain the assembled .deb package, which can be installed into the system:dpkg -i ../emacs_24.0.92-1_amd64.deb
Source: https://habr.com/ru/post/134951/
All Articles