Aucune description

Makefile 1.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. #
  2. # Copyright (C) 2008-2014 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=libesmtp
  9. PKG_VERSION:=1.0.6
  10. PKG_RELEASE:=1
  11. PKG_MD5SUM:=c4fedc999b6c3820296b0eb92cc2e252
  12. PKG_MAINTAINER:=Othmar Truniger <github@truniger.ch>
  13. PKG_LICENSE:=LGPL-2.0+
  14. PKG_LICENSE_FILES:=COPYING
  15. PKG_SOURCE_URL:=http://www.stafford.uklinux.net/libesmtp
  16. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  17. PKG_CAT:=zcat
  18. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
  19. PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/libesmtp
  22. SECTION:=libs
  23. CATEGORY:=Libraries
  24. TITLE:=A Library for Posting Electronic Mail
  25. URL:=http://www.stafford.uklinux.net/libesmtp/
  26. DEPENDS:=+libpthread
  27. endef
  28. define Build/Configure
  29. $(call Build/Configure/Default,--without-openssl)
  30. endef
  31. define Build/Compile
  32. $(MAKE) -C $(PKG_BUILD_DIR) \
  33. DESTDIR="$(PKG_INSTALL_DIR)" \
  34. all install
  35. endef
  36. define Build/InstallDev
  37. mkdir -p $(STAGING_DIR)/usr/include
  38. $(CP) $(PKG_INSTALL_DIR)/usr/include/libesmtp.h $(STAGING_DIR)/usr/include/
  39. $(CP) $(PKG_INSTALL_DIR)/usr/include/auth-client.h $(STAGING_DIR)/usr/include/
  40. $(CP) $(PKG_INSTALL_DIR)/usr/include/auth-plugin.h $(STAGING_DIR)/usr/include/
  41. mkdir -p $(STAGING_DIR)/usr/lib
  42. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libesmtp.{a,so*} $(STAGING_DIR)/usr/lib/
  43. $(INSTALL_DIR) $(2)/bin
  44. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/libesmtp-config $(2)/bin/
  45. $(SED) 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' $(2)/bin/libesmtp-config
  46. endef
  47. define Build/UninstallDev
  48. rm -rf \
  49. $(STAGING_DIR)/usr/include/libesmtp.h \
  50. $(STAGING_DIR)/usr/include/auth-client.h \
  51. $(STAGING_DIR)/usr/include/auth-plugin.h \
  52. $(STAGING_DIR)/usr/lib/libesmtp.{a,so*}
  53. endef
  54. define Package/libesmtp/install
  55. mkdir -p $(1)/usr/lib
  56. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libesmtp.so.* $(1)/usr/lib/
  57. endef
  58. $(eval $(call BuildPackage,libesmtp))