blob: ba9c82349bb5d7c02189a374e8a894565b1291cb [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001#
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
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=popt
11PKG_VERSION:=1.19
12PKG_RELEASE:=1
13
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15PKG_SOURCE_URL:=http://ftp.rpm.org/popt/releases/popt-1.x/
16PKG_HASH:=c25a4838fc8e4c1c8aacb8bd620edb3084a3d63bf8987fdad3ca2758c63240f9
17PKG_LICENSE:=MIT
18PKG_CPE_ID:=cpe:/a:popt_project:popt
19
20PKG_FIXUP:=autoreconf
21PKG_REMOVE_FILES:=autogen.sh aclocal.m4
22
23PKG_INSTALL:=1
24PKG_BUILD_PARALLEL:=1
25
26include $(INCLUDE_DIR)/package.mk
27
28TARGET_CFLAGS += $(FPIC)
29
30define 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
36endef
37
38CONFIGURE_ARGS += --enable-shared --enable-static
39
40define 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/
47endef
48
49define Package/libpopt/install
50 $(INSTALL_DIR) $(1)/usr/lib
51 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpopt.so.* $(1)/usr/lib/
52endef
53
54$(eval $(call BuildPackage,libpopt))
55