Pārlūkot izejas kodu

libesmtp: streamline makefile

Signed-off-by: Othmar Truniger <github@truniger.ch>
Othmar Truniger 10 gadus atpakaļ
vecāks
revīzija
7ae9c98341
1 mainītis faili ar 17 papildinājumiem un 28 dzēšanām
  1. 17
    28
      libs/libesmtp/Makefile

+ 17
- 28
libs/libesmtp/Makefile Parādīt failu

@@ -1,5 +1,5 @@
1 1
 #
2
-# Copyright (C) 2008-2014 OpenWrt.org
2
+# Copyright (C) 2008-2015 OpenWrt.org
3 3
 #
4 4
 # This is free software, licensed under the GNU General Public License v2.
5 5
 # See /LICENSE for more information.
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
9 9
 
10 10
 PKG_NAME:=libesmtp
11 11
 PKG_VERSION:=1.0.6
12
-PKG_RELEASE:=1
12
+PKG_RELEASE:=2
13 13
 PKG_MD5SUM:=c4fedc999b6c3820296b0eb92cc2e252
14 14
 
15 15
 PKG_MAINTAINER:=Othmar Truniger <github@truniger.ch>
@@ -19,6 +19,9 @@ PKG_LICENSE_FILES:=COPYING
19 19
 PKG_SOURCE_URL:=http://www.stafford.uklinux.net/libesmtp
20 20
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
21 21
 
22
+PKG_BUILD_PARALLEL:=1
23
+PKG_INSTALL:=1
24
+
22 25
 include $(INCLUDE_DIR)/package.mk
23 26
 
24 27
 define Package/libesmtp
@@ -29,38 +32,24 @@ define Package/libesmtp
29 32
   DEPENDS:=+libpthread
30 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 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 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 49
 endef
61 50
 
62 51
 define Package/libesmtp/install
63
-	mkdir -p $(1)/usr/lib
52
+	$(INSTALL_DIR)  $(1)/usr/lib
64 53
 	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libesmtp.so.* $(1)/usr/lib/
65 54
 endef
66 55