6b13f685e
김민수
BSP 최초 추가
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
|
EXIM_VERSION = 4.87
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 host-pkgconf
define exim-config-change
$(SED) 's,^[
$(@D)/Local/Makefile
endef
define exim-config-unset
$(SED) 's,^\([[:space:]]*$1[[:space:]]*=.*$$\),
$(@D)/Local/Makefile
endef
define exim-config-add
echo "$1=$2" >>$(@D)/Local/Makefile
endef
define EXIM_USE_CUSTOM_CONFIG_FILE
$(INSTALL) -m 0644 $(BR2_PACKAGE_EXIM_CUSTOM_CONFIG_FILE) \
$(@D)/Local/Makefile
endef
define EXIM_USE_DEFAULT_CONFIG_FILE
$(INSTALL) -m 0644 $(@D)/src/EDITME $(@D)/Local/Makefile
$(call exim-config-change,BIN_DIRECTORY,/usr/sbin)
$(call exim-config-change,CONFIGURE_FILE,/etc/exim/configure)
$(call exim-config-change,EXIM_USER,ref:exim)
$(call exim-config-change,EXIM_GROUP,mail)
$(call exim-config-change,TRANSPORT_LMTP,yes)
$(call exim-config-change,PCRE_LIBS,-lpcre)
$(call exim-config-change,PCRE_CONFIG,no)
$(call exim-config-change,HAVE_ICONV,no)
$(call exim-config-unset,EXIM_MONITOR)
$(call exim-config-change,AUTH_PLAINTEXT,yes)
$(call exim-config-change,AUTH_CRAM_MD5,yes)
endef
ifeq ($(BR2_PACKAGE_DOVECOT),y)
EXIM_DEPENDENCIES += dovecot
define EXIM_USE_DEFAULT_CONFIG_FILE_DOVECOT
$(call exim-config-change,AUTH_DOVECOT,yes)
endef
endif
ifeq ($(BR2_PACKAGE_CLAMAV),y)
EXIM_DEPENDENCIES += clamav
define EXIM_USE_DEFAULT_CONFIG_FILE_CLAMAV
$(call exim-config-change,WITH_CONTENT_SCAN,yes)
endef
endif
ifeq ($(BR2_PACKAGE_OPENSSL),y)
EXIM_DEPENDENCIES += openssl
define EXIM_USE_DEFAULT_CONFIG_FILE_OPENSSL
$(call exim-config-change,SUPPORT_TLS,yes)
$(call exim-config-change,USE_OPENSSL_PC,openssl)
endef
endif
ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),)
define EXIM_REMOVE_LIBNSL_FROM_MAKEFILE
$(SED) 's/-lnsl//g' $(@D)/OS/Makefile-Linux
endef
endif
ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y)
define EXIM_FIX_IP_OPTIONS_FOR_MUSL
$(SED) 's/
$(@D)/OS/os.h-Linux
endef
endif
define EXIM_CONFIGURE_TOOLCHAIN
$(call exim-config-add,CC,$(TARGET_CC))
$(call exim-config-add,CFLAGS,$(TARGET_CFLAGS))
$(call exim-config-add,AR,$(TARGET_AR) cq)
$(call exim-config-add,RANLIB,$(TARGET_RANLIB))
$(call exim-config-add,HOSTCC,$(HOSTCC))
$(call exim-config-add,HOSTCFLAGS,$(HOSTCFLAGS))
$(EXIM_REMOVE_LIBNSL_FROM_MAKEFILE)
$(EXIM_FIX_IP_OPTIONS_FOR_MUSL)
endef
ifneq ($(call qstrip,$(BR2_PACKAGE_EXIM_CUSTOM_CONFIG_FILE)),)
define EXIM_CONFIGURE_CMDS
$(EXIM_USE_CUSTOM_CONFIG_FILE)
$(EXIM_CONFIGURE_TOOLCHAIN)
endef
else
define EXIM_CONFIGURE_CMDS
$(EXIM_USE_DEFAULT_CONFIG_FILE)
$(EXIM_USE_DEFAULT_CONFIG_FILE_DOVECOT)
$(EXIM_USE_DEFAULT_CONFIG_FILE_CLAMAV)
$(EXIM_USE_DEFAULT_CONFIG_FILE_OPENSSL)
$(EXIM_CONFIGURE_TOOLCHAIN)
endef
endif
ifeq ($(BR2_STATIC_LIBS),y)
EXIM_STATIC_FLAGS = LFLAGS="-pthread --static"
endif
define EXIM_BUILD_CMDS
$(TARGET_MAKE_ENV) build=br $(MAKE1) -C $(@D) $(EXIM_STATIC_FLAGS)
endef
define EXIM_INSTALL_TARGET_CMDS
DESTDIR=$(TARGET_DIR) INSTALL_ARG="-no_chown -no_symlink" build=br \
$(MAKE1) -C $(@D) $(EXIM_STATIC_FLAGS) 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
define EXIM_INSTALL_INIT_SYSTEMD
$(INSTALL) -D -m 644 package/exim/exim.service \
$(TARGET_DIR)/usr/lib/systemd/system/exim.service
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
ln -sf ../../../../usr/lib/systemd/system/exim.service \
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/exim.service
endef
$(eval $(generic-package))
|