Browse Source

libesmtp: streamline makefile

Signed-off-by: Othmar Truniger <github@truniger.ch>
Othmar Truniger 10 years ago
parent
commit
7ae9c98341
1 changed files with 17 additions and 28 deletions
  1. 17
    28
      libs/libesmtp/Makefile

+ 17
- 28
libs/libesmtp/Makefile View File

1
 #
1
 #
2
-# Copyright (C) 2008-2014 OpenWrt.org
2
+# Copyright (C) 2008-2015 OpenWrt.org
3
 #
3
 #
4
 # This is free software, licensed under the GNU General Public License v2.
4
 # This is free software, licensed under the GNU General Public License v2.
5
 # See /LICENSE for more information.
5
 # See /LICENSE for more information.
9
 
9
 
10
 PKG_NAME:=libesmtp
10
 PKG_NAME:=libesmtp
11
 PKG_VERSION:=1.0.6
11
 PKG_VERSION:=1.0.6
12
-PKG_RELEASE:=1
12
+PKG_RELEASE:=2
13
 PKG_MD5SUM:=c4fedc999b6c3820296b0eb92cc2e252
13
 PKG_MD5SUM:=c4fedc999b6c3820296b0eb92cc2e252
14
 
14
 
15
 PKG_MAINTAINER:=Othmar Truniger <github@truniger.ch>
15
 PKG_MAINTAINER:=Othmar Truniger <github@truniger.ch>
19
 PKG_SOURCE_URL:=http://www.stafford.uklinux.net/libesmtp
19
 PKG_SOURCE_URL:=http://www.stafford.uklinux.net/libesmtp
20
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
20
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
21
 
21
 
22
+PKG_BUILD_PARALLEL:=1
23
+PKG_INSTALL:=1
24
+
22
 include $(INCLUDE_DIR)/package.mk
25
 include $(INCLUDE_DIR)/package.mk
23
 
26
 
24
 define Package/libesmtp
27
 define Package/libesmtp
29
   DEPENDS:=+libpthread
32
   DEPENDS:=+libpthread
30
 endef
33
 endef
31
 
34
 
32
-define Build/Configure
33
-	$(call Build/Configure/Default,--without-openssl)
34
-endef
35
-
36
-define Build/Compile
37
-	$(MAKE) -C $(PKG_BUILD_DIR) \
38
-		DESTDIR="$(PKG_INSTALL_DIR)" \
39
-		all install
40
-endef
35
+CONFIGURE_ARGS += \
36
+	--without-openssl
41
 
37
 
42
 define Build/InstallDev
38
 define Build/InstallDev
43
-	mkdir -p $(STAGING_DIR)/usr/include
44
-	$(CP) $(PKG_INSTALL_DIR)/usr/include/libesmtp.h $(STAGING_DIR)/usr/include/
45
-	$(CP) $(PKG_INSTALL_DIR)/usr/include/auth-client.h $(STAGING_DIR)/usr/include/
46
-	$(CP) $(PKG_INSTALL_DIR)/usr/include/auth-plugin.h $(STAGING_DIR)/usr/include/
47
-	mkdir -p $(STAGING_DIR)/usr/lib
48
-	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libesmtp.{a,so*} $(STAGING_DIR)/usr/lib/
39
+	$(INSTALL_DIR) $(1)/usr/bin
40
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/libesmtp-config $(1)/usr/bin/
41
+	$(SED) 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' $(1)/usr/bin/libesmtp-config
42
+
43
+	$(INSTALL_DIR) $(1)/usr/include
44
+	$(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
45
+	$(INSTALL_DIR) $(1)/usr/lib
46
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libesmtp.{a,so*} $(1)/usr/lib/
49
 	$(INSTALL_DIR) $(2)/bin
47
 	$(INSTALL_DIR) $(2)/bin
50
-	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/libesmtp-config $(2)/bin/
51
-	$(SED) 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' $(2)/bin/libesmtp-config
52
-endef
53
-
54
-define Build/UninstallDev
55
-	rm -rf \
56
-		$(STAGING_DIR)/usr/include/libesmtp.h \
57
-		$(STAGING_DIR)/usr/include/auth-client.h \
58
-		$(STAGING_DIR)/usr/include/auth-plugin.h \
59
-		$(STAGING_DIR)/usr/lib/libesmtp.{a,so*}
48
+	$(LN) ../../usr/bin/libesmtp-config $(2)/bin/
60
 endef
49
 endef
61
 
50
 
62
 define Package/libesmtp/install
51
 define Package/libesmtp/install
63
-	mkdir -p $(1)/usr/lib
52
+	$(INSTALL_DIR)  $(1)/usr/lib
64
 	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libesmtp.so.* $(1)/usr/lib/
53
 	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libesmtp.so.* $(1)/usr/lib/
65
 endef
54
 endef
66
 
55