move curl back to packages
[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 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=gd
12 PKG_VERSION:=2.0.33
13 PKG_RELEASE:=2
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://www.boutell.com/gd/http
17 PKG_MD5SUM:=be0a6d326cd8567e736fbc75df0a5c45
18
19 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
20 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/libgd
25 SECTION:=libs
26 CATEGORY:=Libraries
27 DEPENDS:=+libjpeg +libpng
28 TITLE:=The GD graphics library
29 URL:=http://www.boutell.com/gd/
30 endef
31
32 define Build/Configure
33 $(call Build/Configure/Default, \
34 --enable-shared \
35 --enable-static \
36 --disable-rpath \
37 --without-x \
38 --without-freetype \
39 --with-jpeg=$(STAGING_DIR)/usr \
40 --with-png=$(STAGING_DIR)/usr \
41 --without-xpm \
42 , \
43 LIBPNG12_CONFIG="$(STAGING_DIR)/usr/bin/libpng12-config" \
44 )
45 endef
46
47 define Build/Compile
48 $(MAKE) -C $(PKG_BUILD_DIR) \
49 DESTDIR="$(PKG_INSTALL_DIR)" \
50 all install
51 endef
52
53 define Build/InstallDev
54 mkdir -p $(1)/usr/bin
55 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gdlib-config $(1)/usr/bin/
56 mkdir -p $(1)/usr/include
57 $(CP) $(PKG_INSTALL_DIR)/usr/include/entities.h $(1)/usr/include/
58 $(CP) $(PKG_INSTALL_DIR)/usr/include/gd{,_io,cache,fontg,fontl,fontmb,fonts,fontt,fx}.h \
59 $(1)/usr/include/
60 mkdir -p $(1)/usr/lib
61 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgd.{a,so*} $(1)/usr/lib/
62 $(SED) 's,-I$$$${prefix}/include,,g' $(1)/usr/bin/gdlib-config
63 endef
64
65 define Package/libgd/install
66 $(INSTALL_DIR) $(1)/usr/lib
67 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgd.so.* $(1)/usr/lib/
68 endef
69
70 $(eval $(call BuildPackage,libgd))