2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
14 PKG_SOURCE:=$(PKG_NAME)src.v$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://www.ijg.org/files/ \
16 ftp://ftp.uu.net/graphics/jpeg/
17 PKG_MD5SUM:=dbd5f3b47ed13132f04c685d608a7547
21 include $(INCLUDE_DIR)/package.mk
23 define Package/jpeg/Default
24 TITLE:=The Independent JPEG Group's JPEG
25 URL:=http://www.ijg.org/
28 define Package/libjpeg
29 $(call Package/jpeg/Default)
32 TITLE+= runtime library
35 define Package/jpeg-tools
36 $(call Package/jpeg/Default)
40 TITLE+= manipulation tools
43 TARGET_CFLAGS += $(FPIC)
50 $(call Build/Prepare/Default)
51 # replace the old upstream libtool stuff with our own
52 ln -sf $(STAGING_DIR)/host/bin/libtool $(PKG_BUILD_DIR)/
53 ln -sf $(STAGING_DIR)/host/share/libtool/config.sub $(PKG_BUILD_DIR)/
54 ln -sf $(STAGING_DIR)/host/share/libtool/config.guess $(PKG_BUILD_DIR)/
55 ln -sf $(STAGING_DIR)/host/share/libtool/ltmain.sh $(PKG_BUILD_DIR)/
56 ln -sf /bin/true $(PKG_BUILD_DIR)/ltconfig
60 rm -rf $(PKG_INSTALL_DIR)
61 mkdir -p $(PKG_INSTALL_DIR)/usr/{include,lib,bin,man/man1}
62 $(MAKE) -C $(PKG_BUILD_DIR) \
63 LIBTOOL="./libtool --tag=CC" \
64 prefix="$(PKG_INSTALL_DIR)/usr" \
65 exec_prefix="$(PKG_INSTALL_DIR)/usr" \
66 all install install-headers install-lib
69 define Build/InstallDev
70 mkdir -p $(1)/usr/include
71 $(CP) $(PKG_INSTALL_DIR)/usr/include/jpeglib.h $(1)/usr/include/
72 $(CP) $(PKG_BUILD_DIR)/jpegint.h $(1)/usr/include/
73 $(CP) $(PKG_INSTALL_DIR)/usr/include/j{config,error,morecfg}.h $(1)/usr/include/
75 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjpeg.{a,so*} $(1)/usr/lib/
78 define Package/libjpeg/install
79 $(INSTALL_DIR) $(1)/usr/lib
80 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjpeg.so.* $(1)/usr/lib/
83 define Package/jpeg-tools/install
84 $(INSTALL_DIR) $(1)/usr/bin
85 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/*jpeg* $(1)/usr/bin/
88 $(eval $(call BuildPackage,libjpeg))
89 $(eval $(call BuildPackage,jpeg-tools))