1872e3ce30f3b536bbe3ac822592eb856ca4f7cd
[openwrt/staging/jow.git] / package / libs / libbsd / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME:=libbsd
4 PKG_VERSION:=0.11.7
5 PKG_RELEASE:=2
6
7 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
8 PKG_SOURCE_URL:=https://libbsd.freedesktop.org/releases
9 PKG_HASH:=9baa186059ebbf25c06308e9f991fda31f7183c0f24931826d83aa6abd8a0261
10
11 PKG_LICENSE:=BSD-4-Clause
12 PKG_LICENSE_FILES:=COPYING
13
14 PKG_INSTALL:=1
15 PKG_BUILD_PARALLEL:=1
16 PKG_BUILD_DEPENDS := libmd
17 PKG_FIXUP:=autoreconf
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/libbsd
22 SECTION:=libs
23 CATEGORY:=Libraries
24 TITLE:=common BSD library
25 ABI_VERSION:=0
26 endef
27
28 define Package/libbsd/description
29 This library provides useful functions commonly found on BSD systems, and lacking on others like GNU systems, thus making it easier to port projects with strong BSD origins, without needing to embed the same code over and over again on each project.
30 endef
31
32 TARGET_CFLAGS += -D_LARGEFILE64_SOURCE
33
34 define Build/InstallDev
35 $(INSTALL_DIR) $(1)/usr/lib
36 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
37 $(INSTALL_DIR) $(1)/usr/include
38 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbsd.{la,so*} $(1)/usr/lib/
39 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libbsd*.pc $(1)/usr/lib/pkgconfig/
40 $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
41 endef
42
43 define Package/libbsd/install
44 $(INSTALL_DIR) $(1)/usr/lib
45 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbsd.so.* $(1)/usr/lib/
46 endef
47
48 $(eval $(call BuildPackage,libbsd))