Merge pull request #4853 from StevenHessing/noddos
[feed/packages.git] / libs / hiredis / Makefile
1 #
2 # Copyright (C) 2010-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:=hiredis
11 PKG_VERSION:=0.13.3
12 PKG_RELEASE:=1
13
14 PKG_SOURCE_PROTO:=git
15 PKG_SOURCE_URL:=https://github.com/redis/hiredis.git
16 PKG_SOURCE_VERSION:=010756025e8cefd1bc66c6d4ed3b1648ef6f1f95
17 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
18 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
19 PKG_MIRROR_HASH:=ac774e318215cbfad4b8e493a84b4fe9a03f9882828ea01eac5357f28b5e9cd4
20
21 PKG_LICENSE:=BSD-3-Clause
22 PKG_LICENSE_FILES:=COPYING
23 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
24
25 PKG_INSTALL:=1
26
27 include $(INCLUDE_DIR)/package.mk
28
29 define Package/libhiredis
30 SECTION:=libs
31 CATEGORY:=Libraries
32 TITLE:=Minimalistic C client for Redis
33 URL:=https://github.com/redis/hiredis
34 endef
35
36 define Package/libhiredis/description
37 Hiredis is a minimalistic C client library for the Redis database.
38 endef
39
40 MAKE_FLAGS += ARCH="" DEBUG="" PREFIX="/usr"
41
42 define Build/InstallDev
43 $(INSTALL_DIR) $(1)/usr/include/hiredis/adapters
44 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/hiredis/adapters/* $(1)/usr/include/hiredis/adapters
45 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/hiredis/*.h $(1)/usr/include/hiredis/
46 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
47 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libhiredis.{so*,a} $(1)/usr/lib/
48 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/hiredis.pc $(1)/usr/lib/pkgconfig
49 endef
50
51 define Package/libhiredis/install
52 $(INSTALL_DIR) $(1)/usr/lib/
53 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libhiredis.so* $(1)/usr/lib/
54 endef
55
56 $(eval $(call BuildPackage,libhiredis))