b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame] | 1 | # |
| 2 | # Copyright (C) 2006-2010 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:=popt |
| 11 | PKG_VERSION:=1.19 |
| 12 | PKG_RELEASE:=1 |
| 13 | |
| 14 | PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz |
| 15 | PKG_SOURCE_URL:=http://ftp.rpm.org/popt/releases/popt-1.x/ |
| 16 | PKG_HASH:=c25a4838fc8e4c1c8aacb8bd620edb3084a3d63bf8987fdad3ca2758c63240f9 |
| 17 | PKG_LICENSE:=MIT |
| 18 | PKG_CPE_ID:=cpe:/a:popt_project:popt |
| 19 | |
| 20 | PKG_FIXUP:=autoreconf |
| 21 | PKG_REMOVE_FILES:=autogen.sh aclocal.m4 |
| 22 | |
| 23 | PKG_INSTALL:=1 |
| 24 | PKG_BUILD_PARALLEL:=1 |
| 25 | |
| 26 | include $(INCLUDE_DIR)/package.mk |
| 27 | |
| 28 | TARGET_CFLAGS += $(FPIC) |
| 29 | |
| 30 | define Package/libpopt |
| 31 | SECTION:=libs |
| 32 | CATEGORY:=Libraries |
| 33 | TITLE:=A command line option parsing library |
| 34 | URL:=https://github.com/rpm-software-management/popt |
| 35 | ABI_VERSION:=0 |
| 36 | endef |
| 37 | |
| 38 | CONFIGURE_ARGS += --enable-shared --enable-static |
| 39 | |
| 40 | define Build/InstallDev |
| 41 | $(INSTALL_DIR) $(1)/usr/include |
| 42 | $(CP) $(PKG_INSTALL_DIR)/usr/include/popt.h $(1)/usr/include/ |
| 43 | $(INSTALL_DIR) $(1)/usr/lib |
| 44 | $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpopt.{a,so*} $(1)/usr/lib/ |
| 45 | $(INSTALL_DIR) $(1)/usr/lib/pkgconfig |
| 46 | $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/popt.pc $(1)/usr/lib/pkgconfig/ |
| 47 | endef |
| 48 | |
| 49 | define Package/libpopt/install |
| 50 | $(INSTALL_DIR) $(1)/usr/lib |
| 51 | $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpopt.so.* $(1)/usr/lib/ |
| 52 | endef |
| 53 | |
| 54 | $(eval $(call BuildPackage,libpopt)) |
| 55 | |