Add htpdate package
[openwrt.git] / openwrt / package / libpng / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME := libpng
6 PKG_VERSION := 1.2.8
7 PKG_RELEASE := 1
8 PKG_MD5SUM := e5a39003eed16103cbbd3b6a8bc6b1f9
9
10 PKG_SOURCE_SITE := @SF/libpng
11 PKG_SOURCE_FILE := $(PKG_NAME)-$(PKG_VERSION)-config.tar.gz
12 PKG_SOURCE_DIR := $(PKG_NAME)-$(PKG_VERSION)-config
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)/.prepared: $(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)/.prepared
25
26 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
27 (cd $(PKG_BUILD_DIR); \
28 $(TARGET_CONFIGURE_OPTS) \
29 CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \
30 LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
31 ./configure \
32 --target=$(GNU_TARGET_NAME) \
33 --host=$(GNU_TARGET_NAME) \
34 --build=$(GNU_HOST_NAME) \
35 --prefix=$(STAGING_DIR)/usr \
36 --with-zlib=$(STAGING_DIR)/usr/ \
37 $(DISABLE_NLS) \
38 )
39 touch $(PKG_BUILD_DIR)/.configured
40
41 $(PKG_BUILD_DIR)/.libs/libpng.so: $(PKG_BUILD_DIR)/.configured
42 $(MAKE) -C $(PKG_BUILD_DIR) \
43 CC=$(TARGET_CC) \
44 CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include -L$(STAGING_DIR)/usr/lib" \
45 all
46
47 $(STAGING_DIR)/usr/lib/libpng.so: $(PKG_BUILD_DIR)/.libs/libpng.so
48 $(MAKE) -C $(PKG_BUILD_DIR) \
49 install
50 # DESTDIR="$(STAGING_DIR)" \
51 # install-libLTLIBRARIES install-includeHEADERS install-binSCRIPTS
52
53 $(PKG_IPK): $(PKG_BUILD_DIR)/.libs/libpng.so
54 $(SCRIPT_DIR)/make-ipkg-dir.sh $(PKG_IPK_DIR) $(PKG_NAME).control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
55 mkdir -p $(PKG_IPK_DIR)/usr/lib
56 cp -a $(PKG_BUILD_DIR)/.libs/*.so* $(PKG_IPK_DIR)/usr/lib/
57 $(STRIP) $(PKG_IPK_DIR)/usr/lib/*
58 find $(PKG_IPK_DIR) -name CVS | xargs rm -rf
59 mkdir -p $(PACKAGE_DIR)
60 $(IPKG_BUILD) $(PKG_IPK_DIR) $(PACKAGE_DIR)
61
62 $(IPKG_STATE_DIR)/info/libpng.list: $(PKG_IPK)
63 $(IPKG) install $(PKG_IPK)
64
65 source: $(DL_DIR)/$(PKG_SOURCE)
66 prepare: $(PKG_BUILD_DIR)/.prepared
67 compile: $(STAGING_DIR)/usr/lib/libpng.so $(PKG_IPK)
68 install: $(IPKG_STATE_DIR)/info/libpng.list
69
70 clean:
71 rm -rf $(PKG_BUILD_DIR)
72 rm -f $(STAGING_DIR)/usr/bin/libpng*
73 rm -f $(STAGING_DIR)/usr/lib/libpng*
74 rm -f $(PKG_IPK)
This page took 0.043105 seconds and 5 git commands to generate.