CC = gcc CFLAGS = -O2 -g -Wall # sane warning options vary between programs LDFLAGS = # none install -s # (or use strip on the files in debian/tmp)
Note that all installed binaries should be stripped, either by using
the -s
flag to install, or by calling strip on the
binaries after they have been copied into debian/tmp
but
before the tree is made into a package.
Make sure that you do not link with -g
, as this makes a.out
compilers produce huge statically linked binaries. The -g
flag
is useful on compilation so that you have available a full set of
debugging symbols in your built source tree, in case anyone should
file a bug report involving (for example) a core dump.
The -N
flag should not be used. On a.out systems it may have
been useful for some very small binaries, but for ELF it has no good
effect.
It is up to the package maintainer to decide what compilation options
are best for the package. Certain binaries (such as
computationally-intensive programs) may function better with certain
flags (-O3
, for example); feel free to use them. Please use good
judgment here. Don't use flags for the sake of it; only use them if
there is good reason to do so. Feel free to override the upstream
author's ideas about which compilation options are best - they are
often inappropriate for our environment.
Please make sure that you use only released versions of shared libraries to build your packages; otherwise other users will not be able to run your binaries properly. Producing source packages that depend on unreleased compilers is also usually a bad idea.
Such programs should be configured with X support, and should
declare a dependency on elf-x11r6lib
(for the X11R6 libraries).
Users who wish to use the program can install just the relatively
small xlib
package, and do not need to install the whole of X.
Do not create two versions (one with X support and one without) of your package.
From:
lines, and other serious brain damage!
The mail spool is /var/spool/mail
and the interface to send a
mail message is /usr/sbin/sendmail
(as per the FSSTND). The
mail spool is part of the base system and not part of the MTA package.
Mailboxes are locked using the username
.lock
lockfile
convention, rather than fcntl, flock or lockf.
Mailboxes are generally 660 user
.mail
unless the user has
chosen otherwise. A MUA may remove a mailbox (unless it has
nonstandard permissions) in which case the MTA or another MUA must
recreate it if needed. Mailboxes must be writeable by group mail.
The mail spool is 2775 mail.mail
, and MUA's need to be setgid
mail to do the locking mentioned above (and obviously need to avoid
accessing other users' mailboxes using this privilege).
/etc/aliases
is the source file for the system mail aliases
(e.g. postmaster, usenet, etc.) - it is the one which the sysadmin
and postinst scripts may edit. After /etc/aliases
is edited
the program or human editing it must call newaliases. All MTA
packages should come with a newaliases program, even if it does
nothing, but older MTA packages do not do this so programs should not
fail if newaliases cannot be found.
The convention of writing forward to
address in the mailbox
itself is not supported. Use a
.forward
file instead.
The location for the rmail program used by UUCP for incoming
mail is /usr/sbin/rmail
, as per the FSSTND. Likewise,
rsmtp, for receiving batch-SMTP-over-UUCP, is in
/usr/sbin/rsmtp
if it is supported.
If you need to know what name to use (for example) on outgoing news
and mail messages which are generated locally, you should use the file
/etc/mailname
. It will contain the portion after the username
and @
(at) sign for email addresses of users on the machine
(followed by a newline).
A package should check for the existence of this file. If it exists
it should use it without comment.[8] If it does not exist it should prompt the user
for the value and store it in /etc/mailname
as well as using it
in the package's configuration. The prompt should make it clear that
the name will not just be used by that package. E.g., in this
situation the INN package says:
Please enter the `mail name' of your system. This is the hostname portion of the address to be shown on outgoing news and mail messages. The default is syshostname, your system's host name. Mail name [`syshostname']:where syshostname is the output of
hostname -fqdn
.
Debian packages should be ported to <stdarg.h> and ncurses when they are built.