3 include $(TOPDIR
)/rules.mk
8 PKG_MD5SUM
:= be0a6d326cd8567e736fbc75df0a5c45
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
16 PKG_IPK_DIR
:= $(PKG_BUILD_DIR
)/ipkg
18 $(DL_DIR
)/$(PKG_SOURCE_FILE
):
19 $(SCRIPT_DIR
)/download.pl
$(DL_DIR
) $(PKG_SOURCE_FILE
) $(PKG_MD5SUM
) $(PKG_SOURCE_SITE
)
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
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" \
35 --target
=$(GNU_TARGET_NAME
) \
36 --host
=$(GNU_TARGET_NAME
) \
37 --build
=$(GNU_HOST_NAME
) \
38 --prefix="$(STAGING_DIR)/usr" \
41 --with-png
=$(STAGING_DIR
)/usr \
44 touch
$(PKG_BUILD_DIR
)/.configured
46 $(PKG_BUILD_DIR
)/.libs
/libgd.so
: $(PKG_BUILD_DIR
)/.configured
47 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
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" \
54 $(STAGING_DIR
)/usr
/lib
/libgd.so
: $(PKG_BUILD_DIR
)/.libs
/libgd.so
55 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
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
)
67 $(IPKG_STATE_DIR
)/info/libgd.list
: $(PKG_IPK
)
68 $(IPKG
) install $(PKG_IPK
)
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
76 rm -rf
$(PKG_BUILD_DIR
)
77 rm -f
$(STAGING_DIR
)/usr
/bin
/libgd
*
78 rm -f
$(STAGING_DIR
)/usr
/lib
/libgd
*