Uniformize package Makefile

SVN-Revision: 640
owl
Nicolas Thill 2005-04-14 06:11:36 +00:00
parent d900a01514
commit df8bfc3b54
8 changed files with 319 additions and 265 deletions

View File

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

View File

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

View File

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

View File

@ -2,43 +2,44 @@
include $(TOPDIR)/rules.mk
PKG_NAME := mysql
PKG_VERSION := 4.0.24
PKG_RELEASE := 2
PKG_MD5SUM := 408d3001ed715ddc90009c247e548638
PKG_NAME:=mysql
PKG_VERSION:=4.0.24
PKG_RELEASE:=2
PKG_MD5SUM:=408d3001ed715ddc90009c247e548638
PKG_SOURCE_SITE := \
PKG_SOURCE_URL:=\
http://mysql.he.net/Downloads/MySQL-4.0/ \
http://www.linorg.usp.br/mysql/Downloads/MySQL-4.0/ \
http://mysql.planetmirror.com/Downloads/MySQL-4.0/ \
http://mysql.holywar.net/Downloads/MySQL-4.0/ \
http://netmirror.org/mirror/mysql.com/Downloads/MySQL-4.0/ \
http://nthill.free.fr/openwrt/sources/$(PKG_NAME)/
PKG_SOURCE_FILE := $(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_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
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_CAT:=zcat
$(DL_DIR)/$(PKG_SOURCE_FILE):
mkdir -p $(DL_DIR)
$(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE_FILE) $(PKG_MD5SUM) $(PKG_SOURCE_SITE)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
$(PKG_BUILD_DIR)/.patched: $(DL_DIR)/$(PKG_SOURCE_FILE)
$(PKG_SOURCE_CAT) $(DL_DIR)/$(PKG_SOURCE_FILE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
IPKG_LIBMYSQLCLIENT:=$(PACKAGE_DIR)/libmysqlclient_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
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
touch $(PKG_BUILD_DIR)/.patched
touch $(PKG_BUILD_DIR)/.prepared
$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.patched
(cd $(PKG_BUILD_DIR); rm -rf config.cache; \
$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
(cd $(PKG_BUILD_DIR); rm -rf config.cache config.status; \
touch configure.in; \
touch aclocal.m4; \
touch Makefile.in; \
touch config.h.in; \
touch configure; \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="-I$(STAGING_DIR)/usr/include" \
CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
OPTIMIZE_CFLAGS="$(TARGET_CFLAGS)" \
OPTIMIZE_CXXFLAGS="$(TARGET_CFLAGS)" \
@ -52,16 +53,22 @@ $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.patched
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/ \
--exec-prefix=/ \
--program-prefix="" \
--program-suffix="" \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/lib \
--sysconfdir=/etc \
--datadir=/usr/share \
--includedir=/usr/include \
--infodir=/usr/share/info \
--libdir=/usr/lib \
--libexecdir=/usr/lib \
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
--mandir=/usr/share/man \
--sbindir=/usr/sbin \
--sysconfdir=/etc \
$(DISABLE_NLS) \
$(DISABLE_LARGEFILE) \
--enable-shared \
--enable-static \
--disable-assembler \
@ -80,12 +87,10 @@ $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.patched
--without-docs \
--without-bench \
--without-readline \
$(DISABLE_NLS) \
$(DISABLE_LARGEFILE) \
);
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" \
CC="$(HOSTCC)" \
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)" \
SUBDIRS="include libmysql" \
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)" \
DESTDIR="$(STAGING_DIR)" \
SUBDIRS="include libmysql" \
install
rm -rf $(STAGING_DIR)/usr/lib/mysql/libmysqlclient.la
$(PKG_IPK): $(PKG_BUILD_DIR)/libmysql/.libs/libmysqlclient.so
$(SCRIPT_DIR)/make-ipkg-dir.sh $(PKG_IPK_DIR) libmysqlclient.control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
mkdir -p $(PKG_IPK_DIR)/usr/lib
cp $< $(PKG_IPK_DIR)/usr/lib/
$(STRIP) $(PKG_IPK_DIR)/usr/lib/*
$(IPKG_LIBMYSQLCLIENT): $(STAGING_DIR)/usr/lib/mysql/libmysqlclient.so
$(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_LIBMYSQLCLIENT) libmysqlclient.control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
mkdir -p $(IDIR_LIBMYSQLCLIENT)/usr/lib
cp -fp $(STAGING_DIR)/usr/lib/mysql/libmysqlclient.so.* $(IDIR_LIBMYSQLCLIENT)/usr/lib/
$(STRIP) $(IDIR_LIBMYSQLCLIENT)/usr/lib/*.so*
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)
$(IPKG) install $(PKG_IPK)
$(INFO_LIBMYSQLCLIENT): $(IPKG_LIBMYSQLCLIENT)
$(IPKG) install $(IPKG_LIBMYSQLCLIENT)
source: $(DL_DIR)/$(PKG_SOURCE)
prepare: $(PKG_BUILD_DIR)/.patched
compile: $(STAGING_DIR)/include/mysql/mysql.h $(PKG_IPK)
install: $(IPKG_STATE_DIR)/info/libmysqlclient.list
prepare: $(PKG_BUILD_DIR)/.prepared
compile: $(IPKG_LIBMYSQLCLIENT)
install: $(INFO_LIBMYSQLCLIENT)
clean:
rm -rf $(PKG_BUILD_DIR)
rm -f $(PKG_IPK)
-$(MAKE) -C "$(PKG_BUILD_DIR)" \
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_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://ftp.uu.net/archive/systems/gnu/$(PKG_NAME) \
ftp://ftp.eu.uu.net/pub/gnu/$(PKG_NAME) \
ftp://ftp.funet.fi/pub/gnu/prep/$(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_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
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):
$(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) -
touch $(PKG_BUILD_DIR)/.unpacked
touch $(PKG_BUILD_DIR)/.prepared
$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.unpacked
(cd $(PKG_BUILD_DIR); rm -rf config.cache; \
$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
(cd $(PKG_BUILD_DIR); rm -rf config.cache config.status; \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \
CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
ac_cv_linux_vers="2" \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--program-prefix="" \
--program-suffix="" \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/lib \
--sysconfdir=/etc \
--datadir=/usr/share \
--includedir=/usr/include \
--infodir=/usr/share/info \
--libdir=/usr/lib \
--libexecdir=/usr/lib \
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
--mandir=/usr/share/man \
--sbindir=/usr/sbin \
--sysconfdir=/etc \
$(DISABLE_NLS) \
$(DISABLE_LARGEFILE) \
--with-terminfo-dirs=/usr/share/terminfo \
--with-default-terminfo-dir=/usr/share/terminfo \
--without-ada \
@ -61,8 +73,6 @@ $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.unpacked
--enable-overwrite \
--with-shared \
--with-normal \
$(DISABLE_NLS) \
$(DISABLE_LARGEFILE) \
);
touch $(PKG_BUILD_DIR)/.configured
@ -78,33 +88,36 @@ $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured
install
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) \
DESTDIR="$(STAGING_DIR)" \
install
$(PKG_IPK): $(PKG_BUILD_DIR)/.built
$(SCRIPT_DIR)/make-ipkg-dir.sh $(PKG_IPK_DIR) libncurses.control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
mkdir -p $(PKG_IPK_DIR)/usr/lib
cp -a $(PKG_BUILD_DIR)/lib/lib*.so.* $(PKG_IPK_DIR)/usr/lib/
mkdir -p $(PKG_IPK_DIR)/usr/share/terminfo
$(IPKG_LIBNCURSES): $(STAGING_DIR)/usr/lib/libncurses.so
$(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_LIBNCURSES) lib$(PKG_NAME).control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
mkdir -p $(IDIR_LIBNCURSES)/usr/lib
cp -fp $(STAGING_DIR)/usr/lib/lib{ncurses,panel}*.so.* $(IDIR_LIBNCURSES)/usr/lib/
$(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 \
mkdir -p $(PKG_IPK_DIR)/usr/share/terminfo/`dirname $${f}`; \
mkdir -p $(IDIR_LIBNCURSES)/usr/share/terminfo/`dirname $${f}`; \
cp -fpR \
$(PKG_BUILD_DIR)/install/usr/share/terminfo/$${f} \
$(PKG_IPK_DIR)/usr/share/terminfo/$${f}; \
$(IDIR_LIBNCURSES)/usr/share/terminfo/$${f}; \
done
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)
$(IPKG) install $(PKG_IPK)
$(INFO_LIBNCURSES): $(IPKG_LIBNCURSES)
$(IPKG) install $(IPKG_LIBNCURSES)
source: $(DL_DIR)/$(PKG_SOURCE)
prepare: $(PKG_BUILD_DIR)/.unpacked
compile: $(STAGING_DIR)/usr/include/ncurses.h $(PKG_IPK)
install: $(IPKG_STATE_DIR)/info/$(PKG_NAME).list
prepare: $(PKG_BUILD_DIR)/.prepared
compile: $(IPKG_LIBNCURSES)
install: $(INFO_LIBNCURSES)
clean:
rm -rf $(PKG_BUILD_DIR)
rm -f $(PKG_IPK)
-$(MAKE) -C $(PKG_BUILD_DIR) \
DESTDIR="$(STAGING_DIR)" \
uninstall
rm -rf $(PKG_BUILD_DIR) $(IPKG_LIBNCURSES)

View File

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

View File

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

View File

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