remove UninstallDev
[openwrt/svn-archive/archive.git] / libs / jpeg / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=jpeg
12 PKG_VERSION:=6b
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)src.v$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://www.ijg.org/files/ \
17 ftp://ftp.uu.net/graphics/jpeg/
18 PKG_MD5SUM:=dbd5f3b47ed13132f04c685d608a7547
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 PKG_BUILD_DEPENDS:=libtool
24
25 include $(INCLUDE_DIR)/package.mk
26
27 define Package/jpeg/Default
28 TITLE:=The Independent JPEG Group's JPEG
29 URL:=http://www.ijg.org/
30 endef
31
32 define Package/libjpeg
33 $(call Package/jpeg/Default)
34 SECTION:=libs
35 CATEGORY:=Libraries
36 TITLE+= runtime library
37 endef
38
39 define Package/jpeg-tools
40 $(call Package/jpeg/Default)
41 SECTION:=utils
42 CATEGORY:=Utilities
43 DEPENDS:=+libjpeg
44 TITLE+= manipulation tools
45 endef
46
47 CONFIGURE_ARGS += \
48 --enable-shared \
49 --enable-static \
50
51 define Build/Prepare
52 $(call Build/Prepare/Default)
53 # replace the old upstream libtool stuff with our own
54 ln -sf $(STAGING_DIR_HOST)/bin/libtool $(PKG_BUILD_DIR)/
55 ln -sf $(STAGING_DIR)/usr/share/libtool/config.guess $(PKG_BUILD_DIR)/
56 ln -sf /bin/true $(PKG_BUILD_DIR)/ltconfig
57 endef
58
59 define Build/Configure
60 $(call Build/Configure/Default,)
61 endef
62
63 define Build/Compile
64 rm -rf $(PKG_INSTALL_DIR)
65 mkdir -p $(PKG_INSTALL_DIR)/usr/{include,lib,bin,man/man1}
66 $(MAKE) -C $(PKG_BUILD_DIR) \
67 LIBTOOL="./libtool --tag=CC" \
68 prefix="$(PKG_INSTALL_DIR)/usr" \
69 exec_prefix="$(PKG_INSTALL_DIR)/usr" \
70 all install install-headers install-lib
71 endef
72
73 define Build/InstallDev
74 mkdir -p $(1)/usr/include
75 $(CP) $(PKG_INSTALL_DIR)/usr/include/jpeglib.h $(1)/usr/include/
76 $(CP) $(PKG_BUILD_DIR)/jpegint.h $(1)/usr/include/
77 $(CP) $(PKG_INSTALL_DIR)/usr/include/j{config,error,morecfg}.h $(1)/usr/include/
78 mkdir -p $(1)/usr/lib
79 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjpeg.{a,so*} $(1)/usr/lib/
80 endef
81
82 define Package/libjpeg/install
83 $(INSTALL_DIR) $(1)/usr/lib
84 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjpeg.so.* $(1)/usr/lib/
85 endef
86
87 define Package/jpeg-tools/install
88 $(INSTALL_DIR) $(1)/usr/bin
89 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/*jpeg* $(1)/usr/bin/
90 endef
91
92 $(eval $(call BuildPackage,libjpeg))
93 $(eval $(call BuildPackage,jpeg-tools))