blob: 3c42d64aba6e9d3b87d7702aa0ba03cfdffae5e3 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001include $(TOPDIR)/rules.mk
2
3PKG_NAME:=libbsd
4PKG_VERSION:=0.11.8
5PKG_RELEASE:=1
6
7PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
8PKG_SOURCE_URL:=https://libbsd.freedesktop.org/releases
9PKG_HASH:=55fdfa2696fb4d55a592fa9ad14a9df897c7b0008ddb3b30c419914841f85f33
10
11PKG_LICENSE:=BSD-4-Clause
12PKG_LICENSE_FILES:=COPYING
13PKG_CPE_ID:=cpe:/a:freedesktop:libbsd
14
15PKG_INSTALL:=1
16PKG_BUILD_PARALLEL:=1
17PKG_BUILD_DEPENDS := libmd
18PKG_FIXUP:=autoreconf
19
20include $(INCLUDE_DIR)/package.mk
21
22define Package/libbsd
23 SECTION:=libs
24 CATEGORY:=Libraries
25 TITLE:=common BSD library
26 ABI_VERSION:=0
27endef
28
29define Package/libbsd/description
30 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.
31endef
32
33TARGET_CFLAGS += -D_LARGEFILE64_SOURCE
34
35define Build/InstallDev
36 $(INSTALL_DIR) $(1)/usr/lib
37 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
38 $(INSTALL_DIR) $(1)/usr/include
39 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbsd.{la,so*} $(1)/usr/lib/
40 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libbsd*.pc $(1)/usr/lib/pkgconfig/
41 $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
42endef
43
44define Package/libbsd/install
45 $(INSTALL_DIR) $(1)/usr/lib
46 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbsd.so.* $(1)/usr/lib/
47endef
48
49$(eval $(call BuildPackage,libbsd))