1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-14 08:18:26 +02:00

Convert glib to new packaging style

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@869 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nico 2005-05-13 02:34:54 +00:00
parent 9925d18549
commit 6c9a6c4ca5
4 changed files with 66 additions and 62 deletions

View File

@ -20,7 +20,7 @@ package-$(BR2_PACKAGE_EZIPUPDATE) += ez-ipupdate
package-$(BR2_PACKAGE_FPING) += fping package-$(BR2_PACKAGE_FPING) += fping
package-$(BR2_PACKAGE_FPROBE) += fprobe package-$(BR2_PACKAGE_FPROBE) += fprobe
package-$(BR2_PACKAGE_FUSE) += fuse package-$(BR2_PACKAGE_FUSE) += fuse
package-$(BR2_PACKAGE_GLIB) += glib package-$(BR2_PACKAGE_GLIB1) += glib
package-$(BR2_PACKAGE_GMP) += gmp package-$(BR2_PACKAGE_GMP) += gmp
package-$(BR2_PACKAGE_HASERL) += haserl package-$(BR2_PACKAGE_HASERL) += haserl
package-$(BR2_PACKAGE_IPKG) += ipkg package-$(BR2_PACKAGE_IPKG) += ipkg

View File

@ -1,4 +1,4 @@
config BR2_PACKAGE_GLIB config BR2_PACKAGE_GLIB1
select BR2_PACKAGE_LIBPTHREAD select BR2_PACKAGE_LIBPTHREAD
tristate "glib 1.2" tristate "glib 1.2"
default m if CONFIG_DEVEL default m if CONFIG_DEVEL

View File

