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.

90 lines
2.0 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:=9a
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)src.v$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=http://www.ijg.org/files
  13. PKG_MD5SUM:=3353992aecaee1805ef4109aadd433e7
  14. PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
  15. PKG_LICENSE:=IJG
  16. PKG_LICENSE_FILES:=README
  17. PKG_BUILD_PARALLEL:=1
  18. PKG_BUILD_DEPENDS:=libltdl
  19. include $(INCLUDE_DIR)/host-build.mk
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/jpeg/Default
  22. TITLE:=The Independent JPEG Group's JPEG
  23. URL:=http://www.ijg.org/
  24. endef
  25. define Package/libjpeg
  26. $(call Package/jpeg/Default)
  27. SECTION:=libs
  28. CATEGORY:=Libraries
  29. TITLE+= runtime library
  30. endef
  31. define Package/jpeg-tools
  32. $(call Package/jpeg/Default)
  33. SECTION:=utils
  34. CATEGORY:=Utilities
  35. DEPENDS:=+libjpeg
  36. TITLE+= manipulation tools
  37. endef
  38. TARGET_CFLAGS += $(FPIC)
  39. CONFIGURE_ARGS += \
  40. --enable-shared \
  41. --enable-static \
  42. HOST_CONFIGURE_ARGS += \
  43. --enable-shared \
  44. --enable-static \
  45. define Build/Compile
  46. +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
  47. LIBTOOL="./libtool --tag=CC" \
  48. prefix="$(PKG_INSTALL_DIR)/usr" \
  49. exec_prefix="$(PKG_INSTALL_DIR)/usr" \
  50. all
  51. $(MAKE) -C $(PKG_BUILD_DIR) \
  52. DESTDIR="$(PKG_INSTALL_DIR)" \
  53. install
  54. endef
  55. define Build/InstallDev
  56. $(INSTALL_DIR) $(1)/usr/include
  57. $(CP) $(PKG_INSTALL_DIR)/usr/include/jpeglib.h $(1)/usr/include/
  58. $(CP) $(PKG_BUILD_DIR)/jpegint.h $(1)/usr/include/
  59. $(CP) $(PKG_INSTALL_DIR)/usr/include/j{config,error,morecfg}.h $(1)/usr/include/
  60. $(INSTALL_DIR) $(1)/usr/lib
  61. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjpeg.{a,so*} $(1)/usr/lib/
  62. endef
  63. define Package/libjpeg/install
  64. $(INSTALL_DIR) $(1)/usr/lib
  65. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjpeg.so.* $(1)/usr/lib/
  66. endef
  67. define Package/jpeg-tools/install
  68. $(INSTALL_DIR) $(1)/usr/bin
  69. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/*jpeg* $(1)/usr/bin/
  70. endef
  71. $(eval $(call HostBuild))
  72. $(eval $(call BuildPackage,libjpeg))
  73. $(eval $(call BuildPackage,jpeg-tools))