2 # Copyright (C) 2017 Val Kulkov <val.kulkov@gmail.com>
4 # This is free software, licensed under the GNU General Public License v3.
7 include $(TOPDIR
)/rules.mk
13 PKG_SOURCE
:=$(PKG_NAME
).
$(PKG_VERSION
).
tar.gz
14 PKG_SOURCE_URL
:=http
://artfiles.org
/sendmail.org
/pub
/sendmail
/ \
15 ftp
://ftp.cs.berkeley.edu
/ucb
/sendmail
/ \
16 http
://www.netgull.com
/sendmail
/
17 PKG_HASH
:=24f94b5fd76705f15897a78932a5f2439a32b1a2fdc35769bb1a5f5d9b4db439
18 PKG_MAINTAINER
:=Val Kulkov
<val.kulkov@gmail.com
>
21 PKG_LICENSE_FILES
:=LICENSE
24 PKG_BUILD_DEPENDS
:=openssl
26 include $(INCLUDE_DIR
)/package.mk
29 SITECONFIG
:=site.
$(TARGET_OS
).m4
32 # Uncomment the following sections that are currently commented out
33 # to enable building and packaging Sendmail executables and default
34 # configuration files into the "sendmail" package.
36 # Note that in this edition of the "sendmail" package:
37 # 1. No init script is provided to start the Sendmail daemon.
38 # 2. The initial configuration files in /etc/mail are likely inadequate
39 # for running the Sendmail daemon on your LEDE/OpenWrt device.
40 # 3. You may have to "opkg install m4" to build Sendmail configuration files
41 # from customized mc files on your LEDE/OpenWrt device using m4, or
42 # alternatively you may use a Linux computer to build configuration
43 # files from customized mc files.
44 # 4. Compiling and building the "sendmail" package will likely fail at
45 # the packaging stage if you have already selected and built the "ssmtp"
46 # package. "ssmtp" installs /usr/sbin/sendmail in the form of a symlink
47 # to /usr/sbin/ssmtp. Where /usr/sbin/sendmail is already present,
48 # copying the sendmail executable into /usr/sbin/sendmail results in
50 # cp: not writing through dangling symlink
52 # lede/source/include/toplevel.mk:206: recipe for target 'package/feeds/packages/libmilter/compile' failed
54 # ANYONE WHO IS READING THIS MAKEFILE AND WHO HAS THE KNOWLEDGE AND DESIRE
55 # TO COMPLETE PORTING OF SENDMAIL TO LEDE/OPENWRT PLATFORM IS ENCOURAGED
56 # TO DO SO AND TAKE OVER THE MAINTAINERSHIP OF THIS PACKAGE FROM VAL KULKOV.
58 #define Package/sendmail
61 # DEPENDS:=+libopenssl
62 # TITLE:=A general purpose internetwork mail routing facility
63 # URL:=http://sendmail.org/
66 #define Package/sendmail/description
67 # Sendmail is a general purpose internetwork email routing facility that
68 # supports many kinds of mail-transfer and delivery methods, including
69 # the Simple Mail Transfer Protocol (SMTP) used for email transport over
73 #define Package/sendmail/conffiles
75 #/etc/mail/sendmail.cf
80 define Package
/libmilter-sendmail
84 TITLE
:=The sendmail Mail Filter API
(Milter
) library
85 URL
:=http
://sendmail.org
/
88 define Package
/libmilter-sendmail
/description
89 The sendmail Mail Filter API
(Milter
) is designed to allow third-party
90 programs access to mail messages
as they are being processed in order to
91 filter meta-information and content.
94 TARGET_CFLAGS
+= $(FPIC
)
97 $(Build
/Prepare
/Default
)
98 $(CP
) files
/lm_getver.c
$(PKG_BUILD_DIR
)/libmilter
/
99 $(CP
) files
/$(SITECONFIG
) $(PKG_BUILD_DIR
)/devtools
/Site
/
100 $(CP
) files
/$(TARGET_OS
) $(PKG_BUILD_DIR
)/devtools
/OS
/
101 $(CP
) files
/sharedlibrary.m4
$(PKG_BUILD_DIR
)/devtools
/M4
/UNIX
/
102 $(CP
) $(PKG_BUILD_DIR
)/cf
/cf
/generic-linux.mc
$(PKG_BUILD_DIR
)/cf
/cf
/sendmail.mc
103 $(SED
) 's@TARGET_CC@$(TARGET_CC)@g' $(PKG_BUILD_DIR
)/devtools
/Site
/$(SITECONFIG
)
104 $(SED
) 's@TARGET_CFLAGS@$(TARGET_CFLAGS)@g' $(PKG_BUILD_DIR
)/devtools
/Site
/$(SITECONFIG
)
105 $(SED
) 's@STAGING_DIR@$(STAGING_DIR)@g' $(PKG_BUILD_DIR
)/devtools
/OS
/$(TARGET_OS
)
109 $(call Build
/Compile
/Default
,)
110 $(MAKE_VARS
) $(MAKE
) $(PKG_JOBS
) -C
$(PKG_BUILD_DIR
)/libmilter
$(MAKE_FLAGS
) all
111 $(MAKE_VARS
) $(MAKE
) -C
$(PKG_BUILD_DIR
)/libmilter
$(MAKE_FLAGS
) DESTDIR
="$(PKG_INSTALL_DIR)" install
112 $(MAKE_VARS
) $(MAKE
) -C
$(PKG_BUILD_DIR
)/cf
/cf
$(MAKE_FLAGS
) DESTDIR
="$(PKG_INSTALL_DIR)" install-cf
115 define Build
/InstallDev
116 $(INSTALL_DIR
) $(1)/usr
/include/libmilter
$(1)/usr
/lib
117 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/libmilter
/* $(1)/usr
/include/libmilter
/
118 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libmilter.so
* $(1)/usr
/lib
/
121 define Package
/libmilter-sendmail
/install
122 $(INSTALL_DIR
) $(1)/usr
/lib
123 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libmilter.so
* $(1)/usr
/lib
/
126 #define Package/sendmail/install
127 # $(INSTALL_DIR) $(1)/etc/mail $(1)/usr/bin $(1)/usr/sbin
128 # $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/mail/* $(1)/etc/mail/
129 # $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
130 # $(CP) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
133 $(eval
$(call BuildPackage
,libmilter-sendmail
))
134 #$(eval $(call BuildPackage,sendmail))