add crond init script
[openwrt.git] / openwrt / 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_URL := ftp://ftp.gtk.org/pub/gtk/v1.2 \
11 http://ftp.gwdg.de/pub/misc/grafik/gimp/gtk/v1.2/ \
12 http://ftp.esat.net/mirrors/ftp.gimp.org/pub/gtk/v1.2/ \
13 http://www.mirrorservice.org/sites/ftp.gimp.org/pub/gtk/v1.2/
14 PKG_SOURCE := $(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_CAT := zcat
16
17 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
18 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
19
20 include $(TOPDIR)/package/rules.mk
21
22 $(eval $(call PKG_template,GLIB1,glib1,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
23
24 $(PKG_BUILD_DIR)/.configured:
25 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \
26 glib_cv_sizeof_gmutex=24 \
27 ac_cv_sizeof_char=1 \
28 ac_cv_sizeof_short=2 \
29 ac_cv_sizeof_int=4 \
30 ac_cv_sizeof_long=4 \
31 ac_cv_sizeof_long_long=8 \
32 ac_cv_sizeof_void_p=4 \
33 glib_cv_prog_cc_ansi_proto="no" \
34 glib_cv_has__inline="yes" \
35 glib_cv_has__inline__="yes" \
36 glib_cv_hasinline="yes" \
37 glib_cv_sane_realloc="yes" \
38 glib_cv_va_copy="no" \
39 glib_cv___va_copy="yes" \
40 glib_cv_va_val_copy="yes" \
41 glib_cv_rtldglobal_broken="no" \
42 glib_cv_uscore="no" \
43 ac_cv_func_getpwuid_r="yes" \
44 glib_cv_func_pthread_mutex_trylock_posix="yes" \
45 glib_cv_func_pthread_cond_timedwait_posix="yes" \
46 glib_cv_sizeof_gmutex="24" \
47 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" \
48 $(TARGET_CONFIGURE_OPTS) \
49 CFLAGS="$(TARGET_CFLAGS)" \
50 LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \
51 ./configure \
52 --target=$(GNU_TARGET_NAME) \
53 --host=$(GNU_TARGET_NAME) \
54 --build=$(GNU_HOST_NAME) \
55 --program-prefix="" \
56 --program-suffix="" \
57 --prefix=/usr \
58 --exec-prefix=/usr \
59 --bindir=/usr/bin \
60 --sbindir=/usr/sbin \
61 --libexecdir=/usr/lib \
62 --sysconfdir=/etc \
63 --datadir=/usr/share \
64 --localstatedir=/var \
65 --mandir=/usr/man \
66 --infodir=/usr/info \
67 $(DISABLE_NLS) \
68 $(DISABLE_LARGEFILE) \
69 --enable-shared=yes \
70 --enable-static=yes \
71 );
72 touch $@
73
74 $(PKG_BUILD_DIR)/.built:
75 rm -rf $(PKG_INSTALL_DIR)
76 mkdir -p $(PKG_INSTALL_DIR)
77 $(MAKE) -C $(PKG_BUILD_DIR) \
78 DESTDIR="$(PKG_INSTALL_DIR)" \
79 install
80 touch $@
81
82 $(IPKG_GLIB1):
83 install -m0755 -d $(IDIR_GLIB1)/usr/lib
84 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libg{lib,module,thread}-1.2.so.* $(IDIR_GLIB1)/usr/lib/
85 $(RSTRIP) $(IDIR_GLIB1)
86 $(IPKG_BUILD) $(IDIR_GLIB1) $(PACKAGE_DIR)
87
88 $(STAGING_DIR)/usr/lib/libglib.so: $(PKG_BUILD_DIR)/.built
89 mkdir -p $(STAGING_DIR)/usr/bin
90 cp -fpR $(PKG_INSTALL_DIR)/usr/bin/glib-config $(STAGING_DIR)/usr/bin/
91 mkdir -p $(STAGING_DIR)/usr/include
92 cp -fpR $(PKG_INSTALL_DIR)/usr/include/glib-1.2 $(STAGING_DIR)/usr/include/
93 cp -fpR $(PKG_BUILD_DIR)/glibconfig-sysdefs.h $(STAGING_DIR)/usr/include/glib-1.2/
94 mkdir -p $(STAGING_DIR)/usr/lib
95 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libg{lib,module,thread}.{a,so} $(STAGING_DIR)/usr/lib/
96 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libg{lib,module,thread}-*.so.* $(STAGING_DIR)/usr/lib/
97 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/glib $(STAGING_DIR)/usr/lib/
98 mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig
99 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/g{lib,module,thread}.pc $(STAGING_DIR)/usr/lib/pkgconfig/
100 touch $(STAGING_DIR)/usr/lib/libglib.so
101
102 install-dev: $(STAGING_DIR)/usr/lib/libglib.so
103
104 uninstall-dev:
105 rm -rf $(STAGING_DIR)/usr/bin/glib-config
106 rm -rf $(STAGING_DIR)/usr/include/glib-1.2
107 rm -rf $(STAGING_DIR)/usr/lib/libg{lib,module,thread}.{a,so}
108 rm -rf $(STAGING_DIR)/usr/lib/libg{lib,module,thread}-*.so.*
109 rm -rf $(STAGING_DIR)/usr/lib/glib
110 rm -rf $(STAGING_DIR)/usr/lib/pkgconfig/g{lib,module,thread}.pc
111
112 compile-targets: install-dev
113 clean-targets: uninstall-dev
This page took 0.040015 seconds and 5 git commands to generate.