Makefile 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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:=http://rpm5.org/files/popt/
  13. PKG_MD5SUM:=3743beefa3dd6247a73f8f7a32c14c33
  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. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  39. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/popt.pc $(1)/usr/lib/pkgconfig/
  40. endef
  41. define Package/libpopt/install
  42. $(INSTALL_DIR) $(1)/usr/lib
  43. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpopt.so.* $(1)/usr/lib/
  44. endef
  45. $(eval $(call RequireCommand,xgettext, \
  46. $(PKG_NAME) requires the GNU gettext development package installed on the local system to build. \
  47. ))
  48. $(eval $(call BuildPackage,libpopt))