2014-04-05 5:10 GMT-07:00 Adam Nielsen <a.niel...@shikadi.net>:
> This adds support for building the Exim MTA as a package.  The standard 
> options
> are configurable through the menuconfig system, with support in place for some
> of the more advanced options (currently flagged as BROKEN), should someone 
> wish
> to add support for those in future.

Please fix the ipkg-install section:

SHELL= /exp00/fainelli/openwrt/trunk/staging_dir/host/bin/flock
/exp00/fainelli/openwrt/trunk/tmp/.root-copy.flock -c 'cp -fpR
/exp00/fainelli/openwrt/trunk/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/root-realview/tmp-exim/.
/exp00/fainelli/openwrt/trunk/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/root-realview/'
cp: cannot overwrite non-directory
`/exp00/fainelli/openwrt/trunk/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/root-realview/./var'
with directory 
`/exp00/fainelli/openwrt/trunk/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/root-realview/tmp-exim/./var'
make[2]: *** 
[/exp00/fainelli/openwrt/trunk/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/root-realview/stamp/.exim_installed]
Error 1
make[2]: Leaving directory `/exp00/fainelli/openwrt/packages/mail/exim'

you ought to see this while building the package.

>
> Signed-off-by: Adam Nielsen <a.niel...@shikadi.net>
> ---
>  mail/exim/Config.in                                | 332 
> +++++++++++++++++++++
>  mail/exim/Makefile                                 | 284 ++++++++++++++++++
>  mail/exim/files/Local-Makefile                     |  16 +
>  mail/exim/files/exim.init                          |  20 ++
>  .../patches/001-buildconfig-crosscompile.patch     |  13 +
>  5 files changed, 665 insertions(+)
>  create mode 100644 mail/exim/Config.in
>  create mode 100644 mail/exim/Makefile
>  create mode 100644 mail/exim/files/Local-Makefile
>  create mode 100644 mail/exim/files/exim.init
>  create mode 100644 mail/exim/patches/001-buildconfig-crosscompile.patch
>
> diff --git a/mail/exim/Config.in b/mail/exim/Config.in
> new file mode 100644
> index 0000000..0382b46
> --- /dev/null
> +++ b/mail/exim/Config.in
> @@ -0,0 +1,332 @@
> +# Exim configuration
> +menu "Configuration"
> +       depends on PACKAGE_exim
> +
> +config EXIM_VERBOSE_BUILD
> +       depends on DEVEL || BROKEN
> +       bool "Verbose build"
> +       default n
> +       help
> +        Show detailed output including commands from the Exim build process.
> +
> +menuconfig EXIM_ICONV
> +       bool "Support charset conversion"
> +       default y
> +
> +       config EXIM_DEF_CHARSET
> +               depends on EXIM_ICONV
> +               string
> +               prompt "Default charset for headers"
> +               default "ISO-8859-1"
> +               help
> +                HEADERS_CHARSET option in Exim Makefile
> +
> +menu "Router support"
> +
> +       config EXIM_ROUTER_ACCEPT
> +               bool "accept"
> +               default y
> +               help
> +                Include support for the "accept" router.
> +
> +       config EXIM_ROUTER_DNSLOOKUP
> +               bool "dnslookup"
> +               default y
> +               help
> +                Include support for the "dnslookup" router.
> +
> +       config EXIM_ROUTER_IPLITERAL
> +               bool "ipliteral"
> +               default n
> +               help
> +                Include support for the "ipliteral" router.
> +
> +       config EXIM_ROUTER_MANUALROUTE
> +               bool "manualroute"
> +               default y
> +               help
> +                Include support for the "manualroute" router.
> +
> +       config EXIM_ROUTER_QUERYPROGRAM
> +               bool "queryprogram"
> +               default y
> +               help
> +                Include support for the "queryprogram" router.
> +
> +       config EXIM_ROUTER_REDIRECT
> +               bool "redirect"
> +               default y
> +               help
> +                Include support for the "redirect" router.
> +
> +       config EXIM_ROUTER_IPLOOKUP
> +               bool "iplookup"
> +               default n
> +               help
> +                Include support for the "iplookup" router.  This is very 
> special-purpose
> +                and almost always disabled.
> +
> +endmenu
> +
> +menu "Transport support"
> +
> +       config EXIM_TRANSPORT_APPENDFILE
> +               bool "appendfile"
> +               default y
> +               help
> +                Include support for the "appendfile" transport.  This is 
> needed to deliver
> +                mail to local mailboxes.  You can omit this if you will not 
> be delivering
> +                messages to mailboxes stored on the machine running this 
> copy of Exim.
> +
> +       config EXIM_TRANSPORT_AUTOREPLY
> +               bool "autoreply"
> +               default y
> +               help
> +                Include support for the "autoreply" transport.
> +
> +       config EXIM_TRANSPORT_PIPE
> +               bool "pipe"
> +               default y
> +               help
> +                Include support for the "pipe" transport.  This is needed to 
> pass messages
> +                to scripts.
> +
> +       config EXIM_TRANSPORT_SMTP
> +               bool "smtp"
> +               default y
> +               help
> +                Include support for the "smtp" transport.  This is needed to 
> pass outgoing
> +                mail along to other MTAs via SMTP (e.g. with a smarthost).  
> It is not
> +                required to receive mail over SMTP.
> +
> +       config EXIM_TRANSPORT_LMTP
> +               bool "lmtp"
> +               default n
> +               help
> +                Include support for the "lmtp" transport.  This is rarely 
> needed.
> +
> +endmenu
> +
> +# This option controls which methods are available to Exim to perform various
> +# types of lookups, such as looking up whether a user with incoming mail
> +# actually exists on the system.
> +menu "Lookup methods"
> +
> +       config EXIM_LOOKUP_DBM
> +               bool "dbm"
> +               default y
> +               help
> +                Include support for the "dbm" lookup method.
> +
> +       config EXIM_LOOKUP_LSEARCH
> +               bool "lsearch"
> +               default y
> +               help
> +                Include support for the "lsearch" lookup method.
> +
> +       config EXIM_LOOKUP_DNSDB
> +               bool "dnsdb"
> +               default y
> +               help
> +                Include support for the "dnsdb" lookup method.
> +
> +       config EXIM_LOOKUP_CDB
> +               bool "cdb"
> +               default n
> +               help
> +                Include support for the "cdb" lookup method.
> +
> +       config EXIM_LOOKUP_DSEARCH
> +               bool "dsearch"
> +               default n
> +               help
> +                Include support for the "dsearch" lookup method.
> +
> +       config EXIM_LOOKUP_IBASE
> +               depends on BROKEN
> +               bool "ibase"
> +               default n
> +               help
> +                Include support for the "ibase" lookup method.
> +
> +       config EXIM_LOOKUP_LDAP
> +               depends on BROKEN
> +               bool "ldap"
> +               default n
> +               help
> +                Include support for the "ldap" lookup method.
> +
> +       config EXIM_LOOKUP_MYSQL
> +               depends on BROKEN
> +               bool "mysql"
> +               default n
> +               help
> +                Include support for the "mysql" lookup method.
> +
> +       config EXIM_LOOKUP_NIS
> +               depends on BROKEN
> +               bool "nis"
> +               default n
> +               help
> +                Include support for the "nis" lookup method.
> +
> +       config EXIM_LOOKUP_NISPLUS
> +               depends on BROKEN
> +               bool "nisplus"
> +               default n
> +               help
> +                Include support for the "nisplus" lookup method.
> +
> +       config EXIM_LOOKUP_ORACLE
> +               depends on BROKEN
> +               bool "oracle"
> +               default n
> +               help
> +                Include support for the "oracle" lookup method.
> +
> +       config EXIM_LOOKUP_PASSWD
> +               bool "passwd"
> +               default y
> +               help
> +                Include support for the "passwd" lookup method.
> +
> +       config EXIM_LOOKUP_PGSQL
> +               depends on BROKEN
> +               bool "pgsql"
> +               default n
> +               help
> +                Include support for the "pgsql" lookup method.
> +
> +       config EXIM_LOOKUP_SQLITE
> +               depends on BROKEN
> +               bool "sqlite"
> +               default n
> +               help
> +                Include support for the "sqlite" lookup method.
> +
> +       config EXIM_LOOKUP_WHOSON
> +               depends on BROKEN
> +               bool "whoson"
> +               default n
> +               help
> +                Include support for the "whoson" lookup method.
> +
> +endmenu
> +
> +menu "Authentication methods (SMTP AUTH)"
> +
> +       config EXIM_AUTH_CRAM_MD5
> +               bool "cram/md5"
> +               default y
> +               help
> +                Include support for the "cram_md5" authentication method.
> +
> +       config EXIM_AUTH_CYRUS_SASL
> +               depends on BROKEN
> +               bool "cyrus_sasl"
> +               default n
> +               help
> +                Include support for the "cyrus_sasl" authentication method.
> +
> +       config EXIM_AUTH_DOVECOT
> +               bool "dovecot"
> +               default y
> +               help
> +                Include support for the "dovecot" authentication method.
> +
> +       config EXIM_AUTH_GSASL
> +               depends on BROKEN
> +               bool "gsasl"
> +               default n
> +               help
> +                Include support for the "gsasl" authentication method.
> +
> +       config EXIM_AUTH_HEIMDAL_GSSAPI
> +               depends on BROKEN
> +               bool "heimdal_gssapi"
> +               default n
> +               help
> +                Include support for the "heimdal_gssapi" authentication 
> method.
> +
> +       config EXIM_AUTH_PLAINTEXT
> +               bool "plaintext"
> +               default y
> +               help
> +                Include support for the "plaintext" authentication method.
> +
> +       config EXIM_AUTH_SPA
> +               depends on BROKEN
> +               bool "spa"
> +               default n
> +               help
> +                Include support for the "spa" authentication method.
> +
> +       config EXIM_AUTH_PAM
> +               depends on BROKEN
> +               bool "pam"
> +               default n
> +               help
> +                Include support for using PAM modules as the authentication 
> method.
> +
> +endmenu
> +
> +menu "Mailbox types"
> +       depends on EXIM_ROUTER_ACCEPT
> +
> +       config EXIM_MBOX_MAILDIR
> +               bool "maildir"
> +               default y
> +               help
> +                Include support for Maildir mailboxes.
> +
> +       config EXIM_MBOX_MAILSTORE
> +               bool "mailstore"
> +               default y
> +               help
> +                Include support for mailstore mailboxes.
> +
> +       config EXIM_MBOX_MBX
> +               bool "mbx"
> +               default y
> +               help
> +                Include support for mbx mailboxes.
> +
> +endmenu
> +
> +config EXIM_CONFIGURE_FILE
> +       string
> +       prompt "Path to config file"
> +       default "/etc/exim/exim.conf"
> +       help
> +        Location of main configuration file.
> +
> +config EXIM_SPOOL_DIRECTORY
> +       string
> +       prompt "Path to spool directory"
> +       default "/etc/exim/spool"
> +       help
> +        This is where Exim stores the mail queue.  It is recommended to 
> leave it at
> +        the default value (/etc/exim/spool) and create a symlink there to 
> point to
> +        the real location (which is probably on external storage.)
> +
> +config EXIM_USER
> +       string
> +       prompt "UID to run Exim as"
> +       default "8"
> +       help
> +        This is the user that Exim will switch to when delivering mail.  You 
> should
> +        specify this as a number.  If you use a name, it will be looked up 
> at compile
> +        time on the host machine, and will likely end up as the wrong user 
> on the
> +        target.
> +
> +config EXIM_GROUP
> +       string
> +       prompt "GID to run Exim as"
> +       default "8"
> +       help
> +        This is the group that Exim will switch to when delivering mail.  
> You should
> +        specify this as a number.  If you use a name, it will be looked up 
> at compile
> +        time on the host machine, and will likely end up as the wrong group 
> on the
> +        target.
> +
> +endmenu
> diff --git a/mail/exim/Makefile b/mail/exim/Makefile
> new file mode 100644
> index 0000000..3b4b8b3
> --- /dev/null
> +++ b/mail/exim/Makefile
> @@ -0,0 +1,284 @@
> +#
> +# Copyright (C) 2006-2014 OpenWrt.org
> +#
> +# This is free software, licensed under the GNU General Public License v2.
> +# See /LICENSE for more information.
> +#
> +
> +include $(TOPDIR)/rules.mk
> +
> +PKG_NAME:=exim
> +PKG_VERSION:=4.82
> +PKG_RELEASE:=1
> +
> +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
> +PKG_SOURCE_URL:=ftp://ftp.exim.org/pub/exim/exim4/
> +PKG_MD5SUM:=7f7b50394f8f3d4141e7dca9392f62f0
> +
> +# According to the Exim docs, parallel builds won't work
> +PKG_BUILD_PARALLEL:=0
> +
> +include $(INCLUDE_DIR)/package.mk
> +include $(INCLUDE_DIR)/nls.mk
> +
> +define Package/exim
> +       SECTION:=mail
> +       CATEGORY:=Mail
> +       DEPENDS:=+libdb47 +EXIM_ICONV:libiconv +libopenssl +libpcre
> +       TITLE:=Flexible MTA/SMTP daemon
> +       MAINTAINER:=Adam Nielsen <a.niel...@shikadi.net>
> +       URL:=http://www.exim.org/
> +       MENU:=1
> +endef
> +
> +define Package/exim/config
> +       source "$(SOURCE)/Config.in"
> +endef
> +
> +define Package/exim/description
> + Exim is a Message Transfer Agent (MTA) with a great deal of flexibility in 
> the
> + way mail can be routed, and there are extensive facilities for checking
> + incoming mail.
> +endef
> +
> +define Build/Configure
> +       $(CP) ./files/Local-Makefile $(PKG_BUILD_DIR)/Local/Makefile
> +endef
> +
> +MAKE_FLAGS += \
> +       HOSTCC="$(HOSTCC)" \
> +       HOSTCCFLAGS="" \
> +       AR="$(AR) cq"
> +
> +# Verbose build
> +ifeq ($(CONFIG_EXIM_VERBOSE_BUILD),y)
> +       MAKE_FLAGS += FULLECHO=''
> +endif
> +
> +# Support charset conversion
> +ifeq ($(CONFIG_EXIM_ICONV),y)
> +       MAKE_FLAGS += \
> +               HAVE_ICONV=yes \
> +               EXTRALIBS="$(ICONV_LDFLAGS)" \
> +               EXTRALIBS_EXIM=-liconv \
> +               HEADERS_CHARSET="$(CONFIG_EXIM_DEF_CHARSET)"
> +endif
> +
> +# Router support
> +
> +ifeq ($(CONFIG_EXIM_ROUTER_ACCEPT),y)
> +       MAKE_FLAGS += ROUTER_ACCEPT=yes
> +endif
> +
> +ifeq ($(CONFIG_EXIM_ROUTER_DNSLOOKUP),y)
> +       MAKE_FLAGS += ROUTER_DNSLOOKUP=yes
> +endif
> +
> +ifeq ($(CONFIG_EXIM_ROUTER_IPLITERAL),y)
> +       MAKE_FLAGS += ROUTER_IPLITERAL=yes
> +endif
> +
> +ifeq ($(CONFIG_EXIM_ROUTER_MANUALROUTE),y)
> +       MAKE_FLAGS += ROUTER_MANUALROUTE=yes
> +endif
> +
> +ifeq ($(CONFIG_EXIM_ROUTER_QUERYPROGRAM),y)
> +       MAKE_FLAGS += ROUTER_QUERYPROGRAM=yes
> +endif
> +
> +ifeq ($(CONFIG_EXIM_ROUTER_REDIRECT),y)
> +       MAKE_FLAGS += ROUTER_REDIRECT=yes
> +endif
> +
> +ifeq ($(CONFIG_EXIM_ROUTER_IPLOOKUP),y)
> +       MAKE_FLAGS += ROUTER_IPLOOKUP=yes
> +endif
> +
> +# Transport support
> +
> +ifeq ($(CONFIG_EXIM_TRANSPORT_APPENDFILE),y)
> +       MAKE_FLAGS += TRANSPORT_APPENDFILE=yes
> +endif
> +
> +ifeq ($(CONFIG_EXIM_TRANSPORT_AUTOREPLY),y)
> +       MAKE_FLAGS += TRANSPORT_AUTOREPLY=yes
> +endif
> +
> +ifeq ($(CONFIG_EXIM_TRANSPORT_PIPE),y)
> +       MAKE_FLAGS += TRANSPORT_PIPE=yes
> +endif
> +
> +ifeq ($(CONFIG_EXIM_TRANSPORT_SMTP),y)
> +       MAKE_FLAGS += TRANSPORT_SMTP=yes
> +endif
> +
> +ifeq ($(CONFIG_EXIM_TRANSPORT_LMTP),y)
> +       MAKE_FLAGS += TRANSPORT_LMTP=yes
> +endif
> +
> +# Lookup methods
> +
> +ifeq ($(CONFIG_EXIM_LOOKUP_DBM),y)
> +       MAKE_FLAGS += LOOKUP_DBM=yes
> +endif
> +
> +ifeq ($(CONFIG_EXIM_LOOKUP_LSEARCH),y)
> +       MAKE_FLAGS += LOOKUP_LSEARCH=yes
> +endif
> +
> +ifeq ($(CONFIG_EXIM_LOOKUP_DNSDB),y)
> +       MAKE_FLAGS += LOOKUP_DNSDB=yes
> +endif
> +
> +ifeq ($(CONFIG_EXIM_LOOKUP_CDB),y)
> +       MAKE_FLAGS += LOOKUP_CDB=yes
> +endif
> +
> +ifeq ($(CONFIG_EXIM_LOOKUP_DSEARCH),y)
> +       MAKE_FLAGS += LOOKUP_DSEARCH=yes
> +endif
> +
> +ifeq ($(CONFIG_EXIM_LOOKUP_IBASE),y)
> +       MAKE_FLAGS += LOOKUP_IBASE=yes
> +endif
> +
> +ifeq ($(CONFIG_EXIM_LOOKUP_LDAP),y)
> +       MAKE_FLAGS += LOOKUP_LDAP=yes
> +endif
> +
> +ifeq ($(CONFIG_EXIM_LOOKUP_MYSQL),y)
> +       MAKE_FLAGS += LOOKUP_MYSQL=yes
> +endif
> +
> +ifeq ($(CONFIG_EXIM_LOOKUP_NIS),y)
> +       MAKE_FLAGS += LOOKUP_NIS=yes
> +endif
> +
> +ifeq ($(CONFIG_EXIM_LOOKUP_NISPLUS),y)
> +       MAKE_FLAGS += LOOKUP_NISPLUS=yes
> +endif
> +
> +ifeq ($(CONFIG_EXIM_LOOKUP_ORACLE),y)
> +       MAKE_FLAGS += LOOKUP_ORACLE=yes
> +endif
> +
> +ifeq ($(CONFIG_EXIM_LOOKUP_PASSWD),y)
> +       MAKE_FLAGS += LOOKUP_PASSWD=yes
> +endif
> +
> +ifeq ($(CONFIG_EXIM_LOOKUP_PGSQL),y)
> +       MAKE_FLAGS += LOOKUP_PGSQL=yes
> +endif
> +
> +ifeq ($(CONFIG_EXIM_LOOKUP_SQLITE),y)
> +       MAKE_FLAGS += LOOKUP_SQLITE=yes
> +endif
> +
> +ifeq ($(CONFIG_EXIM_LOOKUP_WHOSON),y)
> +       MAKE_FLAGS += LOOKUP_WHOSON=yes
> +endif
> +
> +# Authentication methods
> +
> +ifeq ($(CONFIG_EXIM_AUTH_CRAM_MD5),y)
> +       MAKE_FLAGS += AUTH_CRAM_MD5=yes
> +endif
> +
> +ifeq ($(CONFIG_EXIM_AUTH_CYRUS_SASL),y)
> +       MAKE_FLAGS += AUTH_CYRUS_SASL=yes
> +endif
> +
> +ifeq ($(CONFIG_EXIM_AUTH_DOVECOT),y)
> +       MAKE_FLAGS += AUTH_DOVECOT=yes
> +endif
> +
> +ifeq ($(CONFIG_EXIM_AUTH_GSASL),y)
> +       MAKE_FLAGS += AUTH_GSASL=yes
> +endif
> +
> +ifeq ($(CONFIG_EXIM_AUTH_HEIMDAL_GSSAPI),y)
> +       MAKE_FLAGS += AUTH_HEIMDAL_GSSAPI=yes
> +endif
> +
> +ifeq ($(CONFIG_EXIM_AUTH_PLAINTEXT),y)
> +       MAKE_FLAGS += AUTH_PLAINTEXT=yes
> +endif
> +
> +ifeq ($(CONFIG_EXIM_AUTH_SPA),y)
> +       MAKE_FLAGS += AUTH_SPA=yes
> +endif
> +
> +ifeq ($(CONFIG_EXIM_AUTH_PAM),y)
> +       MAKE_FLAGS += \
> +               SUPPORT_PAM=yes \
> +               EXTRALIBS=-lpam
> +endif
> +
> +# Mailbox types
> +
> +ifeq ($(CONFIG_EXIM_MBOX_MAILDIR),y)
> +       MAKE_FLAGS += SUPPORT_MAILDIR=yes
> +endif
> +
> +ifeq ($(CONFIG_EXIM_MBOX_MAILSTORE),y)
> +       MAKE_FLAGS += SUPPORT_MAILSTORE=yes
> +endif
> +
> +ifeq ($(CONFIG_EXIM_MBOX_MBX),y)
> +       MAKE_FLAGS += SUPPORT_MBX=yes
> +endif
> +
> +MAKE_FLAGS += \
> +       CONFIGURE_FILE=$(CONFIG_EXIM_CONFIGURE_FILE) \
> +       SPOOL_DIRECTORY=$(CONFIG_EXIM_SPOOL_DIRECTORY) \
> +       EXIM_USER=$(CONFIG_EXIM_USER) \
> +       EXIM_GROUP=$(CONFIG_EXIM_GROUP) \
> +       SYSTEM_ALIASES_FILE=$(CONFIG_EXIM_SYSTEM_ALIASES_FILE)
> +
> +# These are stripped and go into /usr/bin
> +BIN_FILES = \
> +       exim exim_dumpdb exim_fixdb exim_tidydb exim_dbmbuild exim_lock
> +
> +# These also go into /usr/bin, but they are not stripped
> +SCRIPT_FILES = \
> +       exinext exiwhat exicyclog exigrep eximstats exipick exiqgrep exiqsumm 
> \
> +       exim_checkaccess
> +
> +# We can't use the normal 'make install' because that runs 
> scripts/exim_install
> +# which isn't aware of cross-compilation, so it tries to run the newly built
> +# exim binary, which of course fails on the host machine.  So these commands
> +# do basically the same as scripts/exim_install.
> +define Package/exim/install
> +       $(INSTALL_DIR)  $(1)/etc/init.d \
> +                       $(1)/etc/exim \
> +                       $(1)/usr/bin \
> +                       $(1)/usr/sbin \
> +                       $(1)/var/log \
> +                       $(1)/$(CONFIG_EXIM_SPOOL_DIRECTORY)
> +       $(foreach f, $(BIN_FILES) $(SCRIPT_FILES),
> +               $(INSTALL_BIN) $(PKG_BUILD_DIR)/build-*/$(f) $(1)/usr/bin/
> +       )
> +       $(foreach f, $(BIN_FILES),
> +               $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)strip $(1)/usr/bin/$(f)
> +       )
> +       $(INSTALL_BIN) ./files/exim.init $(1)/etc/init.d/exim
> +       chmod 4755 $(1)/usr/bin/exim
> +       echo -e "Queued mail is stored here.  You may wish to replace this" \
> +               "folder with a symlink." > 
> $(1)/$(CONFIG_EXIM_SPOOL_DIRECTORY)/README
> +endef
> +
> +define Package/exim/postinst
> +#!/bin/sh
> +
> +chown mail:mail $${IPKG_INSTROOT}/$(CONFIG_EXIM_SPOOL_DIRECTORY)
> +chmod 750 $${IPKG_INSTROOT}/$(CONFIG_EXIM_SPOOL_DIRECTORY)
> +
> +ln -sf exim $${IPKG_INSTROOT}/usr/bin/sendmail
> +ln -sf exim $${IPKG_INSTROOT}/usr/bin/mailq
> +ln -sf exim $${IPKG_INSTROOT}/usr/bin/rsmtp
> +ln -sf exim $${IPKG_INSTROOT}/usr/bin/rmail
> +ln -sf exim $${IPKG_INSTROOT}/usr/bin/runq
> +ln -sf exim $${IPKG_INSTROOT}/usr/bin/newaliases
> +endef
> +
> +$(eval $(call BuildPackage,exim))
> diff --git a/mail/exim/files/Local-Makefile b/mail/exim/files/Local-Makefile
> new file mode 100644
> index 0000000..0a4068a
> --- /dev/null
> +++ b/mail/exim/files/Local-Makefile
> @@ -0,0 +1,16 @@
> +BIN_DIRECTORY=/usr/bin
> +PCRE_LIBS=-lpcre
> +WITH_CONTENT_SCAN=yes
> +FIXED_NEVER_USERS=root
> +PID_FILE_PATH=/var/run/exim.pid
> +LOG_FILE_PATH=/var/log/exim/exim_%slog
> +# LOG_FILE_PATH=syslog
> +USE_DB=yes
> +# HAVE_IPV6=yes
> +
> +SUPPORT_TLS=yes
> +TLS_LIBS=-lssl -lcrypto
> +
> +# This is overridden by CONFIG_EXIM_ICONV if iconv is wanted.  Otherwise we
> +# have to set it to 'no' here to override the default setting for the 
> platform.
> +HAVE_ICONV=no
> diff --git a/mail/exim/files/exim.init b/mail/exim/files/exim.init
> new file mode 100644
> index 0000000..16891ed
> --- /dev/null
> +++ b/mail/exim/files/exim.init
> @@ -0,0 +1,20 @@
> +#!/bin/sh /etc/rc.common
> +# Copyright (C) 2006-2013 OpenWrt.org
> +
> +START=75
> +STOP=75
> +
> +USE_PROCD=1
> +
> +start_service() {
> +       user_exists mail 8 || user_add mail 8 8 /etc/exim
> +       group_exists mail 8 || group_add mail 8
> +       mkdir -m 0750 -p /etc/exim/spool
> +       chown mail:mail /etc/exim/spool
> +       mkdir -m 0755 -p /var/log/exim
> +       chown mail:mail /var/log/exim
> +
> +       procd_open_instance
> +       procd_set_param command /usr/bin/exim -bdf
> +       procd_close_instance
> +}
> diff --git a/mail/exim/patches/001-buildconfig-crosscompile.patch 
> b/mail/exim/patches/001-buildconfig-crosscompile.patch
> new file mode 100644
> index 0000000..2ffaf96
> --- /dev/null
> +++ b/mail/exim/patches/001-buildconfig-crosscompile.patch
> @@ -0,0 +1,13 @@
> +--- a/OS/Makefile-Base
> ++++ b/OS/Makefile-Base
> +@@ -112,8 +112,8 @@
> +
> + # Targets for special-purpose configuration header builders
> + buildconfig: buildconfig.c
> +-      @echo "$(CC) buildconfig.c"
> +-      $(FE)$(CC) $(CFLAGS) $(INCLUDE) -o buildconfig buildconfig.c $(LIBS)
> ++      @echo "$(HOSTCC) buildconfig.c"
> ++      $(FE)$(HOSTCC) $(HOSTCCFLAGS) $(INCLUDE) -o buildconfig buildconfig.c 
> $(LIBS)
> +
> +
> + # Target for the exicyclog utility script
> --
> 1.9.0
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

-- 
Florian
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to