@ -7,26 +7,20 @@ PKG_VERSION := 1.2.10
PKG_RELEASE := 1 PKG_RELEASE := 1
PKG_MD5SUM := 6fe30dad87c77b91b632def29dd69ef9 PKG_MD5SUM := 6fe30dad87c77b91b632def29dd69ef9
PKG_SOURCE_SITE := ftp://ftp.gtk.org/pub/gtk/v1.2 PKG_SOURCE_URL := ftp://ftp.gtk.org/pub/gtk/v1.2
PKG_SOURCE_FILE := $(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE := $(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_CAT := zcat PKG_CAT := zcat
PKG_SOURCE_DIR := $(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_SOURCE_DIR) PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_IPK := $(PACKAGE_DIR)/glib1.2_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
include $(TOPDIR)/package/rules.mk
$(eval $(call PKG_template,GLIB1,glib1,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
$(DL_DIR)/$(PKG_SOURCE_FILE): $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
mkdir -p $(DL_DIR) (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \
$(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE_FILE) $(PKG_MD5SUM) $(PKG_SOURCE_SITE)
$(PKG_BUILD_DIR)/.patched: $(DL_DIR)/$(PKG_SOURCE_FILE)
mkdir -p $(TOOL_BUILD_DIR)
$(PKG_SOURCE_CAT) $(DL_DIR)/$(PKG_SOURCE_FILE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
$(PATCH) $(PKG_BUILD_DIR) ./patches
touch $(PKG_BUILD_DIR)/.patched
$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.patched
(cd $(PKG_BUILD_DIR); rm -rf config.cache config.status; \
glib_cv_sizeof_gmutex=24 \ glib_cv_sizeof_gmutex=24 \
ac_cv_sizeof_char=1 \ ac_cv_sizeof_char=1 \
ac_cv_sizeof_short=2 \ ac_cv_sizeof_short=2 \
@ -52,55 +46,65 @@ $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.patched
$(TARGET_CONFIGURE_OPTS) \ $(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \ CFLAGS="$(TARGET_CFLAGS)" \
./configure \ ./configure \
--target=$(GNU_TARGET_NAME) \ --target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \ --host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \ --build=$(GNU_HOST_NAME) \
--prefix=/usr \ --program-prefix="" \
--exec-prefix=/usr \ --program-suffix="" \
--bindir=/usr/bin \ --prefix=/usr \
--sbindir=/usr/sbin \ --exec-prefix=/usr \
--libexecdir=/usr/lib \ --bindir=/usr/bin \
--sysconfdir=/etc \ --sbindir=/usr/sbin \
--datadir=/usr/share \ --libexecdir=/usr/lib \
--localstatedir=/var \ --sysconfdir=/etc \
--mandir=/usr/man \ --datadir=/usr/share \
--infodir=/usr/info \ --localstatedir=/var \
--enable-shared=yes \ --mandir=/usr/man \
$(DISABLE_NLS) \ --infodir=/usr/info \
$(DISABLE_LARGEFILE) \ $(DISABLE_NLS) \
$(DISABLE_LARGEFILE) \
--enable-shared=yes \
--enable-static=yes \
); );
touch $(PKG_BUILD_DIR)/.configured touch $(PKG_BUILD_DIR)/.configured
$(PKG_BUILD_DIR)/libglib.so: $(PKG_BUILD_DIR)/.configured $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured
$(MAKE) -C $(PKG_BUILD_DIR) \ $(MAKE) -C $(PKG_BUILD_DIR) \
$(TARGET_CONFIGURE_OPTS) $(TARGET_CONFIGURE_OPTS)
$(STAGING_DIR)/lib/libglib.so: $(PKG_BUILD_DIR)/libglib.so
$(MAKE) -C $(PKG_BUILD_DIR) \ $(MAKE) -C $(PKG_BUILD_DIR) \
DESTDIR="$(STAGING_DIR)" \ DESTDIR="$(PKG_INSTALL_DIR)" \
install install
cp $(PKG_BUILD_DIR)/glibconfig-sysdefs.h $(STAGING_DIR)/usr/include/glib-1.2/ touch $(PKG_BUILD_DIR)/.built
rm -f $(STAGING_DIR)/usr/lib/libg{lib,module,thread}.la
$(PKG_IPK): $(STAGING_DIR)/lib/libglib.so $(IPKG_GLIB1):
mkdir -p $(PACKAGE_DIR) install -m0755 -d $(IDIR_GLIB1)/usr/lib
$(SCRIPT_DIR)/make-ipkg-dir.sh $(PKG_BUILD_DIR)/ipkg/glib glib.control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH) cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libg{lib,module,thread}-1.2.so.* $(IDIR_GLIB1)/usr/lib/
mkdir -p $(PKG_BUILD_DIR)/ipkg/glib/usr/lib $(RSTRIP) $(IDIR_GLIB1)
cp -a $(PKG_BUILD_DIR)/.libs/*.so* $(PKG_BUILD_DIR)/ipkg/glib/usr/lib $(IPKG_BUILD) $(IDIR_GLIB1) $(PACKAGE_DIR)
cp -a $(PKG_BUILD_DIR)/*/.libs/*.so* $(PKG_BUILD_DIR)/ipkg/glib/usr/lib
$(STRIP) $(PKG_BUILD_DIR)/ipkg/glib/usr/lib/*
$(IPKG_BUILD) $(PKG_BUILD_DIR)/ipkg/glib $(PACKAGE_DIR)
$(IPKG_STATE_DIR)/info/glib.list: $(PKG_IPK) $(STAGING_DIR)/usr/lib/libglib.so: $(PKG_BUILD_DIR)/.built
$(IPKG) install $(PKG_IPK) mkdir -p $(STAGING_DIR)/usr/bin
cp -fpR $(PKG_INSTALL_DIR)/usr/bin/glib-config $(STAGING_DIR)/usr/bin/
mkdir -p $(STAGING_DIR)/usr/include
cp -fpR $(PKG_INSTALL_DIR)/usr/include/glib-1.2 $(STAGING_DIR)/usr/include/
cp -fpR $(PKG_BUILD_DIR)/glibconfig-sysdefs.h $(STAGING_DIR)/usr/include/glib-1.2/
mkdir -p $(STAGING_DIR)/usr/lib
cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libg{lib,module,thread}.{a,so} $(STAGING_DIR)/usr/lib/
cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libg{lib,module,thread}-*.so.* $(STAGING_DIR)/usr/lib/
cp -fpR $(PKG_INSTALL_DIR)/usr/lib/glib $(STAGING_DIR)/usr/lib/
mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig
cp -fpR $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/g{lib,module,thread}.pc $(STAGING_DIR)/usr/lib/pkgconfig/
touch $(STAGING_DIR)/usr/lib/libglib.so
source: $(DL_DIR)/$(PKG_SOURCE_FILE) install-dev: $(STAGING_DIR)/usr/lib/libglib.so
prepare: $(PKG_BUILD_DIR)/.patched
compile: $(STAGING_DIR)/lib/libglib.so $(PKG_IPK)
install: $(PKG_ZLIB) $(IPKG_STATE_DIR)/info/glib.list
clean: uninstall-dev:
rm -rf $(PKG_BUILD_DIR) rm -rf $(STAGING_DIR)/usr/bin/glib-config
rm -f $(STAGING_DIR)/lib/libglib* $(STAGING_DIR)/include/glib* rm -rf $(STAGING_DIR)/usr/include/glib-1.2
rm -f $(PACKAGE_DIR)/glib\*.ipk rm -rf $(STAGING_DIR)/usr/lib/libg{lib,module,thread}.{a,so}
rm -rf $(STAGING_DIR)/usr/lib/libg{lib,module,thread}-*.so.*
rm -rf $(STAGING_DIR)/usr/lib/glib
rm -rf $(STAGING_DIR)/usr/lib/pkgconfig/g{lib,module,thread}.pc
compile: install-dev
clean: uninstall-dev