This repository has been archived by the owner on Jan 31, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
ssmtp.mk
109 lines (79 loc) · 2.6 KB
/
ssmtp.mk
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
########################################################
# ssmtp with ssl support for uClinux and Asterisk,
# Ming C.(Vincent) Li Feb 2009
#
# make -f libssl.mk libssl-package
# make -f ssmtp.mk ssmtp-package
#
# Run after "make -f libssl.mk libssl"
#########################################################
include rules.mk
SSMTP_SITE=http://ftp.de.debian.org/debian/pool/main/s/ssmtp
SSMTP_VERSION=2.62
SSMTP_SOURCE=ssmtp_$(SSMTP_VERSION).orig.tar.gz
SSMTP_UNZIP=zcat
SSMTP_DIR=$(BUILD_DIR)/ssmtp
TARGET_DIR=$(BUILD_DIR)/tmp/ssmtp/ipkg/ssmtp
PKG_NAME:=ssmtp
PKG_VERSION:=$(SSMTP_VERSION)
PKG_RELEASE:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/tmp/ssmtp
STAGING_INC=$(STAGING_DIR)/usr/include
STAGING_LIB=$(STAGING_DIR)/usr/lib
export CFLAGS = -I$(STAGING_DIR)/usr/include
export LDFLAGS = -L$(STAGING_DIR)/usr/lib
export CC=bfin-linux-uclibc-gcc
SSMTP_CONFIGURE_OPTS=--host=bfin-linux-uclibc \
--target=bfin-linux-uclibc \
--enable-ssl \
--libdir=$(LDFLAGS) \
--prefix=/
$(DL_DIR)/$(SSMTP_SOURCE):
$(WGET) -P $(DL_DIR) $(SSMTP_SITE)/$(SSMTP_SOURCE)
$(SSMTP_DIR)/.unpacked: $(DL_DIR)/$(SSMTP_SOURCE)
$(SSMTP_UNZIP) $(DL_DIR)/$(SSMTP_SOURCE) | \
tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
$(PATCH_KERNEL) $(SSMTP_DIR) patch ssmtp.patch
touch $(SSMTP_DIR)/.unpacked
$(SSMTP_DIR)/.configured: $(SSMTP_DIR)/.unpacked
cd $(SSMTP_DIR); \
./configure $(SSMTP_CONFIGURE_OPTS)
touch $(SSMTP_DIR)/.configured
ssmtp: $(SSMTP_DIR)/.configured
$(MAKE) -C $(SSMTP_DIR)
rm -Rf $(TARGET_DIR)
mkdir -p $(TARGET_DIR)
mkdir -p $(TARGET_DIR)/bin
mkdir -p $(TARGET_DIR)/etc/ssmtp
cp -v $(SSMTP_DIR)/ssmtp $(TARGET_DIR)/bin/
cp -v $(SSMTP_DIR)/ssmtp.conf $(TARGET_DIR)/etc/ssmtp/
mkdir -p $(TARGET_DIR)/usr/doc
cp -v doc/ssmtp.txt $(TARGET_DIR)/usr/doc
touch $(PKG_BUILD_DIR)/.built
all: ssmtp
dirclean:
rm -rf $(SSMTP_DIR)
#---------------------------------------------------------------------------
# CREATING PACKAGE
#---------------------------------------------------------------------------
define Package/ssmtp
SECTION:=network
CATEGORY:=Applications
TITLE:=SSMTP
DEPENDS:=libssl
DESCRIPTION:=\
extremely simple MTA to get mail off the system to a mail hub
URL:=http://ftp.de.debian.org/debian/pool/main/s/ssmtp/ssmtp_2.62.orig.tar.gz
ARCHITECTURE:=bfin-uclinux
endef
# post installation - add the sym link for auto start
define Package/ssmtp/postinst
#!/bin/sh
endef
# pre-remove - remove sym link
define Package/ssmtp/prerm
#!/bin/sh
rm -rf /bin/ssmtp
endef
$(eval $(call BuildPackage,ssmtp))
ssmtp-package: ssmtp $(PACKAGE_DIR)/ssmtp_$(VERSION)_$(PKGARCH).ipk