libsearpc: use commit hash in version instead of release tag
[feed/packages.git] / libs / libsearpc / Makefile
1 #
2 # Copyright (C) 2007-2014 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:=3.1.7
12 PKG_RELEASE=$(PKG_SOURCE_VERSION)
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
26 define Package/libsearpc
27 SECTION:=libs
28 CATEGORY:=Libraries
29 TITLE:=Seafile RPC Library
30 MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
31 URL:=http://seafile.com/
32 DEPENDS:=+glib2 +jansson +python $(ICONV_DEPENDS)
33 endef
34
35 define Package/libsearpc/description
36 Searpc is a simple C language RPC framework based on GObject system.
37 Searpc handles the serialization/deserialization part of RPC,
38 the transport part is left to users.
39 endef
40
41 CONFIGURE_ARGS += --enable-compile-demo=no \
42 --disable-server-pkg
43
44 TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib -liconv
45
46 include $(INCLUDE_DIR)/host-build.mk
47
48 define Host/Configure
49 endef
50
51 define Host/Compile
52 endef
53
54 define Host/Install
55 $(INSTALL_DIR) $(STAGING_DIR_HOST)/bin
56 $(INSTALL_BIN) $(HOST_BUILD_DIR)/lib/searpc-codegen.py $(STAGING_DIR_HOST)/bin/
57 endef
58
59 $(eval $(call HostBuild))
60
61 define Build/InstallDev
62 $(INSTALL_DIR) $(1)/usr/{bin,include}
63 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
64 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsearpc.so* $(1)/usr/lib/
65 $(CP) $(PKG_INSTALL_DIR)/usr/include/searpc* $(1)/usr/include/
66 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libsearpc.pc $(1)/usr/lib/pkgconfig/
67 $(CP) $(PKG_INSTALL_DIR)/usr/bin/searpc-codegen.py $(1)/usr/bin/
68 endef
69
70 define Package/libsearpc/install
71 $(INSTALL_DIR) $(1)/usr/lib
72 $(INSTALL_DIR) $(1)/usr/lib/python2.7/site-packages
73 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsearpc.so* $(1)/usr/lib/
74 $(CP) $(PKG_INSTALL_DIR)/usr/lib/python2.7/site-packages/pysearpc $(1)/usr/lib/python2.7/site-packages/
75 endef
76
77 $(eval $(call BuildPackage,libsearpc))