You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

100 lines
2.3 KiB

  1. #
  2. # Copyright (C) 2006-2014 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:=jpeg
  9. PKG_VERSION:=6b
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)src.v$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=@SF/libjpeg
  13. PKG_MD5SUM:=dbd5f3b47ed13132f04c685d608a7547
  14. PKG_LICENSE:=IJG
  15. PKG_LICENSE_FILES:=README
  16. PKG_BUILD_PARALLEL:=1
  17. PKG_BUILD_DEPENDS:=libltdl
  18. include $(INCLUDE_DIR)/host-build.mk
  19. include $(INCLUDE_DIR)/package.mk
  20. define Package/jpeg/Default
  21. TITLE:=The Independent JPEG Group's JPEG
  22. URL:=http://www.ijg.org/
  23. endef
  24. define Package/libjpeg
  25. $(call Package/jpeg/Default)
  26. SECTION:=libs
  27. CATEGORY:=Libraries
  28. TITLE+= runtime library
  29. endef
  30. define Package/jpeg-tools
  31. $(call Package/jpeg/Default)
  32. SECTION:=utils
  33. CATEGORY:=Utilities
  34. DEPENDS:=+libjpeg
  35. TITLE+= manipulation tools
  36. endef
  37. TARGET_CFLAGS += $(FPIC)
  38. CONFIGURE_ARGS += \
  39. --enable-shared \
  40. --enable-static \
  41. HOST_CONFIGURE_ARGS += \
  42. --enable-shared \
  43. --enable-static \
  44. define Build/Prepare
  45. $(call Build/Prepare/Default)
  46. (cd $(PKG_BUILD_DIR); \
  47. rm -f ltconfig ltmain.sh libtool; \
  48. ln -s `which true` ltconfig; \
  49. ln -s $(STAGING_DIR)/host/bin/libtool libtool; \
  50. )
  51. endef
  52. define Build/Compile
  53. $(INSTALL_DIR) $(PKG_INSTALL_DIR)/usr/{include,lib,bin,man/man1}
  54. +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
  55. LIBTOOL="./libtool --tag=CC" \
  56. prefix="$(PKG_INSTALL_DIR)/usr" \
  57. exec_prefix="$(PKG_INSTALL_DIR)/usr" \
  58. all
  59. $(MAKE) -C $(PKG_BUILD_DIR) \
  60. prefix="$(PKG_INSTALL_DIR)/usr" \
  61. exec_prefix="$(PKG_INSTALL_DIR)/usr" \
  62. install install-headers install-lib
  63. endef
  64. define Build/InstallDev
  65. $(INSTALL_DIR) $(1)/usr/include
  66. $(CP) $(PKG_INSTALL_DIR)/usr/include/jpeglib.h $(1)/usr/include/
  67. $(CP) $(PKG_BUILD_DIR)/jpegint.h $(1)/usr/include/
  68. $(CP) $(PKG_INSTALL_DIR)/usr/include/j{config,error,morecfg}.h $(1)/usr/include/
  69. $(INSTALL_DIR) $(1)/usr/lib
  70. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjpeg.{a,so*} $(1)/usr/lib/
  71. endef
  72. define Package/libjpeg/install
  73. $(INSTALL_DIR) $(1)/usr/lib
  74. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjpeg.so.* $(1)/usr/lib/
  75. endef
  76. define Package/jpeg-tools/install
  77. $(INSTALL_DIR) $(1)/usr/bin
  78. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/*jpeg* $(1)/usr/bin/
  79. endef
  80. $(eval $(call HostBuild))
  81. $(eval $(call BuildPackage,libjpeg))
  82. $(eval $(call BuildPackage,jpeg-tools))