libjson-c: Update package URL
[openwrt/openwrt.git] / package / libs / libjson-c / Makefile
1 #
2 # Copyright (C) 2006-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:=json-c
11 PKG_VERSION:=0.12.1
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-nodoc.tar.gz
15 PKG_SOURCE_URL:=https://s3.amazonaws.com/json-c_releases/releases/
16 PKG_HASH:=5a617da9aade997938197ef0f8aabd7f97b670c216dc173977e1d56eef9e1291
17 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
18 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
19
20 PKG_LICENSE:=MIT
21 PKG_LICENSE_FILES:=COPYING
22 PKG_CPE_ID:=cpe:/a:json-c_project:json-c
23
24 PKG_FIXUP:=autoreconf
25 PKG_INSTALL:=1
26
27 PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
28
29 include $(INCLUDE_DIR)/package.mk
30 include $(INCLUDE_DIR)/host-build.mk
31
32 TARGET_CFLAGS += $(FPIC) -Wno-implicit-fallthrough
33 HOST_CFLAGS += -Wno-implicit-fallthrough
34
35 define Package/libjson-c
36 SECTION:=libs
37 CATEGORY:=Libraries
38 TITLE:=javascript object notation
39 URL:=https://json-c.github.io/json-c/
40 endef
41
42 define Package/libjson-c/description
43 This package contains a library for javascript object notation backends.
44 endef
45
46 define Build/InstallDev
47 $(INSTALL_DIR) $(1)/usr/include
48 $(CP) $(PKG_INSTALL_DIR)/usr/include/json-c $(1)/usr/include/
49 $(INSTALL_DIR) $(1)/usr/lib
50 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjson-c.{a,so*} $(1)/usr/lib/
51 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
52 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/json-c.pc $(1)/usr/lib/pkgconfig/
53 endef
54
55 define Package/libjson-c/install
56 $(INSTALL_DIR) $(1)/usr/lib
57 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjson-c.so.* $(1)/usr/lib/
58 endef
59
60 $(eval $(call BuildPackage,libjson-c))
61 $(eval $(call HostBuild))