1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-14 07:49:21 +02:00

Uniformize package Makefile

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@640 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nico 2005-04-14 06:11:36 +00:00
parent 293cb05bf5
commit 468b09e529
8 changed files with 319 additions and 265 deletions

View File

@ -2,69 +2,93 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME := libelf PKG_NAME:=libelf
PKG_VERSION := 0.8.5 PKG_VERSION:=0.8.5
PKG_RELEASE := 1 PKG_RELEASE:=1
PKG_MD5SUM := c1daf069367871350ece779b7de20047 PKG_MD5SUM:=c1daf069367871350ece779b7de20047
PKG_SOURCE_SITE := http://www.mr511.de/software/ PKG_SOURCE_URL:=\
PKG_SOURCE_FILE := $(PKG_NAME)-$(PKG_VERSION).tar.gz http://www.mr511.de/software/ \
PKG_SOURCE_CAT := zcat http://nthill.free.fr/openwrt/sources/$(PKG_NAME)/
PKG_SOURCE_DIR := $(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_SOURCE_DIR) PKG_CAT:=zcat
PKG_IPK := $(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
PKG_IPK_DIR :=$(PKG_BUILD_DIR)/ipkg/ PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
IPKG_LIBELF:=$(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
IDIR_LIBELF:=$(PKG_BUILD_DIR)/ipkg/$(PKG_NAME)
INFO_LIBELF:=$(IPKG_STATE_DIR)/info/$(PKG_NAME).list
.NOTPARALLEL: .NOTPARALLEL:
$(DL_DIR)/$(PKG_SOURCE_FILE): $(DL_DIR)/$(PKG_SOURCE):
mkdir -p $(DL_DIR) $(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE) $(PKG_MD5SUM) $(PKG_SOURCE_URL)
$(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE_FILE) $(PKG_MD5SUM) $(PKG_SOURCE_SITE)
$(PKG_BUILD_DIR)/.unpacked: $(DL_DIR)/$(PKG_SOURCE_FILE) $(PKG_BUILD_DIR)/.prepared: $(DL_DIR)/$(PKG_SOURCE)
mkdir -p $(TOOL_BUILD_DIR) $(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
$(PKG_SOURCE_CAT) $(DL_DIR)/$(PKG_SOURCE_FILE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - touch $(PKG_BUILD_DIR)/.prepared
touch $(PKG_BUILD_DIR)/.unpacked
$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.unpacked $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
(cd $(PKG_BUILD_DIR); \ (cd $(PKG_BUILD_DIR); rm -rf config.cache config.status; \
echo "mr_cv_target_elf=$${mr_cv_target_elf=yes}" > config.cache; \
$(TARGET_CONFIGURE_OPTS) \ $(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \
CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
mr_cv_target_elf=yes \
./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=/ \ --program-prefix="" \
--program-suffix="" \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--datadir=/usr/share \
--includedir=/usr/include \
--infodir=/usr/share/info \
--libdir=/usr/lib \
--libexecdir=/usr/lib \
--localstatedir=/var \
--mandir=/usr/share/man \
--sbindir=/usr/sbin \
--sysconfdir=/etc \ --sysconfdir=/etc \
$(DISABLE_NLS) \
$(DISABLE_LARGEFILE) \
--enable-shared \
--enable-static \
); );
touch $(PKG_BUILD_DIR)/.configured touch $(PKG_BUILD_DIR)/.configured
$(PKG_BUILD_DIR)/lib/libelf.so.$(LIBELF_VER): $(PKG_BUILD_DIR)/.configured $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured
$(MAKE) -j1 CC=$(TARGET_CC) LD=$(TARGET_CROSS)ld ARCH=$(ARCH) \ $(MAKE) -C $(PKG_BUILD_DIR) -j1 \
-C $(PKG_BUILD_DIR) CC=$(TARGET_CC) LD=$(TARGET_CROSS)ld ARCH=$(ARCH) \
$(STAGING_DIR)/lib/libelf.so: $(PKG_BUILD_DIR)/lib/libelf.so.$(LIBELF_VER) touch $(PKG_BUILD_DIR)/.built
$(MAKE) -j1 CC=$(TARGET_CC) LD=$(TARGET_CROSS)ld ARCH=$(ARCH) \
-C $(PKG_BUILD_DIR)/lib instroot="$(STAGING_DIR)" install
$(STAGING_DIR)/usr/lib/libelf.so: $(PKG_BUILD_DIR)/.built
$(MAKE) -C $(PKG_BUILD_DIR) -j1 \
instroot="$(STAGING_DIR)" \
install
$(PKG_IPK): $(PKG_BUILD_DIR)/lib/libelf.so.$(LIBELF_VER) $(IPKG_LIBELF): $(STAGING_DIR)/usr/lib/libelf.so
$(SCRIPT_DIR)/make-ipkg-dir.sh $(PKG_IPK_DIR) $(PKG_NAME).control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH) $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_LIBELF) $(PKG_NAME).control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
mkdir -p $(PKG_IPK_DIR)/usr/lib mkdir -p $(IDIR_LIBELF)/usr/lib
cp -a $(PKG_BUILD_DIR)/lib/libelf.so* $(PKG_IPK_DIR)/usr/lib/ cp -fp $(PKG_BUILD_DIR)/lib/libelf.so.* $(IDIR_LIBELF)/usr/lib/
$(STRIP) $(PKG_IPK_DIR)/usr/lib/* $(STRIP) $(IDIR_LIBELF)/usr/lib/lib*.so*
mkdir -p $(PACKAGE_DIR) mkdir -p $(PACKAGE_DIR)
$(IPKG_BUILD) $(PKG_IPK_DIR) $(PACKAGE_DIR) $(IPKG_BUILD) $(IDIR_LIBELF) $(PACKAGE_DIR)
$(IPKG_STATE_DIR)/info/$(PKG_NAME).list: $(PKG_IPK) $(INFO_LIBELF): $(IPKG_LIBELF)
$(IPKG) install $(PKG_IPK) $(IPKG) install $(IPKG_LIBELF)
source: $(DL_DIR)/$(PKG_SOURCE_FILE) source: $(DL_DIR)/$(PKG_SOURCE)
prepare: $(PKG_BUILD_DIR)/.unpacked prepare: $(PKG_BUILD_DIR)/.prepared
compile: $(STAGING_DIR)/lib/libelf.so $(PKG_IPK) compile: $(IPKG_LIBELF)
install: $(PKG_ZLIB) $(IPKG_STATE_DIR)/info/$(PKG_NAME).list install: $(INFO_LIBELF)
clean: clean:
rm -rf $(PKG_BUILD_DIR) -$(MAKE) -C $(PKG_BUILD_DIR) -j1 \
rm -f $(STAGING_DIR)/lib/$(PKG_NAME)* instroot="$(STAGING_DIR)" \
rm -f $(PACKAGE_DIR)/$(PKG_NAME)\*.ipk uninstall
rm -rf $(PKG_BUILD_DIR) $(IPKG_LIBELF)

View File

@ -2,34 +2,34 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME := libgcc PKG_NAME:=libgcc
PKG_VERSION := $(BR2_GCC_VERSION) PKG_VERSION:=$(BR2_GCC_VERSION)
PKG_RELEASE := 1 PKG_RELEASE:=1
PKG_SOURCE_DIR := $(PKG_NAME)-$(PKG_VERSION) PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_SOURCE_DIR)
PKG_IPK := $(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk IPKG_LIBGCC:=$(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
PKG_IPK_DIR :=$(PKG_BUILD_DIR)/ipkg/ IDIR_LIBGCC:=$(PKG_BUILD_DIR)/ipkg/$(PKG_NAME)
INFO_LIBGCC:=$(IPKG_STATE_DIR)/info/$(PKG_NAME).list
.NOTPARALLEL: .NOTPARALLEL:
$(PKG_IPK): $(STAGING_DIR)/lib/libpthread.so $(IPKG_LIBGCC): $(STAGING_DIR)/lib/libgcc_s.so
rm -rf $(PKG_BUILD_DIR) rm -rf $(PKG_BUILD_DIR)
$(SCRIPT_DIR)/make-ipkg-dir.sh $(PKG_IPK_DIR) $(PKG_NAME).control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH) $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_LIBGCC) $(PKG_NAME).control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
mkdir -p $(PKG_IPK_DIR)/lib mkdir -p $(IDIR_LIBGCC)/lib
cp -fp $(STAGING_DIR)/lib/libgcc_s.so.* $(PKG_IPK_DIR)/lib/ cp -fp $(STAGING_DIR)/lib/libgcc_s.so.* $(IDIR_LIBGCC)/lib/
$(STRIP) $(PKG_IPK_DIR)/lib/* $(STRIP) $(IDIR_LIBGCC)/lib/lib*.so*
mkdir -p $(PACKAGE_DIR) mkdir -p $(PACKAGE_DIR)
$(IPKG_BUILD) $(PKG_IPK_DIR) $(PACKAGE_DIR) $(IPKG_BUILD) $(IDIR_LIBGCC) $(PACKAGE_DIR)
$(IPKG_STATE_DIR)/info/$(PKG_NAME).list: $(PKG_IPK) $(INFO_LIBGCC): $(IPKG_LIBGCC)
$(IPKG) install $(PKG_IPK) $(IPKG) install $(IPKG_LIBGCC)
source: source:
prepare: prepare:
compile: $(PKG_IPK) compile: $(IPKG_LIBGCC)
install: $(IPKG_STATE_DIR)/info/$(PKG_NAME).list install: $(INFO_LIBGCC)
clean: clean:
rm -rf $(PKG_BUILD_DIR) rm -rf $(PKG_BUILD_DIR) $(IPKG_LIBGCC)
rm -f $(PKG_IPK)

View File

@ -2,35 +2,35 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME := libpthread PKG_NAME:=libpthread
PKG_VERSION := 0.9.27 PKG_VERSION:=0.9.27
PKG_RELEASE := 1 PKG_RELEASE:=1
PKG_SOURCE_DIR := $(PKG_NAME)-$(PKG_VERSION) PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_SOURCE_DIR)
PKG_IPK := $(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk IPKG_LIBPTHREAD:=$(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
PKG_IPK_DIR :=$(PKG_BUILD_DIR)/ipkg/ IDIR_LIBPTHREAD:=$(PKG_BUILD_DIR)/ipkg/$(PKG_NAME)
INFO_LIBPTHREAD:=$(IPKG_STATE_DIR)/info/$(PKG_NAME).list
.NOTPARALLEL: .NOTPARALLEL:
$(PKG_IPK): $(STAGING_DIR)/lib/libpthread.so $(IPKG_LIBPTHREAD): $(STAGING_DIR)/lib/libpthread.so
rm -rf $(PKG_BUILD_DIR) rm -rf $(PKG_BUILD_DIR)
$(SCRIPT_DIR)/make-ipkg-dir.sh $(PKG_IPK_DIR) $(PKG_NAME).control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH) $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_LIBPTHREAD) $(PKG_NAME).control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
mkdir -p $(PKG_IPK_DIR)/lib mkdir -p $(IDIR_LIBPTHREAD)/lib
cp -fp $(STAGING_DIR)/lib/libpthread.so.* $(PKG_IPK_DIR)/lib/ cp -fp $(STAGING_DIR)/lib/libpthread.so.* $(IDIR_LIBPTHREAD)/lib/
cp -fp $(STAGING_DIR)/lib/libpthread-*.so $(PKG_IPK_DIR)/lib/ cp -fp $(STAGING_DIR)/lib/libpthread-*.so $(IDIR_LIBPTHREAD)/lib/
$(STRIP) $(PKG_IPK_DIR)/lib/* $(STRIP) $(IDIR_LIBPTHREAD)/lib/lib*.so*
mkdir -p $(PACKAGE_DIR) mkdir -p $(PACKAGE_DIR)
$(IPKG_BUILD) $(PKG_IPK_DIR) $(PACKAGE_DIR) $(IPKG_BUILD) $(IDIR_LIBPTHREAD) $(PACKAGE_DIR)
$(IPKG_STATE_DIR)/info/$(PKG_NAME).list: $(PKG_IPK) $(IPKG_STATE_DIR)/info/$(PKG_NAME).list: $(IPKG_LIBPTHREAD)
$(IPKG) install $(PKG_IPK) $(IPKG) install $(IPKG_LIBPTHREAD)
source: source:
prepare: prepare:
compile: $(PKG_IPK) compile: $(IPKG_LIBPTHREAD)
install: $(IPKG_STATE_DIR)/info/$(PKG_NAME).list install: $(INFO_LIBPTHREAD)
clean: clean:
rm -rf $(PKG_BUILD_DIR) rm -rf $(PKG_BUILD_DIR) $(IPKG_LIBPTHREAD)
rm -f $(PKG_IPK)

View File

@ -2,43 +2,44 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME := mysql PKG_NAME:=mysql
PKG_VERSION := 4.0.24 PKG_VERSION:=4.0.24
PKG_RELEASE := 2 PKG_RELEASE:=2
PKG_MD5SUM := 408d3001ed715ddc90009c247e548638 PKG_MD5SUM:=408d3001ed715ddc90009c247e548638
PKG_SOURCE_SITE := \ PKG_SOURCE_URL:=\
http://mysql.he.net/Downloads/MySQL-4.0/ \ http://mysql.he.net/Downloads/MySQL-4.0/ \
http://www.linorg.usp.br/mysql/Downloads/MySQL-4.0/ \ http://www.linorg.usp.br/mysql/Downloads/MySQL-4.0/ \
http://mysql.planetmirror.com/Downloads/MySQL-4.0/ \ http://mysql.planetmirror.com/Downloads/MySQL-4.0/ \
http://mysql.holywar.net/Downloads/MySQL-4.0/ \ http://mysql.holywar.net/Downloads/MySQL-4.0/ \
http://netmirror.org/mirror/mysql.com/Downloads/MySQL-4.0/ \ http://netmirror.org/mirror/mysql.com/Downloads/MySQL-4.0/ \
http://nthill.free.fr/openwrt/sources/$(PKG_NAME)/ http://nthill.free.fr/openwrt/sources/$(PKG_NAME)/
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_IPK := $(PACKAGE_DIR)/libmysqlclient_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
PKG_IPK_DIR := $(PKG_BUILD_DIR)/ipkg
$(DL_DIR)/$(PKG_SOURCE_FILE): PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
mkdir -p $(DL_DIR)
$(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE_FILE) $(PKG_MD5SUM) $(PKG_SOURCE_SITE)
$(PKG_BUILD_DIR)/.patched: $(DL_DIR)/$(PKG_SOURCE_FILE) IPKG_LIBMYSQLCLIENT:=$(PACKAGE_DIR)/libmysqlclient_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
$(PKG_SOURCE_CAT) $(DL_DIR)/$(PKG_SOURCE_FILE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - IDIR_LIBMYSQLCLIENT:=$(PKG_BUILD_DIR)/ipkg/libmysqlclient
INFO_LIBMYSQLCLIENT:=$(IPKG_STATE_DIR)/info/libmysqlclient.list
$(DL_DIR)/$(PKG_SOURCE):
$(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE) $(PKG_MD5SUM) $(PKG_SOURCE_URL)
$(PKG_BUILD_DIR)/.prepared: $(DL_DIR)/$(PKG_SOURCE)
$(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
$(PATCH) $(PKG_BUILD_DIR) ./patches $(PATCH) $(PKG_BUILD_DIR) ./patches
touch $(PKG_BUILD_DIR)/.patched touch $(PKG_BUILD_DIR)/.prepared
$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.patched $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
(cd $(PKG_BUILD_DIR); rm -rf config.cache; \ (cd $(PKG_BUILD_DIR); rm -rf config.cache config.status; \
touch configure.in; \ touch configure.in; \
touch aclocal.m4; \ touch aclocal.m4; \
touch Makefile.in; \ touch Makefile.in; \
touch config.h.in; \ touch config.h.in; \
touch configure; \ touch configure; \
$(TARGET_CONFIGURE_OPTS) \ $(TARGET_CONFIGURE_OPTS) \
CFLAGS="-I$(STAGING_DIR)/usr/include" \ CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
OPTIMIZE_CFLAGS="$(TARGET_CFLAGS)" \ OPTIMIZE_CFLAGS="$(TARGET_CFLAGS)" \
OPTIMIZE_CXXFLAGS="$(TARGET_CFLAGS)" \ OPTIMIZE_CXXFLAGS="$(TARGET_CFLAGS)" \
@ -52,16 +53,22 @@ $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.patched
--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=/ \ --program-prefix="" \
--exec-prefix=/ \ --program-suffix="" \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \ --bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/lib \
--sysconfdir=/etc \
--datadir=/usr/share \ --datadir=/usr/share \
--includedir=/usr/include \
--infodir=/usr/share/info \
--libdir=/usr/lib \
--libexecdir=/usr/lib \
--localstatedir=/var \ --localstatedir=/var \
--mandir=/usr/man \ --mandir=/usr/share/man \
--infodir=/usr/info \ --sbindir=/usr/sbin \
--sysconfdir=/etc \
$(DISABLE_NLS) \
$(DISABLE_LARGEFILE) \
--enable-shared \ --enable-shared \
--enable-static \ --enable-static \
--disable-assembler \ --disable-assembler \
@ -80,12 +87,10 @@ $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.patched
--without-docs \ --without-docs \
--without-bench \ --without-bench \
--without-readline \ --without-readline \
$(DISABLE_NLS) \
$(DISABLE_LARGEFILE) \
); );
touch $(PKG_BUILD_DIR)/.configured touch $(PKG_BUILD_DIR)/.configured
$(PKG_BUILD_DIR)/libmysql/.libs/libmysqlclient.so: $(PKG_BUILD_DIR)/.configured $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured
$(MAKE) -C "$(PKG_BUILD_DIR)/libmysql" \ $(MAKE) -C "$(PKG_BUILD_DIR)/libmysql" \
CC="$(HOSTCC)" \ CC="$(HOSTCC)" \
LINK="$(HOSTCC) -o conf_to_src -lc" \ LINK="$(HOSTCC) -o conf_to_src -lc" \
@ -94,29 +99,34 @@ $(PKG_BUILD_DIR)/libmysql/.libs/libmysqlclient.so: $(PKG_BUILD_DIR)/.configured
$(MAKE) -C "$(PKG_BUILD_DIR)" \ $(MAKE) -C "$(PKG_BUILD_DIR)" \
SUBDIRS="include libmysql" \ SUBDIRS="include libmysql" \
all all
touch $(PKG_BUILD_DIR)/.built
$(STAGING_DIR)/include/mysql/mysql.h: $(PKG_BUILD_DIR)/libmysql/.libs/libmysqlclient.so $(STAGING_DIR)/usr/lib/mysql/libmysqlclient.so: $(PKG_BUILD_DIR)/.built
$(MAKE) -C "$(PKG_BUILD_DIR)" \ $(MAKE) -C "$(PKG_BUILD_DIR)" \
DESTDIR="$(STAGING_DIR)" \ DESTDIR="$(STAGING_DIR)" \
SUBDIRS="include libmysql" \ SUBDIRS="include libmysql" \
install install
rm -rf $(STAGING_DIR)/usr/lib/mysql/libmysqlclient.la
$(PKG_IPK): $(PKG_BUILD_DIR)/libmysql/.libs/libmysqlclient.so $(IPKG_LIBMYSQLCLIENT): $(STAGING_DIR)/usr/lib/mysql/libmysqlclient.so
$(SCRIPT_DIR)/make-ipkg-dir.sh $(PKG_IPK_DIR) libmysqlclient.control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH) $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_LIBMYSQLCLIENT) libmysqlclient.control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
mkdir -p $(PKG_IPK_DIR)/usr/lib mkdir -p $(IDIR_LIBMYSQLCLIENT)/usr/lib
cp $< $(PKG_IPK_DIR)/usr/lib/ cp -fp $(STAGING_DIR)/usr/lib/mysql/libmysqlclient.so.* $(IDIR_LIBMYSQLCLIENT)/usr/lib/
$(STRIP) $(PKG_IPK_DIR)/usr/lib/* $(STRIP) $(IDIR_LIBMYSQLCLIENT)/usr/lib/*.so*
mkdir -p $(PACKAGE_DIR) mkdir -p $(PACKAGE_DIR)
$(IPKG_BUILD) $(PKG_IPK_DIR) $(PACKAGE_DIR) $(IPKG_BUILD) $(IDIR_LIBMYSQLCLIENT) $(PACKAGE_DIR)
$(IPKG_STATE_DIR)/info/libmysqlclient.list: $(PKG_IPK) $(INFO_LIBMYSQLCLIENT): $(IPKG_LIBMYSQLCLIENT)
$(IPKG) install $(PKG_IPK) $(IPKG) install $(IPKG_LIBMYSQLCLIENT)
source: $(DL_DIR)/$(PKG_SOURCE) source: $(DL_DIR)/$(PKG_SOURCE)
prepare: $(PKG_BUILD_DIR)/.patched prepare: $(PKG_BUILD_DIR)/.prepared
compile: $(STAGING_DIR)/include/mysql/mysql.h $(PKG_IPK) compile: $(IPKG_LIBMYSQLCLIENT)
install: $(IPKG_STATE_DIR)/info/libmysqlclient.list install: $(INFO_LIBMYSQLCLIENT)
clean: clean:
rm -rf $(PKG_BUILD_DIR) -$(MAKE) -C "$(PKG_BUILD_DIR)" \
rm -f $(PKG_IPK) DESTDIR="$(STAGING_DIR)" \
SUBDIRS="include libmysql" \
uninstall
rm -rf $(PKG_BUILD_DIR) $(IPKG_LIBMYSQLCLIENT)

View File

@ -7,46 +7,58 @@ PKG_VERSION:=5.2
PKG_RELEASE:=6 PKG_RELEASE:=6
PKG_MD5SUM:=464d6a49010cf2a6eb9ce59a264d4d47 PKG_MD5SUM:=464d6a49010cf2a6eb9ce59a264d4d47
PKG_SOURCE_URL:=ftp://ftp.gnu.org/pub/gnu/$(PKG_NAME) \ PKG_SOURCE_URL:=\
ftp://ftp.gnu.org/pub/gnu/$(PKG_NAME) \
ftp://gatekeeper.dec.com/pub/GNU/$(PKG_NAME) \ ftp://gatekeeper.dec.com/pub/GNU/$(PKG_NAME) \
ftp://ftp.uu.net/archive/systems/gnu/$(PKG_NAME) \ ftp://ftp.uu.net/archive/systems/gnu/$(PKG_NAME) \
ftp://ftp.eu.uu.net/pub/gnu/$(PKG_NAME) \ ftp://ftp.eu.uu.net/pub/gnu/$(PKG_NAME) \
ftp://ftp.funet.fi/pub/gnu/prep/$(PKG_NAME) \ ftp://ftp.funet.fi/pub/gnu/prep/$(PKG_NAME) \
ftp://ftp.leo.org/pub/comp/os/unix/gnu/$(PKG_NAME) \ ftp://ftp.leo.org/pub/comp/os/unix/gnu/$(PKG_NAME) \
ftp://ftp.digex.net/pub/gnu/$(PKG_NAME) ftp://ftp.digex.net/pub/gnu/$(PKG_NAME) \
http://nthill.free.fr/openwrt/sources/$(PKG_NAME)/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_CAT:=zcat PKG_CAT:=zcat
PKG_IPK:=$(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
PKG_IPK_DIR:=$(PKG_BUILD_DIR)/ipkg PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
IPKG_LIBNCURSES:=$(PACKAGE_DIR)/lib$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
IDIR_LIBNCURSES:=$(PKG_BUILD_DIR)/ipkg/lib$(PKG_NAME)
INFO_LIBNCURSES:=$(IPKG_STATE_DIR)/info/lib$(PKG_NAME).list
$(DL_DIR)/$(PKG_SOURCE): $(DL_DIR)/$(PKG_SOURCE):
$(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE) $(PKG_MD5SUM) $(PKG_SOURCE_URL) $(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE) $(PKG_MD5SUM) $(PKG_SOURCE_URL)
$(PKG_BUILD_DIR)/.unpacked: $(DL_DIR)/$(PKG_SOURCE) $(PKG_BUILD_DIR)/.prepared: $(DL_DIR)/$(PKG_SOURCE)
$(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - $(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
touch $(PKG_BUILD_DIR)/.unpacked touch $(PKG_BUILD_DIR)/.prepared
$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.unpacked $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
(cd $(PKG_BUILD_DIR); rm -rf config.cache; \ (cd $(PKG_BUILD_DIR); rm -rf config.cache config.status; \
$(TARGET_CONFIGURE_OPTS) \ $(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \ CFLAGS="$(TARGET_CFLAGS)" \
CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
ac_cv_linux_vers="2" \ ac_cv_linux_vers="2" \
./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) \
--program-prefix="" \
--program-suffix="" \
--prefix=/usr \ --prefix=/usr \
--exec-prefix=/usr \ --exec-prefix=/usr \
--bindir=/usr/bin \ --bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/lib \
--sysconfdir=/etc \
--datadir=/usr/share \ --datadir=/usr/share \
--includedir=/usr/include \
--infodir=/usr/share/info \
--libdir=/usr/lib \
--libexecdir=/usr/lib \
--localstatedir=/var \ --localstatedir=/var \
--mandir=/usr/man \ --mandir=/usr/share/man \
--infodir=/usr/info \ --sbindir=/usr/sbin \
--sysconfdir=/etc \
$(DISABLE_NLS) \
$(DISABLE_LARGEFILE) \
--with-terminfo-dirs=/usr/share/terminfo \ --with-terminfo-dirs=/usr/share/terminfo \
--with-default-terminfo-dir=/usr/share/terminfo \ --with-default-terminfo-dir=/usr/share/terminfo \
--without-ada \ --without-ada \
@ -61,8 +73,6 @@ $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.unpacked
--enable-overwrite \ --enable-overwrite \
--with-shared \ --with-shared \
--with-normal \ --with-normal \
$(DISABLE_NLS) \
$(DISABLE_LARGEFILE) \
); );
touch $(PKG_BUILD_DIR)/.configured touch $(PKG_BUILD_DIR)/.configured
@ -78,33 +88,36 @@ $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured
install install
touch $(PKG_BUILD_DIR)/.built touch $(PKG_BUILD_DIR)/.built
$(STAGING_DIR)/usr/include/ncurses.h: $(PKG_BUILD_DIR)/.built $(STAGING_DIR)/usr/lib/libncurses.so: $(PKG_BUILD_DIR)/.built
$(MAKE) -C $(PKG_BUILD_DIR) \ $(MAKE) -C $(PKG_BUILD_DIR) \
DESTDIR="$(STAGING_DIR)" \ DESTDIR="$(STAGING_DIR)" \
install install
$(PKG_IPK): $(PKG_BUILD_DIR)/.built $(IPKG_LIBNCURSES): $(STAGING_DIR)/usr/lib/libncurses.so
$(SCRIPT_DIR)/make-ipkg-dir.sh $(PKG_IPK_DIR) libncurses.control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH) $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_LIBNCURSES) lib$(PKG_NAME).control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
mkdir -p $(PKG_IPK_DIR)/usr/lib mkdir -p $(IDIR_LIBNCURSES)/usr/lib
cp -a $(PKG_BUILD_DIR)/lib/lib*.so.* $(PKG_IPK_DIR)/usr/lib/ cp -fp $(STAGING_DIR)/usr/lib/lib{ncurses,panel}*.so.* $(IDIR_LIBNCURSES)/usr/lib/
mkdir -p $(PKG_IPK_DIR)/usr/share/terminfo $(STRIP) $(IDIR_LIBNCURSES)/usr/lib/*.so*
mkdir -p $(IDIR_LIBNCURSES)/usr/share/terminfo
for f in a/ansi d/dumb l/linux s/screen v/vt100 x/xterm x/xterm-color; do \ for f in a/ansi d/dumb l/linux s/screen v/vt100 x/xterm x/xterm-color; do \
mkdir -p $(PKG_IPK_DIR)/usr/share/terminfo/`dirname $${f}`; \ mkdir -p $(IDIR_LIBNCURSES)/usr/share/terminfo/`dirname $${f}`; \
cp -fpR \ cp -fpR \
$(PKG_BUILD_DIR)/install/usr/share/terminfo/$${f} \ $(PKG_BUILD_DIR)/install/usr/share/terminfo/$${f} \
$(PKG_IPK_DIR)/usr/share/terminfo/$${f}; \ $(IDIR_LIBNCURSES)/usr/share/terminfo/$${f}; \
done done
mkdir -p $(PACKAGE_DIR) mkdir -p $(PACKAGE_DIR)
$(IPKG_BUILD) $(PKG_IPK_DIR) $(PACKAGE_DIR) $(IPKG_BUILD) $(IDIR_LIBNCURSES) $(PACKAGE_DIR)
$(IPKG_STATE_DIR)/info/$(PKG_NAME).list: $(PKG_IPK) $(INFO_LIBNCURSES): $(IPKG_LIBNCURSES)
$(IPKG) install $(PKG_IPK) $(IPKG) install $(IPKG_LIBNCURSES)
source: $(DL_DIR)/$(PKG_SOURCE) source: $(DL_DIR)/$(PKG_SOURCE)
prepare: $(PKG_BUILD_DIR)/.unpacked prepare: $(PKG_BUILD_DIR)/.prepared
compile: $(STAGING_DIR)/usr/include/ncurses.h $(PKG_IPK) compile: $(IPKG_LIBNCURSES)
install: $(IPKG_STATE_DIR)/info/$(PKG_NAME).list install: $(INFO_LIBNCURSES)
clean: clean:
rm -rf $(PKG_BUILD_DIR) -$(MAKE) -C $(PKG_BUILD_DIR) \
rm -f $(PKG_IPK) DESTDIR="$(STAGING_DIR)" \
uninstall
rm -rf $(PKG_BUILD_DIR) $(IPKG_LIBNCURSES)

View File

@ -2,30 +2,33 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME := pcre PKG_NAME:=pcre
PKG_VERSION := 5.0 PKG_VERSION:=5.0
PKG_RELEASE := 3 PKG_RELEASE:=3
PKG_MD5SUM := 53976b62032fd5c76678274e5fd196b4 PKG_MD5SUM:=53976b62032fd5c76678274e5fd196b4
PKG_SOURCE_URL := ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/ \ PKG_SOURCE_URL:=\
ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/ \
http://nthill.free.fr/openwrt/sources/$(PKG_NAME)/ http://nthill.free.fr/openwrt/sources/$(PKG_NAME)/
PKG_SOURCE := $(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_CAT:=zcat
PKG_CAT := zcat
PKG_IPK := $(PACKAGE_DIR)/lib$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_IPK_DIR := $(PKG_BUILD_DIR)/ipkg
IPKG_LIBPCRE:=$(PACKAGE_DIR)/lib$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
IDIR_LIBPCRE:=$(PKG_BUILD_DIR)/ipkg/lib$(PKG_NAME)
INFO_LIBPCRE:=$(IPKG_STATE_DIR)/info/lib$(PKG_NAME).list
$(DL_DIR)/$(PKG_SOURCE): $(DL_DIR)/$(PKG_SOURCE):
mkdir -p $(DL_DIR)
$(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE) $(PKG_MD5SUM) $(PKG_SOURCE_URL) $(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE) $(PKG_MD5SUM) $(PKG_SOURCE_URL)
$(PKG_BUILD_DIR)/.patched: $(DL_DIR)/$(PKG_SOURCE) $(PKG_BUILD_DIR)/.prepared: $(DL_DIR)/$(PKG_SOURCE)
$(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - $(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
# $(PATCH) $(PKG_BUILD_DIR) ./patches # $(PATCH) $(PKG_BUILD_DIR) ./patches
touch $(PKG_BUILD_DIR)/.patched touch $(PKG_BUILD_DIR)/.prepared
$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.patched $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
(cd $(PKG_BUILD_DIR); rm -rf config.cache; \ (cd $(PKG_BUILD_DIR); rm -rf config.cache config.status; \
$(TARGET_CONFIGURE_OPTS) \ $(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \ CFLAGS="$(TARGET_CFLAGS)" \
CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
@ -74,21 +77,21 @@ $(STAGING_DIR)/usr/lib/libpcre.so: $(PKG_BUILD_DIR)/.built
install install
rm -f $(STAGING_DIR)/usr/lib/libpcre*.la rm -f $(STAGING_DIR)/usr/lib/libpcre*.la
$(PKG_IPK): $(STAGING_DIR)/usr/lib/libpcre.so $(IPKG_LIBPCRE): $(STAGING_DIR)/usr/lib/libpcre.so
$(SCRIPT_DIR)/make-ipkg-dir.sh $(PKG_IPK_DIR) libpcre.control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH) $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_LIBPCRE) lib$(PKG_NAME).control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
mkdir -p $(PKG_IPK_DIR)/usr/lib mkdir -p $(IDIR_LIBPCRE)/usr/lib
cp -fp $(STAGING_DIR)/usr/lib/libpcre*.so.* $(PKG_IPK_DIR)/usr/lib/ cp -fp $(STAGING_DIR)/usr/lib/libpcre*.so.* $(IDIR_LIBPCRE)/usr/lib/
$(STRIP) $(PKG_IPK_DIR)/usr/lib/*.so* $(STRIP) $(IDIR_LIBPCRE)/usr/lib/lib*.so*
mkdir -p $(PACKAGE_DIR) mkdir -p $(PACKAGE_DIR)
$(IPKG_BUILD) $(PKG_IPK_DIR) $(PACKAGE_DIR) $(IPKG_BUILD) $(IDIR_LIBPCRE) $(PACKAGE_DIR)
$(IPKG_STATE_DIR)/info/libpcre.list: $(PKG_IPK) $(INFO_LIBPCRE): $(IPKG_LIBPCRE)
$(IPKG) install $(PKG_IPK) $(IPKG) install $(IPKG_LIBPCRE)
source: $(DL_DIR)/$(PKG_SOURCE) source: $(DL_DIR)/$(PKG_SOURCE)
prepare: $(PKG_BUILD_DIR)/.patched prepare: $(PKG_BUILD_DIR)/.prepared
compile: $(PKG_IPK) compile: $(IPKG_LIBPCRE)
install: $(IPKG_STATE_DIR)/info/libpcre.list install: $(INFO_LIBPCRE)
clean: clean:
rm -rf \ rm -rf \
@ -97,5 +100,4 @@ clean:
$(STAGING_DIR)/usr/lib/libpcre* \ $(STAGING_DIR)/usr/lib/libpcre* \
$(STAGING_DIR)/usr/lib/pkgconfig/libpcre.pc \ $(STAGING_DIR)/usr/lib/pkgconfig/libpcre.pc \
$(STAGING_DIR)/usr/share/man/man*/pcre* \ $(STAGING_DIR)/usr/share/man/man*/pcre* \
$(PKG_BUILD_DIR) \ $(PKG_BUILD_DIR) $(IPKG_LIBPCRE)
$(PKG_IPK) \

View File

@ -2,30 +2,33 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME := popt PKG_NAME:=popt
PKG_VERSION := 1.7 PKG_VERSION:=1.7
PKG_RELEASE := 4 PKG_RELEASE:=4
PKG_MD5SUM := 5988e7aeb0ae4dac8d83561265984cc9 PKG_MD5SUM:=5988e7aeb0ae4dac8d83561265984cc9
PKG_SOURCE_URL := ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.1.x/ \ PKG_SOURCE_URL:=\
ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.1.x/ \
http://nthill.free.fr/openwrt/sources/$(PKG_NAME)/ http://nthill.free.fr/openwrt/sources/$(PKG_NAME)/
PKG_SOURCE := $(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_CAT:=zcat
PKG_CAT := zcat
PKG_IPK := $(PACKAGE_DIR)/lib$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_IPK_DIR := $(PKG_BUILD_DIR)/ipkg
IPKG_LIBPOPT:=$(PACKAGE_DIR)/lib$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
IDIR_LIBPOPT:=$(PKG_BUILD_DIR)/ipkg/lib$(PKG_NAME)
INFO_LIBPOPT:=$(IPKG_STATE_DIR)/info/lib$(PKG_NAME).list
$(DL_DIR)/$(PKG_SOURCE): $(DL_DIR)/$(PKG_SOURCE):
mkdir -p $(DL_DIR)
$(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE) $(PKG_MD5SUM) $(PKG_SOURCE_URL) $(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE) $(PKG_MD5SUM) $(PKG_SOURCE_URL)
$(PKG_BUILD_DIR)/.patched: $(DL_DIR)/$(PKG_SOURCE) $(PKG_BUILD_DIR)/.prepared: $(DL_DIR)/$(PKG_SOURCE)
$(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - $(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
# $(PATCH) $(PKG_BUILD_DIR) ./patches # $(PATCH) $(PKG_BUILD_DIR) ./patches
touch $(PKG_BUILD_DIR)/.patched touch $(PKG_BUILD_DIR)/.prepared
$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.patched $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
(cd $(PKG_BUILD_DIR); rm -rf config.cache; \ (cd $(PKG_BUILD_DIR); rm -rf config.cache config.status; \
$(TARGET_CONFIGURE_OPTS) \ $(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \ CFLAGS="$(TARGET_CFLAGS)" \
CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
@ -56,35 +59,33 @@ $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.patched
touch $(PKG_BUILD_DIR)/.configured touch $(PKG_BUILD_DIR)/.configured
$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured
$(MAKE) -C "$(PKG_BUILD_DIR)" $(MAKE) -C $(PKG_BUILD_DIR)
touch $(PKG_BUILD_DIR)/.built touch $(PKG_BUILD_DIR)/.built
$(STAGING_DIR)/usr/lib/libpopt.so: $(PKG_BUILD_DIR)/.built $(STAGING_DIR)/usr/lib/libpopt.so: $(PKG_BUILD_DIR)/.built
$(MAKE) -C "$(PKG_BUILD_DIR)" \ $(MAKE) -C $(PKG_BUILD_DIR) \
DESTDIR="$(STAGING_DIR)" \ DESTDIR="$(STAGING_DIR)" \
install install
rm -f $(STAGING_DIR)/usr/lib/libpopt.la rm -f $(STAGING_DIR)/usr/lib/libpopt.la
$(PKG_IPK): $(STAGING_DIR)/usr/lib/libpopt.so $(IPKG_LIBPOPT): $(STAGING_DIR)/usr/lib/libpopt.so
$(SCRIPT_DIR)/make-ipkg-dir.sh $(PKG_IPK_DIR) libpopt.control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH) $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_LIBPOPT) lib$(PKG_NAME).control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
mkdir -p $(PKG_IPK_DIR)/usr/lib mkdir -p $(IDIR_LIBPOPT)/usr/lib
cp -fp $(STAGING_DIR)/usr/lib/libpopt.so.* $(PKG_IPK_DIR)/usr/lib/ cp -fp $(STAGING_DIR)/usr/lib/libpopt.so.* $(IDIR_LIBPOPT)/usr/lib/
$(STRIP) $(PKG_IPK_DIR)/usr/lib/*.so* $(STRIP) $(IDIR_LIBPOPT)/usr/lib/*.so*
mkdir -p $(PACKAGE_DIR) mkdir -p $(PACKAGE_DIR)
$(IPKG_BUILD) $(PKG_IPK_DIR) $(PACKAGE_DIR) $(IPKG_BUILD) $(IDIR_LIBPOPT) $(PACKAGE_DIR)
$(IPKG_STATE_DIR)/info/libpopt.list: $(PKG_IPK) $(INFO_LIBPOPT): $(IPKG_LIBPOPT)
$(IPKG) install $(PKG_IPK) $(IPKG) install $(IPKG_LIBPOPT)
source: $(DL_DIR)/$(PKG_SOURCE) source: $(DL_DIR)/$(PKG_SOURCE)
prepare: $(PKG_BUILD_DIR)/.patched prepare: $(PKG_BUILD_DIR)/.prepared
compile: $(PKG_IPK) compile: $(IPKG_LIBPOPT)
install: $(IPKG_STATE_DIR)/info/libpopt.list install: $(INFO_LIBPOPT)
clean: clean:
-$(MAKE) -C "$(PKG_BUILD_DIR)" \ -$(MAKE) -C $(PKG_BUILD_DIR) \
DESTDIR="$(STAGING_DIR)" \ DESTDIR="$(STAGING_DIR)" \
uninstall uninstall
rm -rf \ rm -rf $(PKG_BUILD_DIR) $(IPKG_LIBPOPT)
$(PKG_BUILD_DIR) \
$(PKG_IPK) \

View File

@ -2,66 +2,70 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME := zlib PKG_NAME:=zlib
PKG_VERSION := 1.2.2 PKG_VERSION:=1.2.2
PKG_RELEASE := 1 PKG_RELEASE:=1
PKG_MD5SUM := 68bd51aaa6558c3bc3fd4890e53413de PKG_MD5SUM:=68bd51aaa6558c3bc3fd4890e53413de
PKG_SOURCE_SITE := http://www.zlib.net/ PKG_SOURCE_URL:=\
PKG_SOURCE_FILE := $(PKG_NAME)-$(PKG_VERSION).tar.gz http://www.zlib.net/ \
PKG_SOURCE_CAT := zcat http://nthill.free.fr/openwrt/sources/$(PKG_NAME)/
PKG_SOURCE_DIR := $(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_SOURCE_DIR) PKG_CAT:=zcat
PKG_IPK := $(PACKAGE_DIR)/zlib_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
$(DL_DIR)/$(PKG_SOURCE_FILE): IPKG_ZLIB:=$(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
mkdir -p $(DL_DIR) IDIR_ZLIB:=$(PKG_BUILD_DIR)/ipkg/$(PKG_NAME)
$(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE_FILE) $(PKG_MD5SUM) $(PKG_SOURCE_SITE) INFO_ZLIB:=$(IPKG_STATE_DIR)/info/$(PKG_NAME).list
$(PKG_BUILD_DIR)/.patched: $(DL_DIR)/$(PKG_SOURCE_FILE) $(DL_DIR)/$(PKG_SOURCE):
mkdir -p $(TOOL_BUILD_DIR) $(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE) $(PKG_MD5SUM) $(PKG_SOURCE_URL)
$(PKG_SOURCE_CAT) $(DL_DIR)/$(PKG_SOURCE_FILE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
$(PKG_BUILD_DIR)/.prepared: $(DL_DIR)/$(PKG_SOURCE)
$(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
$(PATCH) $(PKG_BUILD_DIR) . $(PKG_NAME).patch $(PATCH) $(PKG_BUILD_DIR) . $(PKG_NAME).patch
touch $(PKG_BUILD_DIR)/.patched touch $(PKG_BUILD_DIR)/.prepared
$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.patched $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
(cd $(PKG_BUILD_DIR); \ (cd $(PKG_BUILD_DIR); \
$(TARGET_CONFIGURE_OPTS) \ $(TARGET_CONFIGURE_OPTS) \
./configure \ ./configure \
--prefix=/ \ --prefix=/usr \
--shared) --shared \
);
touch $(PKG_BUILD_DIR)/.configured touch $(PKG_BUILD_DIR)/.configured
$(PKG_BUILD_DIR)/libz.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) \
CFLAGS="$(TARGET_CFLAGS) $(CFLAGS_LARGEFILE)" \ CFLAGS="$(TARGET_CFLAGS) $(CFLAGS_LARGEFILE)" \
libz.a libz.so libz.a libz.so
touch $(PKG_BUILD_DIR)/.built
$(STAGING_DIR)/lib/libz.so: $(PKG_BUILD_DIR)/libz.so $(STAGING_DIR)/usr/lib/libz.so: $(PKG_BUILD_DIR)/.built
$(MAKE) -C $(PKG_BUILD_DIR) \ $(MAKE) -C $(PKG_BUILD_DIR) \
DESTDIR="$(STAGING_DIR)" \ DESTDIR="$(STAGING_DIR)" \
install install
$(PKG_IPK): $(STAGING_DIR)/lib/libz.so $(IPKG_ZLIB): $(STAGING_DIR)/usr/lib/libz.so
$(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_ZLIB) $(PKG_NAME).control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
mkdir -p $(IDIR_ZLIB)/usr/lib
cp -a $(STAGING_DIR)/usr/lib/libz.so.* $(IDIR_ZLIB)/usr/lib/
$(STRIP) $(IDIR_ZLIB)/usr/lib/lib*.so*
mkdir -p $(PACKAGE_DIR) mkdir -p $(PACKAGE_DIR)
$(SCRIPT_DIR)/make-ipkg-dir.sh $(PKG_BUILD_DIR)/ipkg/zlib zlib.control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH) $(IPKG_BUILD) $(IDIR_ZLIB) $(PACKAGE_DIR)
mkdir -p $(PKG_BUILD_DIR)/ipkg/zlib/usr/lib
cp -a $(PKG_BUILD_DIR)/libz.so.* $(PKG_BUILD_DIR)/ipkg/zlib/usr/lib
$(STRIP) $(PKG_BUILD_DIR)/ipkg/zlib/usr/lib/*
$(IPKG_BUILD) $(PKG_BUILD_DIR)/ipkg/zlib $(PACKAGE_DIR)
$(IPKG_STATE_DIR)/info/zlib.list: $(PKG_IPK) $(INFO_ZLIB): $(IPKG_ZLIB)
$(IPKG) install $(PKG_IPK) $(IPKG) install $(IPKG_ZLIB)
source: $(DL_DIR)/$(PKG_SOURCE_FILE) source: $(DL_DIR)/$(PKG_SOURCE)
prepare: $(PKG_BUILD_DIR)/.patched prepare: $(PKG_BUILD_DIR)/.prepared
compile: $(STAGING_DIR)/lib/libz.so $(PKG_IPK) compile: $(IPKG_ZLIB)
install: $(PKG_ZLIB) $(IPKG_STATE_DIR)/info/zlib.list install: $(INFO_ZLIB)
clean: clean:
rm -rf $(PKG_BUILD_DIR) -$(MAKE) -C $(PKG_BUILD_DIR) \
rm -f $(STAGING_DIR)/lib/libz* $(STAGING_DIR)/include/zlib* DESTDIR="$(STAGING_DIR)" \
rm -f $(PACKAGE_DIR)/zlib\*.ipk uninstall
rm -rf $(PKG_BUILD_DIR) $(IPKG_ZLIB)