2 # Depending on your operating system, you might want to influence
3 # the conditional inclusion of some helper functions:
5 # Define HAVE_* (in caps) if your system already provides:
13 version
= $(shell ${SH} get-version.sh
)
14 debversion
= $(shell ${SH} get-version.sh | sed
-Ee
's/^v//;s/[.]([[:digit:]]+)[.](g[[:xdigit:]]+)$$/+\1+\2/')
18 LDADD?
= -lssl
-lcrypto
-lresolv
20 CFLAGS
+= -Wall
-DDMA_VERSION
='"${version}"' -DLIBEXEC_PATH
='"${LIBEXEC}"' -DCONF_PATH
='"${CONFDIR}"'
28 LIBEXEC?
= ${PREFIX}/lib
30 MAN?
= ${PREFIX}/share
/man
32 DMASPOOL?
= ${VAR}/spool
/dma
34 SYMLINK?
= -s
# or empty to create hard link
40 OBJS
= aliases_parse.o aliases_scan.o base64.o conf.o crypto.o
41 OBJS
+= dma.o dns.o local.o mail.o net.o spool.o util.o
44 all: dma dma-mbox-create
47 -rm -f .depend dma dma-mbox-create
*.
[do
]
48 -rm -f aliases_parse.
[ch
] aliases_scan.c
51 ${INSTALL} -d
${DESTDIR}${SBIN}
52 ${INSTALL} -d
${DESTDIR}${MAN}/man8
${DESTDIR}${LIBEXEC}
53 ${INSTALL} -m
2755 -o root
-g mail dma
${DESTDIR}${SBIN}
54 ${INSTALL} -m
4754 -o root
-g mail dma-mbox-create
${DESTDIR}${LIBEXEC}
55 ${INSTALL} -m
0644 dma
.8 ${DESTDIR}${MAN}/man8
/
58 cd
${DESTDIR}${SBIN} && ${LN} ${SYMLINK} dma sendmail
61 cd
${DESTDIR}${SBIN} && ${LN} ${SYMLINK} dma mailq
64 ${INSTALL} -d
-m
2775 -o root
-g mail
${DESTDIR}${DMASPOOL}
65 ${INSTALL} -d
-m
2775 -o root
-g mail
${DESTDIR}${VARMAIL}
68 -${CHGRP} mail
${DESTDIR}${VARMAIL}/*
69 -${CHMOD} g
+w
${DESTDIR}${VARMAIL}/*
70 -${CHMOD} 660 ${DESTDIR}${DMASPOOL}/flush
73 ${INSTALL} -d
${DESTDIR}${CONFDIR}
74 @if
[ -e
${DESTDIR}${CONFDIR}/dma.conf
]; then \
75 echo
"Not overwriting ${DESTDIR}${CONFDIR}/dma.conf."; \
77 echo
${INSTALL} -m
644 -o root
-g mail dma.conf
${DESTDIR}${CONFDIR}; \
78 ${INSTALL} -m
644 -o root
-g mail dma.conf
${DESTDIR}${CONFDIR}; \
80 @if
[ -e
${DESTDIR}${CONFDIR}/auth.conf
]; then \
81 echo
"Not overwriting ${DESTDIR}${CONFDIR}/auth.conf."; \
83 echo
${INSTALL} -m
640 -o root
-g mail auth.conf
${DESTDIR}${CONFDIR}; \
84 ${INSTALL} -m
640 -o root
-g mail auth.conf
${DESTDIR}${CONFDIR}; \
87 aliases_parse.c
: aliases_parse.y
88 ${YACC} -d
-o aliases_parse.c aliases_parse.y
90 aliases_scan.c
: aliases_scan.l
91 ${LEX} -t aliases_scan.l
> aliases_scan.c
96 ${CC} ${CFLAGS} ${CPPFLAGS} -include dfcompat.h
-o
$@
-c
$<
99 ${CC} ${LDFLAGS} -o
$@
${OBJS} ${LDADD}
103 dch
--release-heuristic changelog
-v
${debversion}
107 @if
[ -z
'${DEB_DIST}' ]; then echo
"please set DEB_DIST to build"; exit
1; fi
108 dch
-v
"${debversion}~${DEB_DIST}" -D
${DEB_DIST} "${DEB_DIST} build" -b
110 ver
=$$(dpkg-parsechangelog
-n1 | awk
'$$1 == "Version:" { print $$2 }'); \
111 dput ppa
:corecode
/dma ..
/dma_
$${ver}_source.changes