aboutsummaryrefslogtreecommitdiff
path: root/package/exim/exim.mk
diff options
context:
space:
mode:
authorGravatar Luca Ceresoli <luca@lucaceresoli.net>2014-03-06 17:54:50 +0100
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2014-04-05 18:31:51 +0200
commit74396948333f93278eaae5b3227d95cb830efee7 (patch)
treebc649d1e704d1e666bba7772341994cac275d160 /package/exim/exim.mk
parentfa7697dc2b04bf3e35d5d456abbe20a93c650f2b (diff)
downloadbuildroot-74396948333f93278eaae5b3227d95cb830efee7.tar.gz
buildroot-74396948333f93278eaae5b3227d95cb830efee7.tar.bz2
exim: new package
[Thomas: - use $(INSTALL) instead of install - add AR and RANLIB variables in the local makefiles, so that the cross toolchain ar and ranlib utilities are used instead of the native ones. - move the init script initialization to the EXIM_INSTALL_INIT_SYSV variable. - Use parenthesis instead of curly braces to reference TARGET_DIR.] Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/exim/exim.mk')
-rw-r--r--package/exim/exim.mk46
1 files changed, 46 insertions, 0 deletions
diff --git a/package/exim/exim.mk b/package/exim/exim.mk
new file mode 100644
index 0000000000..3e8404b616
--- /dev/null
+++ b/package/exim/exim.mk
@@ -0,0 +1,46 @@
+#############################################################
+#
+# exim
+#
+#############################################################
+
+EXIM_VERSION = 4.82
+EXIM_SOURCE = exim-$(EXIM_VERSION).tar.bz2
+EXIM_SITE = ftp://ftp.exim.org/pub/exim/exim4
+EXIM_LICENSE = GPLv2+
+EXIM_LICENSE_FILES = LICENCE
+EXIM_DEPENDENCIES = pcre berkeleydb
+
+# These echos seem to be the sanest way to feed CC and CFLAGS to exim
+define EXIM_CONFIGURE_CMDS
+ $(INSTALL) -m 0644 -D package/exim/Local-Makefile $(@D)/Local/Makefile
+ echo "CC=$(TARGET_CC)" >>$(@D)/Local/Makefile
+ echo "CFLAGS=$(TARGET_CFLAGS)" >>$(@D)/Local/Makefile
+ echo "AR=$(TARGET_AR) cq" >>$(@D)/Local/Makefile
+ echo "RANLIB=$(TARGET_RANLIB)" >>$(@D)/Local/Makefile
+ echo "HOSTCC=$(HOSTCC)" >>$(@D)/Local/Makefile
+ echo "HOSTCFLAGS=$(HOSTCFLAGS)" >>$(@D)/Local/Makefile
+endef
+
+# "The -j (parallel) flag must not be used with make"
+# (http://www.exim.org/exim-html-current/doc/html/spec_html/ch04.html)
+define EXIM_BUILD_CMDS
+ build=br $(MAKE1) -C $(@D)
+endef
+
+define EXIM_INSTALL_TARGET_CMDS
+ DESTDIR=$(TARGET_DIR) INSTALL_ARG="-no_chown -no_symlink" build=br \
+ $(MAKE1) -C $(@D) install
+ chmod u+s $(TARGET_DIR)/usr/sbin/exim
+endef
+
+define EXIM_USERS
+exim 88 mail 8 * - - - exim
+endef
+
+define EXIM_INSTALL_INIT_SYSV
+ $(INSTALL) -D -m 755 package/exim/S86exim \
+ $(TARGET_DIR)/etc/init.d/S86exim
+endef
+
+$(eval $(generic-package))