noddos: Noddos v0.5.0 with mDNS / DNS-SD support
[feed/packages.git] / libs / libsearpc / Makefile
1 #
2 # Copyright (C) 2007-2017 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:=libsearpc
11 PKG_VERSION:=6.0.7
12 PKG_RELEASE=$(PKG_SOURCE_VERSION)-1
13 PKG_LICENSE:=GPL-3.0
14
15 PKG_SOURCE_PROTO:=git
16 PKG_SOURCE_URL:=https://github.com/haiwen/libsearpc.git
17 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
18 PKG_SOURCE_VERSION:=8998e7b2c5587f0b94c48db24e2952d08def5add
19 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
20 PKG_FIXUP:=autoreconf
21 PKG_INSTALL:=1
22
23 include $(INCLUDE_DIR)/package.mk
24 include $(INCLUDE_DIR)/nls.mk
25 $(call include_mk, python-package.mk)
26
27 define Package/libsearpc
28 SECTION:=libs
29 CATEGORY:=Libraries
30 TITLE:=Seafile RPC Library
31 MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
32 URL:=http://seafile.com/
33 DEPENDS:=+glib2 +jansson +python $(ICONV_DEPENDS)
34 endef
35
36 define Package/libsearpc/description
37 Searpc is a simple C language RPC framework based on GObject system.
38 Searpc handles the serialization/deserialization part of RPC,
39 the transport part is left to users.
40 endef
41
42 CONFIGURE_ARGS += --enable-compile-demo=no \
43 --disable-server-pkg
44
45 TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib -liconv
46
47 define Build/InstallDev
48 $(INSTALL_DIR) $(1)/usr/{bin,include}
49 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
50 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsearpc.so* $(1)/usr/lib/
51 $(CP) $(PKG_INSTALL_DIR)/usr/include/searpc* $(1)/usr/include/
52 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libsearpc.pc $(1)/usr/lib/pkgconfig/
53 $(CP) $(PKG_INSTALL_DIR)/usr/bin/searpc-codegen.py $(1)/usr/bin/
54 endef
55
56 define Package/libsearpc/install
57 $(INSTALL_DIR) $(1)/usr/lib
58 $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
59 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsearpc.so* $(1)/usr/lib/
60 $(CP) $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/pysearpc $(1)$(PYTHON_PKG_DIR)
61 find $(1) -name "*\.pyc" -o -name "*\.pyo" | xargs rm -f
62 endef
63
64 $(eval $(call BuildPackage,libsearpc))