Makefile 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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:=1
  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. endef
  30. define Build/Configure
  31. $(call Build/Configure/Default, \
  32. --enable-shared \
  33. --enable-static \
  34. )
  35. endef
  36. define Build/InstallDev
  37. $(INSTALL_DIR) $(1)/usr/include
  38. $(CP) $(PKG_INSTALL_DIR)/usr/include/popt.h $(1)/usr/include/
  39. $(INSTALL_DIR) $(1)/usr/lib
  40. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpopt.{a,so*} $(1)/usr/lib/
  41. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  42. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/popt.pc $(1)/usr/lib/pkgconfig/
  43. endef
  44. define Package/libpopt/install
  45. $(INSTALL_DIR) $(1)/usr/lib
  46. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpopt.so.* $(1)/usr/lib/
  47. endef
  48. $(eval $(call BuildPackage,libpopt))