Browse Source

Add libstrophe : XMPP client library

Config.in for libxml2/expat XML library choice

Signed-off-by: Chih-Wei Chen <changeway@gmail.com>
changeway 9 years ago
parent
commit
ce13ffa1d6
2 changed files with 79 additions and 0 deletions
  1. 14
    0
      libs/libstrophe/Config.in
  2. 65
    0
      libs/libstrophe/Makefile

+ 14
- 0
libs/libstrophe/Config.in View File

1
+choice
2
+	depends on PACKAGE_libstrophe
3
+	prompt "Select XML library"
4
+	default libstrophe-expat
5
+
6
+config libstrophe-expat
7
+	bool "expat"
8
+	select PACKAGE_libexpat
9
+
10
+config libstrophe-libxml2
11
+	bool "libxml2"
12
+	select PACKAGE_libxml2
13
+
14
+endchoice

+ 65
- 0
libs/libstrophe/Makefile View File

1
+#
2
+# Copyright (C) 2015 OpenWrt.org
3
+#
4
+# This is free software, licensed under the GNU General Public License v2.
5
+# See /LICENSE for more information.
6
+#
7
+
8
+include $(TOPDIR)/rules.mk
9
+
10
+PKG_NAME:=libstrophe
11
+PKG_VERSION:=0.8.7
12
+PKG_RELEASE=1
13
+
14
+PKG_LICENSE:=GPL-3.0
15
+PKG_LICENSE_FILES:=COPYING
16
+PKG_MAINTAINER:=Chih-Wei Chen <changeway@gmail.com>
17
+
18
+PKG_SOURCE_URL:=https://github.com/strophe/libstrophe/archive/
19
+PKG_SOURCE:=$(PKG_VERSION).tar.gz
20
+
21
+PKG_FIXUP:=autoreconf
22
+PKG_INSTALL:=1
23
+
24
+PKG_CONFIG_DEPENDS:= \
25
+	CONFIG_libstrophe-libxml2 \
26
+	CONFIG_libstrophe-expat
27
+
28
+include $(INCLUDE_DIR)/package.mk
29
+
30
+ifeq ($(CONFIG_libstrophe-libxml2),y)
31
+CONFIGURE_ARGS += \
32
+	--with-libxml2
33
+endif
34
+
35
+define Package/libstrophe
36
+	SECTION:=libs
37
+	CATEGORY:=Libraries
38
+	TITLE:=XMPP client library
39
+	URL:=http://strophe.im/libstrophe
40
+	DEPENDS:= +libopenssl +libstrophe-libxml2:libxml2 +libstrophe-expat:libexpat
41
+	MENU:=1
42
+endef
43
+
44
+define Package/libstrophe/description
45
+	A simple, lightweight C library for writing XMPP clients
46
+endef
47
+
48
+define Package/libstrophe/config
49
+	source "$(SOURCE)/Config.in"
50
+endef
51
+
52
+define Build/InstallDev
53
+	$(INSTALL_DIR) $(1)/usr/
54
+	$(CP) $(PKG_INSTALL_DIR)/usr/include/ $(1)/usr/
55
+
56
+	$(INSTALL_DIR) $(1)/usr/lib/
57
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libstrophe.{la,a,so*} $(1)/usr/lib/
58
+endef
59
+
60
+define Package/libstrophe/install
61
+	$(INSTALL_DIR) $(1)/usr/lib/
62
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libstrophe.so.* $(1)/usr/lib
63
+endef
64
+
65
+$(eval $(call BuildPackage,libstrophe))