1
0

Makefile 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. #
  2. # Copyright (C) 2007-2008 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:=bzip2
  9. PKG_VERSION:=1.0.6
  10. PKG_RELEASE:=4
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=http://www.bzip.org/$(PKG_VERSION)
  13. PKG_HASH:=a2848f34fcd5d6cf47def00461fcb528a0484d8edef8208d6d2e2909dc61d9cd
  14. PKG_MAINTAINER:=Steven Barth <cyrus@openwrt.org>
  15. PKG_LICENSE:=BZIP2
  16. PKG_LICENSE_FILES:=LICENSE
  17. PKG_CPE_ID:=cpe:/a:bzip:bzip2
  18. include $(INCLUDE_DIR)/host-build.mk
  19. include $(INCLUDE_DIR)/package.mk
  20. define Package/bzip2/Default
  21. SUBMENU:=Compression
  22. URL:=http://www.bzip.org/
  23. endef
  24. define Package/libbz2
  25. $(call Package/bzip2/Default)
  26. SECTION:=libs
  27. CATEGORY:=Libraries
  28. DEPENDS:=
  29. TITLE:=bzip2 library.
  30. endef
  31. define Package/libbz2/description
  32. bzip2 is a freely available, patent free, high-quality
  33. data compressor. This packages provides libbz2 library.
  34. endef
  35. define Package/bzip2
  36. $(call Package/bzip2/Default)
  37. SECTION:=utils
  38. CATEGORY:=Utilities
  39. DEPENDS:=+libbz2
  40. TITLE:=bzip2 is a compression utility.
  41. endef
  42. define Package/bzip2/description
  43. bzip2 is a freely available, patent free, high-quality
  44. data compressor. This package provides the binary.
  45. endef
  46. TARGET_CFLAGS += \
  47. $(FPIC) \
  48. $(TARGET_LDFLAGS)
  49. CONFIGURE_ARGS += --prefix=/usr
  50. MAKE_FLAGS += \
  51. -f Makefile-libbz2_so \
  52. CFLAGS="$(TARGET_CFLAGS)" \
  53. all
  54. define Build/InstallDev
  55. $(INSTALL_DIR) $(1)/usr/include
  56. $(CP) $(PKG_BUILD_DIR)/bzlib.h $(1)/usr/include/
  57. $(INSTALL_DIR) $(1)/usr/lib
  58. $(CP) $(PKG_BUILD_DIR)/libbz2.so.$(PKG_VERSION) $(1)/usr/lib/
  59. $(LN) libbz2.so.$(PKG_VERSION) $(1)/usr/lib/libbz2.so.1.0
  60. $(LN) libbz2.so.$(PKG_VERSION) $(1)/usr/lib/libbz2.so
  61. endef
  62. define Package/libbz2/install
  63. $(INSTALL_DIR) $(1)/usr/lib/
  64. $(CP) $(PKG_BUILD_DIR)/libbz2.so.$(PKG_VERSION) $(1)/usr/lib/
  65. $(LN) libbz2.so.$(PKG_VERSION) $(1)/usr/lib/libbz2.so.1.0
  66. endef
  67. define Package/bzip2/install
  68. $(INSTALL_DIR) $(1)/usr/bin/
  69. $(INSTALL_BIN) $(PKG_BUILD_DIR)/bzip2-shared $(1)/usr/bin/bzip2
  70. $(INSTALL_DIR) $(1)/bin/
  71. $(LN) ../usr/bin/bzip2 $(1)/bin/bzip2
  72. endef
  73. HOST_CFLAGS += \
  74. $(FPIC) \
  75. $(HOST_LDFLAGS)
  76. HOST_MAKE_FLAGS+= \
  77. CFLAGS="$(HOST_CFLAGS)" \
  78. all
  79. HOST_CONFIGURE_ARGS+= \
  80. --prefix=$(STAGING_DIR_HOSTPKG)
  81. define Host/Install
  82. $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin/
  83. $(MAKE) -C $(HOST_BUILD_DIR) PREFIX=$(STAGING_DIR_HOSTPKG)/ install
  84. endef
  85. $(eval $(call HostBuild))
  86. $(eval $(call BuildPackage,libbz2))
  87. $(eval $(call BuildPackage,bzip2))