1
0

Makefile 2.5 KB

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