Merge pull request #4853 from StevenHessing/noddos
[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_MIRROR_HASH:=125f40beb7d310e65571cb0d93f157b196e83423fde69bebf9880ca1cfac6c46
21 PKG_FIXUP:=autoreconf
22 PKG_INSTALL:=1
23
24 include $(INCLUDE_DIR)/package.mk
25 include $(INCLUDE_DIR)/nls.mk
26 $(call include_mk, python-package.mk)
27
28 define Package/libsearpc
29 SECTION:=libs
30 CATEGORY:=Libraries
31 TITLE:=Seafile RPC Library
32 MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
33 URL:=http://seafile.com/
34 DEPENDS:=+glib2 +jansson +python $(ICONV_DEPENDS)
35 endef
36
37 define Package/libsearpc/description
38 Searpc is a simple C language RPC framework based on GObject system.
39 Searpc handles the serialization/deserialization part of RPC,
40 the transport part is left to users.
41 endef
42
43 CONFIGURE_ARGS += --enable-compile-demo=no \
44 --disable-server-pkg
45
46 TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib -liconv
47
48 define Build/InstallDev
49 $(INSTALL_DIR) $(1)/usr/{bin,include}
50 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
51 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsearpc.so* $(1)/usr/lib/
52 $(CP) $(PKG_INSTALL_DIR)/usr/include/searpc* $(1)/usr/include/
53 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libsearpc.pc $(1)/usr/lib/pkgconfig/
54 $(CP) $(PKG_INSTALL_DIR)/usr/bin/searpc-codegen.py $(1)/usr/bin/
55 endef
56
57 define Package/libsearpc/install
58 $(INSTALL_DIR) $(1)/usr/lib
59 $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
60 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsearpc.so* $(1)/usr/lib/
61 $(CP) $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/pysearpc $(1)$(PYTHON_PKG_DIR)
62 find $(1) -name "*\.pyc" -o -name "*\.pyo" | xargs rm -f
63 endef
64
65 $(eval $(call BuildPackage,libsearpc))