Makefile 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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.16
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:= \
  13. http://distfiles.gentoo.org/distfiles/ \
  14. http://distcache.freebsd.org/ports-distfiles/ \
  15. http://rpm5.org/files/popt/
  16. PKG_HASH:=e728ed296fe9f069a0e005003c3d6b2dde3d9cad453422a10d6558616d304cc8
  17. PKG_LICENSE:=MIT
  18. PKG_FIXUP:=autoreconf
  19. PKG_REMOVE_FILES:=autogen.sh aclocal.m4
  20. PKG_INSTALL:=1
  21. PKG_BUILD_PARALLEL:=1
  22. include $(INCLUDE_DIR)/package.mk
  23. TARGET_CFLAGS += $(FPIC)
  24. define Package/libpopt
  25. SECTION:=libs
  26. CATEGORY:=Libraries
  27. TITLE:=A command line option parsing library
  28. URL:=http://rpm5.org/files/popt/
  29. ABI_VERSION:=0
  30. endef
  31. CONFIGURE_ARGS += --enable-shared --enable-static
  32. define Build/InstallDev
  33. $(INSTALL_DIR) $(1)/usr/include
  34. $(CP) $(PKG_INSTALL_DIR)/usr/include/popt.h $(1)/usr/include/
  35. $(INSTALL_DIR) $(1)/usr/lib
  36. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpopt.{a,so*} $(1)/usr/lib/
  37. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  38. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/popt.pc $(1)/usr/lib/pkgconfig/
  39. endef
  40. define Package/libpopt/install
  41. $(INSTALL_DIR) $(1)/usr/lib
  42. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpopt.so.* $(1)/usr/lib/
  43. endef
  44. $(eval $(call BuildPackage,libpopt))