[packages] massive: use $(INSTALL_DIR) instead of 'mkdir -p' in install and InstallDev
[openwrt/svn-archive/archive.git] / libs / gd / 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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=gd
11 PKG_VERSION:=2.0.35
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=http://www.libgd.org/releases
16 PKG_MD5SUM:=6c6c3dbb7bf079e0bb5fbbfd3bb8a71c
17
18 PKG_FIXUP = libtool
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/libgd
23 SECTION:=libs
24 CATEGORY:=Libraries
25 DEPENDS:=+libjpeg +libpng
26 TITLE:=The GD graphics library
27 URL:=http://www.boutell.com/gd/
28 endef
29
30 define Package/libgd/description
31 GD is an open source code library for the dynamic creation of images by
32 programmers. GD creates PNG, JPEG and GIF images, among other formats.
33 endef
34
35 CONFIGURE_ARGS += \
36 --enable-shared \
37 --enable-static \
38 --disable-rpath \
39 --without-x \
40 --without-freetype \
41 --with-jpeg=$(STAGING_DIR)/usr \
42 --with-png=$(STAGING_DIR)/usr \
43 --without-xpm \
44 --without-iconv
45
46 CONFIGURE_VARS += \
47 LIBPNG12_CONFIG="$(STAGING_DIR)/host/bin/libpng12-config"
48
49 TARGET_CFLAGS += $(FPIC)
50
51 define Build/Configure
52 ( cd $(PKG_BUILD_DIR); aclocal; libtoolize; autoreconf; );
53 $(call Build/Configure/Default)
54 endef
55
56 define Build/Compile
57 $(MAKE) -C $(PKG_BUILD_DIR) \
58 DESTDIR="$(PKG_INSTALL_DIR)" \
59 all install
60 endef
61
62 define Build/InstallDev
63 $(INSTALL_DIR) $(1)/usr/bin
64 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gdlib-config $(1)/usr/bin/
65 $(INSTALL_DIR) $(1)/usr/include
66 $(CP) $(PKG_INSTALL_DIR)/usr/include/entities.h $(1)/usr/include/
67 $(CP) $(PKG_INSTALL_DIR)/usr/include/gd{,_io,cache,fontg,fontl,fontmb,fonts,fontt,fx}.h \
68 $(1)/usr/include/
69 $(INSTALL_DIR) $(1)/usr/lib
70 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgd.{a,so*} $(1)/usr/lib/
71 $(SED) 's,-I$$$${prefix}/include,,g' $(1)/usr/bin/gdlib-config
72 endef
73
74 define Package/libgd/install
75 $(INSTALL_DIR) $(1)/usr/lib
76 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgd.so.* $(1)/usr/lib/
77 endef
78
79 $(eval $(call BuildPackage,libgd))