enable seq by default in busybox
[openwrt.git] / openwrt / package / libgd / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME := gd
6 PKG_VERSION := 2.0.33
7 PKG_RELEASE := 1
8 PKG_MD5SUM := be0a6d326cd8567e736fbc75df0a5c45
9
10 PKG_SOURCE_SITE := http://www.boutell.com/gd/http
11 PKG_SOURCE_FILE := $(PKG_NAME)-$(PKG_VERSION).tar.gz
12 PKG_SOURCE_DIR := $(PKG_NAME)-$(PKG_VERSION)
13 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_SOURCE_DIR)
14 PKG_IPK := $(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
15 PKG_CAT := zcat
16 PKG_IPK_DIR := $(PKG_BUILD_DIR)/ipkg
17
18 $(DL_DIR)/$(PKG_SOURCE_FILE):
19 $(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE_FILE) $(PKG_MD5SUM) $(PKG_SOURCE_SITE)
20
21 $(PKG_BUILD_DIR)/.unpacked: $(DL_DIR)/$(PKG_SOURCE_FILE)
22 $(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE_FILE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
23 $(PATCH) $(PKG_BUILD_DIR) ./patches
24 touch $(PKG_BUILD_DIR)/.unpacked
25
26 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.unpacked
27 (cd $(PKG_BUILD_DIR) ; \
28 $(TARGET_CONFIGURE_OPTS) \
29 CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \
30 LIBPNG12_CONFIG="$(STAGING_DIR)/usr/bin/libpng12-config" \
31 LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
32 sys_lib_dlsearch_path_spec="$(STAGING_DIR)/lib $(STAGING_DIR)/usr/lib" \
33 sys_lib_search_path_spec="$(STAGING_DIR)/lib $(STAGING_DIR)/usr/lib" \
34 ./configure \
35 --target=$(GNU_TARGET_NAME) \
36 --host=$(GNU_TARGET_NAME) \
37 --build=$(GNU_HOST_NAME) \
38 --prefix="$(STAGING_DIR)/usr" \
39 --disable-rpath \
40 --without-x \
41 --with-png=$(STAGING_DIR)/usr \
42 $(DISABLE_NLS) \
43 )
44 touch $(PKG_BUILD_DIR)/.configured
45
46 $(PKG_BUILD_DIR)/.libs/libgd.so: $(PKG_BUILD_DIR)/.configured
47 $(MAKE) -C $(PKG_BUILD_DIR) \
48 CC=$(TARGET_CC) \
49 CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include -L$(STAGING_DIR)/usr/lib" \
50 LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
51 libdir="$(STAGING_DIR)/usr/lib" \
52 all
53
54 $(STAGING_DIR)/usr/lib/libgd.so: $(PKG_BUILD_DIR)/.libs/libgd.so
55 $(MAKE) -C $(PKG_BUILD_DIR) \
56 install
57
58 $(PKG_IPK): $(PKG_BUILD_DIR)/.libs/libgd.so
59 $(SCRIPT_DIR)/make-ipkg-dir.sh $(PKG_IPK_DIR) libgd.control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
60 mkdir -p $(PKG_IPK_DIR)/usr/lib
61 cp -a $(PKG_BUILD_DIR)/.libs/*.so* $(PKG_IPK_DIR)/usr/lib/
62 $(STRIP) $(PKG_IPK_DIR)/usr/lib/*
63 find $(PKG_IPK_DIR) -name CVS | xargs rm -rf
64 mkdir -p $(PACKAGE_DIR)
65 $(IPKG_BUILD) $(PKG_IPK_DIR) $(PACKAGE_DIR)
66
67 $(IPKG_STATE_DIR)/info/libgd.list: $(PKG_IPK)
68 $(IPKG) install $(PKG_IPK)
69
70 source: $(DL_DIR)/$(PKG_SOURCE)
71 prepare: $(PKG_BUILD_DIR)/.unpacked
72 compile: $(STAGING_DIR)/usr/lib/libgd.so $(PKG_IPK)
73 install: $(IPKG_STATE_DIR)/info/libgd.list
74
75 clean:
76 rm -rf $(PKG_BUILD_DIR)
77 rm -f $(STAGING_DIR)/usr/bin/libgd*
78 rm -f $(STAGING_DIR)/usr/lib/libgd*
79 rm -f $(PKG_IPK)
This page took 0.047758 seconds and 5 git commands to generate.