Makefile 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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.7
  10. PKG_RELEASE:=5
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=http://downloads.openwrt.org/sources/
  13. PKG_MD5SUM:=5988e7aeb0ae4dac8d83561265984cc9
  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:=http://rpm5.org/files/popt/
  26. endef
  27. define Build/Configure
  28. $(call Build/Configure/Default, \
  29. --enable-shared \
  30. --enable-static \
  31. )
  32. endef
  33. define Build/InstallDev
  34. $(INSTALL_DIR) $(1)/usr/include
  35. $(CP) $(PKG_INSTALL_DIR)/usr/include/popt.h $(1)/usr/include/
  36. $(INSTALL_DIR) $(1)/usr/lib
  37. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpopt.{a,so*} $(1)/usr/lib/
  38. endef
  39. define Package/libpopt/install
  40. $(INSTALL_DIR) $(1)/usr/lib
  41. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpopt.so.* $(1)/usr/lib/
  42. endef
  43. $(eval $(call RequireCommand,xgettext, \
  44. $(PKG_NAME) requires the GNU gettext development package installed on the local system to build. \
  45. ))
  46. $(eval $(call BuildPackage,libpopt))