convert chillispot to new packaging style
[openwrt.git] / package / glib / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME := glib
6 PKG_VERSION := 1.2.10
7 PKG_RELEASE := 1
8 PKG_MD5SUM := 6fe30dad87c77b91b632def29dd69ef9
9
10 PKG_SOURCE_SITE := ftp://ftp.gtk.org/pub/gtk/v1.2
11 PKG_SOURCE_FILE := $(PKG_NAME)-$(PKG_VERSION).tar.gz
12 PKG_SOURCE_CAT := zcat
13 PKG_SOURCE_DIR := $(PKG_NAME)-$(PKG_VERSION)
14 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_SOURCE_DIR)
15 PKG_IPK := $(PACKAGE_DIR)/glib1.2_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
16
17
18 $(DL_DIR)/$(PKG_SOURCE_FILE):
19 mkdir -p $(DL_DIR)
20 $(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE_FILE) $(PKG_MD5SUM) $(PKG_SOURCE_SITE)
21
22 $(PKG_BUILD_DIR)/.patched: $(DL_DIR)/$(PKG_SOURCE_FILE)
23 mkdir -p $(TOOL_BUILD_DIR)
24 $(PKG_SOURCE_CAT) $(DL_DIR)/$(PKG_SOURCE_FILE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
25 $(PATCH) $(PKG_BUILD_DIR) ./patches
26 touch $(PKG_BUILD_DIR)/.patched
27
28 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.patched
29 (cd $(PKG_BUILD_DIR); rm -rf config.cache config.status; \
30 glib_cv_sizeof_gmutex=24 \
31 ac_cv_sizeof_char=1 \
32 ac_cv_sizeof_short=2 \
33 ac_cv_sizeof_int=4 \
34 ac_cv_sizeof_long=4 \
35 ac_cv_sizeof_long_long=8 \
36 ac_cv_sizeof_void_p=4 \
37 glib_cv_prog_cc_ansi_proto="no" \
38 glib_cv_has__inline="yes" \
39 glib_cv_has__inline__="yes" \
40 glib_cv_hasinline="yes" \
41 glib_cv_sane_realloc="yes" \
42 glib_cv_va_copy="no" \
43 glib_cv___va_copy="yes" \
44 glib_cv_va_val_copy="yes" \
45 glib_cv_rtldglobal_broken="no" \
46 glib_cv_uscore="no" \
47 ac_cv_func_getpwuid_r="yes" \
48 glib_cv_func_pthread_mutex_trylock_posix="yes" \
49 glib_cv_func_pthread_cond_timedwait_posix="yes" \
50 glib_cv_sizeof_gmutex="24" \
51 glib_cv_byte_contents_gmutex="0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0" \
52 $(TARGET_CONFIGURE_OPTS) \
53 CFLAGS="$(TARGET_CFLAGS)" \
54 ./configure \
55 --target=$(GNU_TARGET_NAME) \
56 --host=$(GNU_TARGET_NAME) \
57 --build=$(GNU_HOST_NAME) \
58 --prefix=/usr \
59 --exec-prefix=/usr \
60 --bindir=/usr/bin \
61 --sbindir=/usr/sbin \
62 --libexecdir=/usr/lib \
63 --sysconfdir=/etc \
64 --datadir=/usr/share \
65 --localstatedir=/var \
66 --mandir=/usr/man \
67 --infodir=/usr/info \
68 --enable-shared=yes \
69 $(DISABLE_NLS) \
70 $(DISABLE_LARGEFILE) \
71 );
72 touch $(PKG_BUILD_DIR)/.configured
73
74 $(PKG_BUILD_DIR)/libglib.so: $(PKG_BUILD_DIR)/.configured
75 $(MAKE) -C $(PKG_BUILD_DIR) \
76 $(TARGET_CONFIGURE_OPTS)
77
78 $(STAGING_DIR)/lib/libglib.so: $(PKG_BUILD_DIR)/libglib.so
79 $(MAKE) -C $(PKG_BUILD_DIR) \
80 DESTDIR="$(STAGING_DIR)" \
81 install
82 cp $(PKG_BUILD_DIR)/glibconfig-sysdefs.h $(STAGING_DIR)/usr/include/glib-1.2/
83 rm -f $(STAGING_DIR)/usr/lib/libg{lib,module,thread}.la
84
85 $(PKG_IPK): $(STAGING_DIR)/lib/libglib.so
86 mkdir -p $(PACKAGE_DIR)
87 $(SCRIPT_DIR)/make-ipkg-dir.sh $(PKG_BUILD_DIR)/ipkg/glib glib.control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
88 mkdir -p $(PKG_BUILD_DIR)/ipkg/glib/usr/lib
89 cp -a $(PKG_BUILD_DIR)/.libs/*.so* $(PKG_BUILD_DIR)/ipkg/glib/usr/lib
90 cp -a $(PKG_BUILD_DIR)/*/.libs/*.so* $(PKG_BUILD_DIR)/ipkg/glib/usr/lib
91 $(STRIP) $(PKG_BUILD_DIR)/ipkg/glib/usr/lib/*
92 $(IPKG_BUILD) $(PKG_BUILD_DIR)/ipkg/glib $(PACKAGE_DIR)
93
94 $(IPKG_STATE_DIR)/info/glib.list: $(PKG_IPK)
95 $(IPKG) install $(PKG_IPK)
96
97 source: $(DL_DIR)/$(PKG_SOURCE_FILE)
98 prepare: $(PKG_BUILD_DIR)/.patched
99 compile: $(STAGING_DIR)/lib/libglib.so $(PKG_IPK)
100 install: $(PKG_ZLIB) $(IPKG_STATE_DIR)/info/glib.list
101
102 clean:
103 rm -rf $(PKG_BUILD_DIR)
104 rm -f $(STAGING_DIR)/lib/libglib* $(STAGING_DIR)/include/glib*
105 rm -f $(PACKAGE_DIR)/glib\*.ipk
106
This page took 0.057708 seconds and 5 git commands to generate.