Update makefiles to use the autotools stuff put in the template, remove bogus stamp...
[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 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/libgd
26 SECTION:=libs
27 CATEGORY:=Libraries
28 DEPENDS:=+libjpeg +libpng
29 TITLE:=The GD graphics library
30 URL:=http://www.boutell.com/gd/
31 endef
32
33 define Build/Configure
34 $(call Build/Configure/Default, \
35 --enable-shared \
36 --enable-static \
37 --disable-rpath \
38 --with-gnu-ld \
39 --without-x \
40 --without-freetype \
41 --with-jpeg=$(STAGING_DIR)/usr \
42 --with-png=$(STAGING_DIR)/usr \
43 --without-xpm \
44 , \
45 LIBPNG12_CONFIG="$(STAGING_DIR)/usr/bin/libpng12-config" \
46 )
47 endef
48
49 define Build/Compile
50 $(MAKE) -C $(PKG_BUILD_DIR) \
51 DESTDIR="$(PKG_INSTALL_DIR)" \
52 all install
53 endef
54
55 define Build/InstallDev
56 mkdir -p $(STAGING_DIR)/usr/bin
57 $(CP) $(PKG_INSTALL_DIR)/usr/bin/gdlib-config $(STAGING_DIR)/usr/bin/
58 mkdir -p $(STAGING_DIR)/usr/include
59 $(CP) $(PKG_INSTALL_DIR)/usr/include/entities.h $(STAGING_DIR)/usr/include/
60 $(CP) $(PKG_INSTALL_DIR)/usr/include/gd{,_io,cache,fontg,fontl,fontmb,fonts,fontt,fx}.h \
61 $(STAGING_DIR)/usr/include/
62 mkdir -p $(STAGING_DIR)/usr/lib
63 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgd.{a,so*} $(STAGING_DIR)/usr/lib/
64 $(SED) 's,-I$$$${prefix}/include,,g' $(STAGING_DIR)/usr/bin/gdlib-config
65 endef
66
67 define Build/UninstallDev
68 rm -rf $(STAGING_DIR)/usr/bin/gdlib-config \
69 $(STAGING_DIR)/usr/include/entities.h \
70 $(STAGING_DIR)/usr/include/gd{,_io,cache,fontg,fontl,fontmb,fonts,fontt,fx}.h \
71 $(STAGING_DIR)/usr/lib/libgd.{a,so*}
72 endef
73
74 define Package/libgd/install
75 install -d -m0755 $(1)/usr/lib
76 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgd.so.* $(1)/usr/lib/
77 endef
78
79 $(eval $(call BuildPackage,libgd))