update to new upstream release (v1.0),
[openwrt.git] / package / libgdbm / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=libgdbm
6 PKG_VERSION:=1.8.3
7 PKG_RELEASE:=0
8 PKG_MD5SUM:=1d1b1d5c0245b1c00aff92da751e9aa1
9
10 PKG_SOURCE_URL:=http://ftp.gnu.org/gnu/gdbm/
11 PKG_SOURCE:=gdbm-$(PKG_VERSION).tar.gz
12 PKG_CAT:=zcat
13
14 PKG_BUILD_DIR:=$(BUILD_DIR)/gdbm-$(PKG_VERSION)
15 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
16
17 include $(TOPDIR)/package/rules.mk
18
19 $(eval $(call PKG_template,LIBGDBM,libgdbm,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
20
21 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
22 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
23 $(TARGET_CONFIGURE_OPTS) \
24 CFLAGS="$(TARGET_CFLAGS)" \
25 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
26 LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
27 ./configure \
28 --target=$(GNU_TARGET_NAME) \
29 --host=$(GNU_TARGET_NAME) \
30 --build=$(GNU_HOST_NAME) \
31 --program-prefix="" \
32 --program-suffix="" \
33 --prefix=/usr \
34 --exec-prefix=/usr \
35 --bindir=/usr/bin \
36 --datadir=/usr/share \
37 --includedir=/usr/include \
38 --infodir=/usr/share/info \
39 --libdir=/usr/lib \
40 --libexecdir=/usr/lib \
41 --localstatedir=/var \
42 --mandir=/usr/share/man \
43 --sbindir=/usr/sbin \
44 --sysconfdir=/etc \
45 $(DISABLE_NLS) \
46 $(DISABLE_LARGEFILE) \
47 --enable-shared \
48 --enable-static \
49 );
50 touch $@
51
52 $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured
53 rm -rf $(PKG_INSTALL_DIR)
54 mkdir -p $(PKG_INSTALL_DIR)
55 $(MAKE) -C $(PKG_BUILD_DIR) \
56 BINOWN=`id -u` \
57 BINGRP=`id -g` \
58 $(TARGET_CONFIGURE_OPTS) \
59 INSTALL_ROOT="$(PKG_INSTALL_DIR)" \
60 all install
61 touch $@
62
63 $(IPKG_LIBGDBM): $(STAGING_DIR)/usr/lib/libgdbm.so
64 install -m0755 -d $(IDIR_LIBGDBM)/usr/lib
65 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libgdbm.so.* $(IDIR_LIBGDBM)/usr/lib/
66 $(RSTRIP) $(IDIR_LIBGDBM)
67 $(IPKG_BUILD) $(IDIR_LIBGDBM) $(PACKAGE_DIR)
68
69 $(STAGING_DIR)/usr/lib/libgdbm.so: $(PKG_BUILD_DIR)/.built
70 mkdir -p $(STAGING_DIR)/usr/include
71 cp -fpR $(PKG_INSTALL_DIR)/usr/include/gdbm.h $(STAGING_DIR)/usr/include/
72 mkdir -p $(STAGING_DIR)/usr/lib
73 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libgdbm.{a,so*} $(STAGING_DIR)/usr/lib/
74 touch $(STAGING_DIR)/usr/lib/libgdbm.so
75
76 install-dev: $(STAGING_DIR)/usr/lib/libgdbm.so
77
78 uninstall-dev:
79 rm -rf $(STAGING_DIR)/usr/include/gdbm.h
80 rm -rf $(STAGING_DIR)/usr/lib/libgdbm.{a,so*}
81
82 compile: install-dev
83 clean: uninstall-dev
This page took 0.044369 seconds and 5 git commands to generate.