Makefile 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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_FIXUP:=autoreconf
  15. PKG_REMOVE_FILES:=autogen.sh aclocal.m4
  16. PKG_INSTALL:=1
  17. PKG_BUILD_PARALLEL:=1
  18. include $(INCLUDE_DIR)/package.mk
  19. TARGET_CFLAGS += $(FPIC)
  20. define Package/libpopt
  21. SECTION:=libs
  22. CATEGORY:=Libraries
  23. TITLE:=A command line option parsing library
  24. URL:=http://rpm5.org/files/popt/
  25. endef
  26. define Build/Configure
  27. $(call Build/Configure/Default, \
  28. --enable-shared \
  29. --enable-static \
  30. )
  31. endef
  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. endef
  38. define Package/libpopt/install
  39. $(INSTALL_DIR) $(1)/usr/lib
  40. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpopt.so.* $(1)/usr/lib/
  41. endef
  42. $(eval $(call RequireCommand,xgettext, \
  43. $(PKG_NAME) requires the GNU gettext development package installed on the local system to build. \
  44. ))
  45. $(eval $(call BuildPackage,libpopt))