2 # Copyright (C) 2008-2016 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
14 PKG_MAINTAINER:=Othmar Truniger <github@truniger.ch>
15 PKG_LICENSE:=LGPL-2.0+
16 PKG_LICENSE_FILES:=COPYING
19 PKG_SOURCE_URL:=https://github.com/tru7/libesmtp.git
20 PKG_SOURCE_VERSION=10e9a6df9f76da610941addf71b9a3cbf94f2e9f
21 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
22 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
27 include $(INCLUDE_DIR)/package.mk
29 define Package/libesmtp
32 TITLE:=A Library for Posting Electronic Mail
33 URL:=https://github.com/tru7/libesmtp.git
34 DEPENDS:=+libpthread +libopenssl
37 define Build/InstallDev
38 $(INSTALL_DIR) $(1)/usr/bin
39 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/libesmtp-config $(1)/usr/bin/
40 $(SED) 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' $(1)/usr/bin/libesmtp-config
42 $(INSTALL_DIR) $(1)/usr/include
43 $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
44 $(INSTALL_DIR) $(1)/usr/lib
45 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libesmtp.{a,so*} $(1)/usr/lib/
46 $(INSTALL_DIR) $(2)/bin
47 $(LN) ../../usr/bin/libesmtp-config $(2)/bin/
50 define Package/libesmtp/install
51 $(INSTALL_DIR) $(1)/usr/lib
52 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libesmtp.so.* $(1)/usr/lib/
55 $(eval $(call BuildPackage,libesmtp))