diff options
3 files changed, 122 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/ssmtp/ssmtp/build-ouside_srcdir.patch b/meta-networking/recipes-support/ssmtp/ssmtp/build-ouside_srcdir.patch new file mode 100644 index 000000000..d53cff249 --- /dev/null +++ b/meta-networking/recipes-support/ssmtp/ssmtp/build-ouside_srcdir.patch | |||
@@ -0,0 +1,17 @@ | |||
1 | help compile when S != B | ||
2 | |||
3 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
4 | Upstream-Status: Pending | ||
5 | Index: ssmtp-2.64/Makefile.in | ||
6 | =================================================================== | ||
7 | --- ssmtp-2.64.orig/Makefile.in | ||
8 | +++ ssmtp-2.64/Makefile.in | ||
9 | @@ -24,7 +24,7 @@ INSTALLED_REVALIASES_FILE=$(REVALIASES_F | ||
10 | # Programs | ||
11 | GEN_CONFIG=$(srcdir)/generate_config | ||
12 | |||
13 | -SRCS=ssmtp.c arpadate.c base64.c xgethostname.c @SRCS@ | ||
14 | +SRCS=$(srcdir)/ssmtp.c $(srcdir)/arpadate.c $(srcdir)/base64.c $(srcdir)/xgethostname.c @SRCS@ | ||
15 | |||
16 | OBJS=$(SRCS:.c=.o) | ||
17 | |||
diff --git a/meta-networking/recipes-support/ssmtp/ssmtp/use-DESTDIR.patch b/meta-networking/recipes-support/ssmtp/ssmtp/use-DESTDIR.patch new file mode 100644 index 000000000..26d852761 --- /dev/null +++ b/meta-networking/recipes-support/ssmtp/ssmtp/use-DESTDIR.patch | |||
@@ -0,0 +1,74 @@ | |||
1 | Use DESTDIR during install/uninstall, this helps | ||
2 | with cross or staged builds. Additionally pass LDFLAGS | ||
3 | during linking. | ||
4 | |||
5 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
6 | Upstream-Status: Pending | ||
7 | |||
8 | |||
9 | Index: ssmtp-2.64/Makefile.in | ||
10 | =================================================================== | ||
11 | --- ssmtp-2.64.orig/Makefile.in | ||
12 | +++ ssmtp-2.64/Makefile.in | ||
13 | @@ -46,40 +46,40 @@ all: ssmtp | ||
14 | |||
15 | .PHONY: install | ||
16 | install: ssmtp $(GEN_CONFIG) | ||
17 | - $(INSTALL) -d -m 755 $(bindir) | ||
18 | - $(INSTALL) -s -m 755 ssmtp $(bindir)/ssmtp | ||
19 | - $(INSTALL) -d -m 755 $(mandir) | ||
20 | - $(INSTALL) -m 644 $(srcdir)/ssmtp.8 $(mandir)/ssmtp.8 | ||
21 | - $(INSTALL) -d -m 755 $(SSMTPCONFDIR) | ||
22 | - $(INSTALL) -m 644 $(srcdir)/revaliases $(INSTALLED_REVALIASES_FILE) | ||
23 | - $(GEN_CONFIG) $(INSTALLED_CONFIGURATION_FILE) | ||
24 | + $(INSTALL) -d -m 755 $(DESTDIR)$(bindir) | ||
25 | + $(INSTALL) -m 755 ssmtp $(DESTDIR)$(bindir)/ssmtp | ||
26 | + $(INSTALL) -d -m 755 $(DESTDIR)$(mandir) | ||
27 | + $(INSTALL) -m 644 $(srcdir)/ssmtp.8 $(DESTDIR)$(mandir)/ssmtp.8 | ||
28 | + $(INSTALL) -d -m 755 $(DESTDIR)$(SSMTPCONFDIR) | ||
29 | + $(INSTALL) -m 644 $(srcdir)/revaliases $(DESTDIR)$(INSTALLED_REVALIASES_FILE) | ||
30 | + $(GEN_CONFIG) $(DESTDIR)$(INSTALLED_CONFIGURATION_FILE) | ||
31 | |||
32 | |||
33 | .PHONY: install-sendmail | ||
34 | install-sendmail: install | ||
35 | - $(RM) $(bindir)/sendmail | ||
36 | - $(LN_S) ssmtp $(bindir)/sendmail | ||
37 | - $(INSTALL) -d -m 755 $(libexecdir) | ||
38 | - $(RM) $(libexecdir)/sendmail | ||
39 | - $(LN_S) sendmail /lib/sendmail | ||
40 | - $(RM) $(mandir)/sendmail.8 | ||
41 | - $(LN_S) ssmtp.8 $(mandir)/sendmail.8 | ||
42 | + $(RM) $(DESTDIR)$(bindir)/sendmail | ||
43 | + $(LN_S) ssmtp $(DESTDIR)$(bindir)/sendmail | ||
44 | + $(INSTALL) -d -m 755 $(DESTDIR)$(libexecdir) | ||
45 | + $(RM) $(DESTDIR)$(libexecdir)/sendmail | ||
46 | + $(LN_S) sendmail $(DESTDIR)/lib/sendmail | ||
47 | + $(RM) $(DESTDIR)$(mandir)/sendmail.8 | ||
48 | + $(LN_S) ssmtp.8 $(DESTDIR)$(mandir)/sendmail.8 | ||
49 | |||
50 | .PHONY: uninstall | ||
51 | uninstall: | ||
52 | - $(RM) $(bindir)/ssmtp | ||
53 | - $(RM) $(mandir)/ssmtp.8 | ||
54 | - $(RM) $(CONFIGURATION_FILE) $(REVALIASES_FILE) | ||
55 | - $(RM) -r $(SSMTPCONFDIR) | ||
56 | + $(RM) $(DESTDIR)$(bindir)/ssmtp | ||
57 | + $(RM) $(DESTDIR)$(mandir)/ssmtp.8 | ||
58 | + $(RM) $(DESTDIR)$(CONFIGURATION_FILE) $(DESTDIR)$(REVALIASES_FILE) | ||
59 | + $(RM) -r $(DESTDIR)$(SSMTPCONFDIR) | ||
60 | |||
61 | .PHONY: uninstall-sendmail | ||
62 | uninstall-sendmail: uninstall | ||
63 | - $(RM) $(bindir)/sendmail /lib/sendmail | ||
64 | - $(RM) $(mandir)/sendmail.8 | ||
65 | + $(RM) $(DESTDIR)$(bindir)/sendmail $(DESTDIR)/lib/sendmail | ||
66 | + $(RM) $(DESTDIR)$(mandir)/sendmail.8 | ||
67 | |||
68 | # Binaries: | ||
69 | ssmtp: $(OBJS) | ||
70 | - $(CC) -o ssmtp $(OBJS) @LIBS@ $(CFLAGS) | ||
71 | + $(CC) -o ssmtp $(OBJS) @LIBS@ $(CFLAGS) $(LDFLAGS) | ||
72 | |||
73 | .PHONY: clean | ||
74 | clean: | ||
diff --git a/meta-networking/recipes-support/ssmtp/ssmtp_2.64.bb b/meta-networking/recipes-support/ssmtp/ssmtp_2.64.bb new file mode 100644 index 000000000..9d4864d79 --- /dev/null +++ b/meta-networking/recipes-support/ssmtp/ssmtp_2.64.bb | |||
@@ -0,0 +1,31 @@ | |||
1 | SUMMARY = "extremely simple MTA to get mail off the system to a mail hub" | ||
2 | HOMEPAGE = "http://packages.qa.debian.org/s/ssmtp.html" | ||
3 | |||
4 | LICENSE = "GPLv2" | ||
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=0c56db0143f4f80c369ee3af7425af6e" | ||
6 | |||
7 | SRC_URI = "\ | ||
8 | ${DEBIAN_MIRROR}/main/s/${BPN}/${BPN}_${PV}.orig.tar.bz2 \ | ||
9 | file://build-ouside_srcdir.patch \ | ||
10 | file://use-DESTDIR.patch \ | ||
11 | " | ||
12 | |||
13 | EXTRA_OECONF += "--mandir=${mandir}" | ||
14 | |||
15 | EXTRA_OEMAKE = "GEN_CONFIG='/bin/true'" | ||
16 | |||
17 | SRC_URI[md5sum] = "65b4e0df4934a6cd08c506cabcbe584f" | ||
18 | SRC_URI[sha256sum] = "22c37dc90c871e8e052b2cab0ad219d010fa938608cd66b21c8f3c759046fa36" | ||
19 | |||
20 | inherit autotools pkgconfig | ||
21 | |||
22 | DEPENDS += "openssl inetutils" | ||
23 | |||
24 | do_install_append () { | ||
25 | install -d ${D}${mandir}/ | ||
26 | mv ${D}${exec_prefix}/man/* ${D}${mandir}/ | ||
27 | rmdir ${D}${exec_prefix}/man | ||
28 | ln -s ssmtp ${D}${sbindir}/sendmail | ||
29 | ln -s ssmtp ${D}${sbindir}/newaliases | ||
30 | ln -s ssmtp ${D}${sbindir}/mailq | ||
31 | } | ||