Hi, please make a PR to https://github.com/openwrt/packages Le 1 juil. 2014 02:53, "Federico Di Marco" <[email protected]> a écrit :
> From: Federico Di Marco <[email protected]> > > Body of explanation: > A new package has been added in packages feed under net/emailrelay > directory, porting a simple SMTP proxy and store-and-forward message > transfer agent (MTA) called EmailRelay (please see > http://emailrelay.sourceforge.net/) to OpenWRT. > The patch consists of the following files: > - Makefile: standard makefile of OpenWRT packages which downloads from > sourceforge the source code and compiles it into a package using the > uClibc++. > - Makefile.libstdc++: alternative makefile to perform compilation with > the standard c++ library. > - files/emailrelay.auth: configuration file for emailrelay > - files/emailrelay.init: simple shell script for managing service > installation and startup. > > > Sign-off: > Developer's Certificate of Origin 1.1 > > By making a contribution to this project, I certify that: > > (a) The contribution was created in whole or in part by me and I > have the right to submit it under the open source license > indicated in the file; or > > (b) The contribution is based upon previous work that, to the best > of my knowledge, is covered under an appropriate open source > license and I have the right under that license to submit that > work with modifications, whether created in whole or in part > by me, under the same open source license (unless I am > permitted to submit under a different license), as indicated > in the file; or > > (c) The contribution was provided directly to me by some other > person who certified (a), (b) or (c) and I have not modified > it. > > (d) I understand and agree that this project and the contribution > are public and that a record of the contribution (including all > personal information I submit with it, including my sign-off) is > maintained indefinitely and may be redistributed consistent with > this project or the open source license(s) involved. > > Signed-off-by: Federico Di Marco <[email protected]> > > --- > > Diff output (according to > https://dev.openwrt.org/wiki/SubmittingPatches/Diff) > > diff -uprN packages/net/emailrelay/files/emailrelay.auth > mypackages/net/emailrelay/files/emailrelay.auth > --- packages/net/emailrelay/files/emailrelay.auth 1970-01-01 > 01:00:00.000000000 +0100 > +++ mypackages/net/emailrelay/files/emailrelay.auth 2014-07-01 > 01:56:20.297997383 +0200 > @@ -0,0 +1,16 @@ > +# > +# emailrelay secrets file > +# > +#see http://emailrelay.sourceforge.net/reference.html for reference > + > +#Mostly used options: > +# > +#NONE server specifies ip address range allowed to connect to > emailrelay SMTP server > +#LOGIN client specifies the credentials to be used when forwarding > emails to another SMTP server > +#LOGIN server specifies the credentials to be needed to authenticate > with the emailrelay SMTP server > + > +#Examples: > +# > +#NONE server 192.168.1.* keyword > +#LOGIN client smtpuser@smtpserver smtppassword > +#LOGIN server user1 secret > \ No newline at end of file > diff -uprN packages/net/emailrelay/files/emailrelay.init > mypackages/net/emailrelay/files/emailrelay.init > --- packages/net/emailrelay/files/emailrelay.init 1970-01-01 > 01:00:00.000000000 +0100 > +++ mypackages/net/emailrelay/files/emailrelay.init 2014-07-01 > 01:56:20.293997264 +0200 > @@ -0,0 +1,15 @@ > +#!/bin/sh /etc/rc.common > +#see http://emailrelay.sourceforge.net/reference.html for command > line reference > + > +START=90 > + > + > +start() { > + logger -t 'emailrelay' "Starting emailrelay service." > + service_start emailrelay --as-server --poll 60 --forward-to > smtpserver:smtpport --spool-dir /tmp --client-tls --client-auth > /etc/emailrelay.auth --server-auth /etc/emailrelay.auth --log > +} > + > +stop() { > + logger -t 'emailrelay' "Stopping emailrelay service." > + killall -9 emailrelay > +} > diff -uprN packages/net/emailrelay/Makefile > mypackages/net/emailrelay/Makefile > --- packages/net/emailrelay/Makefile 1970-01-01 01:00:00.000000000 +0100 > +++ mypackages/net/emailrelay/Makefile 2014-07-01 01:56:20.297997383 +0200 > @@ -0,0 +1,75 @@ > +# > +# Copyright (C) 2006-2011 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:=emailrelay > +PKG_VERSION:=1.9 > +PKG_RELEASE:=1 > + > +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-src.tar.gz > +PKG_SOURCE_URL:=@SF/emailrelay/$(PKG_VERSION) > +PKG_MD5SUM:=0892fbf993407c6b5a16f96e23299b62 > +PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install > +PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) > +PKG_CAT :=zcat > + > +include $(INCLUDE_DIR)/package.mk > + > +define Package/emailrelay > + SECTION:=net > + CATEGORY:=Network > + DEPENDS:=+uclibcxx +libopenssl > + SUBMENU:=Web Servers/Proxies > + TITLE:=A simple SMTP proxy and store-and-forward message transfer > agent (MTA). > + URL:=http://emailrelay.sourceforge.net/ > +endef > + > + > +define Package/emailrelay/description > + Simple SMTP proxy and store-and-forward message transfer agent (MTA). > + > + When running as a proxy all e-mail messages can be passed through > + a user-defined program, such as a spam filter, which can drop, > + re-address or edit messages as they pass through. When running > + as a store-and-forward MTA incoming messages are stored in a > + local spool directory, and then forwarded to the next SMTP > + server on request. > +endef > + > + > +define Package/emailrelay/conffiles > +/etc/emailrelay.auth > +endef > + > + > + > +CONFIGURE_VARS += \ > + CXXFLAGS="-nostdinc++" \ > + LDFLAGS="-nodefaultlibs" \ > + LIBS="-lgcc -lc -luClibc++ -lgcc_s" > + > + > +define Build/Configure > + $(call Build/Configure/Default,--with-openssl) > + endef > + > +define Package/emailrelay/install > + $(INSTALL_DIR) $(1)/usr/bin > + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/main/emailrelay $(1)/usr/bin/ > + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/main/emailrelay-filter-copy > $(1)/usr/bin/ > + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/main/emailrelay-passwd $(1)/usr/bin/ > + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/main/emailrelay-poke $(1)/usr/bin/ > + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/main/emailrelay-submit $(1)/usr/bin/ > + $(INSTALL_DIR) $(1)/etc > + $(INSTALL_DATA) files/$(PKG_NAME).auth $(1)/etc/ > + $(INSTALL_DIR) $(1)/etc/init.d > + $(INSTALL_BIN) files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME) > +endef > + > +$(eval $(call BuildPackage,emailrelay)) > diff -uprN packages/net/emailrelay/Makefile.libstdc++ > mypackages/net/emailrelay/Makefile.libstdc++ > --- packages/net/emailrelay/Makefile.libstdc++ 1970-01-01 > 01:00:00.000000000 +0100 > +++ mypackages/net/emailrelay/Makefile.libstdc++ 2014-07-01 > 01:56:20.293997264 +0200 > @@ -0,0 +1,52 @@ > +# > +# Copyright (C) 2006-2011 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:=emailrelay > +PKG_VERSION:=1.9 > +PKG_RELEASE:=1 > + > +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-src.tar.gz > +PKG_SOURCE_URL:=@SF/emailrelay/$(PKG_VERSION) > +PKG_MD5SUM:=0892fbf993407c6b5a16f96e23299b62 > +PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install > +PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) > +#PKG_INSTALL:=1 > +PKG_CAT :=zcat > + > +#include $(INCLUDE_DIR)/uclibc++.mk > +include $(INCLUDE_DIR)/package.mk > + > +define Package/emailrelay > + SECTION:=net > + CATEGORY:=Network > + DEPENDS:=$(CXX_DEPENDS) +libopenssl > + SUBMENU:=Web Servers/Proxies > + TITLE:=A simple SMTP proxy and store-and-forward message transfer > agent (MTA). > + URL:=http://emailrelay.sourceforge.net/ > +endef > + > +#define Package/srelay/conffiles > +#/etc/emailrelay.auth > +#endef > + > +define Build/Configure > + $(call Build/Configure/Default,--with-openssl=$(STAGING_DIR)) > + endef > + > + > +define Package/emailrelay/install > + $(INSTALL_DIR) $(1)/usr/bin > + $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/bin/ > + $(INSTALL_DIR) $(1)/etc > +# $(INSTALL_DATA) files/$(PKG_NAME).conf $(1)/etc/ > + $(INSTALL_DIR) $(1)/etc/init.d > +# $(INSTALL_BIN) files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME) > +endef > + > +$(eval $(call BuildPackage,emailrelay)) > _______________________________________________ > openwrt-devel mailing list > [email protected] > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel >
_______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
