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" \
42 --libexecdir
=/usr
/lib \
43 --datadir=/usr
/share \
44 --infodir=/usr
/share
/info \
45 --mandir=/usr
/share
/man \
46 --localstatedir
=/var \
50 --with-png
=$(STAGING_DIR
)/usr \
53 touch
$(PKG_BUILD_DIR
)/.configured
55 $(PKG_BUILD_DIR
)/.libs
/libgd.so
: $(PKG_BUILD_DIR
)/.configured
56 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
58 CFLAGS
="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include -L$(STAGING_DIR)/usr/lib" \
59 LDFLAGS
="-L$(STAGING_DIR)/usr/lib" \
60 libdir="$(STAGING_DIR)/usr/lib" \
63 $(STAGING_DIR
)/usr
/lib
/libgd.so
: $(PKG_BUILD_DIR
)/.libs
/libgd.so
64 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
65 DESTDIR
="$(STAGING_DIR)" \
67 rm -f
$(STAGING_DIR
)/usr
/lib
/libgd
*.la
69 $(PKG_IPK
): $(PKG_BUILD_DIR
)/.libs
/libgd.so
70 $(SCRIPT_DIR
)/make-ipkg-dir.sh
$(PKG_IPK_DIR
) libgd.control
$(PKG_VERSION
)-$(PKG_RELEASE
) $(ARCH
)
71 mkdir
-p
$(PKG_IPK_DIR
)/usr
/lib
72 cp
-a
$(PKG_BUILD_DIR
)/.libs
/*.so
* $(PKG_IPK_DIR
)/usr
/lib
/
73 $(STRIP
) $(PKG_IPK_DIR
)/usr
/lib
/*
74 find
$(PKG_IPK_DIR
) -name CVS | xargs
rm -rf
75 mkdir
-p
$(PACKAGE_DIR
)
76 $(IPKG_BUILD
) $(PKG_IPK_DIR
) $(PACKAGE_DIR
)
78 $(IPKG_STATE_DIR
)/info/libgd.list
: $(PKG_IPK
)
79 $(IPKG
) install $(PKG_IPK
)
81 source
: $(DL_DIR
)/$(PKG_SOURCE
)
82 prepare
: $(PKG_BUILD_DIR
)/.unpacked
83 compile
: $(STAGING_DIR
)/usr
/lib
/libgd.so
$(PKG_IPK
)
84 install: $(IPKG_STATE_DIR
)/info/libgd.list
87 rm -rf
$(PKG_BUILD_DIR
)
88 rm -f
$(STAGING_DIR
)/usr
/bin
/libgd
*
89 rm -f
$(STAGING_DIR
)/usr
/lib
/libgd
*