added libtiff
[openwrt/svn-archive/archive.git] / libs / tiff / 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 # blogic@openwrt.org
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=tiff
12 PKG_VERSION:=3.8.2
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:= http://libtiff.maptools.org/dl/
17
18 include $(INCLUDE_DIR)/package.mk
19
20 CONFIGURE_ARGS_XTRA+=--without-x
21
22 define Package/libtiff
23 SECTION:=libs
24 CATEGORY:=libs
25 SUBMENU:=libraries
26 TITLE:=TIFF libraries
27 DEPENDS:=+zlib +libjpeg
28 endef
29
30 define Build/Configure
31 (cd $(PKG_BUILD_DIR)/$(CONFIGURE_PATH); \
32 if [ -x $(CONFIGURE_CMD) ]; then \
33 $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/ && \
34 $(CONFIGURE_VARS) \
35 $(CONFIGURE_CMD) \
36 $(CONFIGURE_ARGS_XTRA) \
37 $(CONFIGURE_ARGS) ;\
38 fi \
39 )
40 endef
41
42 define Build/Compile
43 $(MAKE) -C $(PKG_BUILD_DIR)
44 $(MAKE) -C $(PKG_BUILD_DIR)/ install DESTDIR=$(PKG_INSTALL_DIR)
45 endef
46
47 define Build/InstallDev
48 $(INSTALL_DIR) $(STAGING_DIR)/usr/{lib,include}
49 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib* $(STAGING_DIR)/usr/lib
50 $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(STAGING_DIR)/usr/include/
51 $(SED) "s,"libdir\=\'/usr/lib\'",libdir='$(STAGING_DIR)/usr/lib\'," $(STAGING_DIR)/usr/lib/libtif{f,fxx}.la
52 endef
53
54 define Package/tiff/Install
55 $(INSTALL_DIR) $(1)/usr/lib
56 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*so* $(1)/usr/lib/
57 endef
58
59 $(eval $(call BuildPackage,libtiff))