First Commit
[librecmc/package-feed.git] / libs / libstrophe / Makefile
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.9.1
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 PKG_MD5SUM:=2db62ab21187785ec5f870adc33b74e5
21
22 PKG_FIXUP:=autoreconf
23 PKG_INSTALL:=1
24
25 PKG_CONFIG_DEPENDS:= \
26         CONFIG_libstrophe-libxml2 \
27         CONFIG_libstrophe-expat
28
29 include $(INCLUDE_DIR)/package.mk
30
31 ifeq ($(CONFIG_libstrophe-libxml2),y)
32 CONFIGURE_ARGS += \
33         --with-libxml2
34 endif
35
36 define Package/libstrophe
37         SECTION:=libs
38         CATEGORY:=Libraries
39         TITLE:=XMPP client library
40         URL:=http://strophe.im/libstrophe
41         DEPENDS:= +libopenssl +libstrophe-libxml2:libxml2 +libstrophe-expat:libexpat
42         MENU:=1
43 endef
44
45 define Package/libstrophe/description
46         A simple, lightweight C library for writing XMPP clients
47 endef
48
49 define Package/libstrophe/config
50         source "$(SOURCE)/Config.in"
51 endef
52
53 define Build/InstallDev
54         $(INSTALL_DIR) $(1)/usr/
55         $(CP) $(PKG_INSTALL_DIR)/usr/include/ $(1)/usr/
56
57         $(INSTALL_DIR) $(1)/usr/lib/
58         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libstrophe.{la,a,so*} $(1)/usr/lib/
59 endef
60
61 define Package/libstrophe/install
62         $(INSTALL_DIR) $(1)/usr/lib/
63         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libstrophe.so.* $(1)/usr/lib
64 endef
65
66 $(eval $(call BuildPackage,libstrophe))