Makefile 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=popt
  9. PKG_VERSION:=1.19
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=http://ftp.rpm.org/popt/releases/popt-1.x/
  13. PKG_HASH:=c25a4838fc8e4c1c8aacb8bd620edb3084a3d63bf8987fdad3ca2758c63240f9
  14. PKG_LICENSE:=MIT
  15. PKG_FIXUP:=autoreconf
  16. PKG_REMOVE_FILES:=autogen.sh aclocal.m4
  17. PKG_INSTALL:=1
  18. PKG_BUILD_PARALLEL:=1
  19. include $(INCLUDE_DIR)/package.mk
  20. TARGET_CFLAGS += $(FPIC)
  21. define Package/libpopt
  22. SECTION:=libs
  23. CATEGORY:=Libraries
  24. TITLE:=A command line option parsing library
  25. URL:=https://github.com/rpm-software-management/popt
  26. ABI_VERSION:=0
  27. endef
  28. CONFIGURE_ARGS += --enable-shared --enable-static
  29. define Build/InstallDev
  30. $(INSTALL_DIR) $(1)/usr/include
  31. $(CP) $(PKG_INSTALL_DIR)/usr/include/popt.h $(1)/usr/include/
  32. $(INSTALL_DIR) $(1)/usr/lib
  33. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpopt.{a,so*} $(1)/usr/lib/
  34. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  35. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/popt.pc $(1)/usr/lib/pkgconfig/
  36. endef
  37. define Package/libpopt/install
  38. $(INSTALL_DIR) $(1)/usr/lib
  39. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpopt.so.* $(1)/usr/lib/
  40. endef
  41. $(eval $(call BuildPackage,libpopt))