5f56078b1f9c0108d93f9f7dff6d80eafc835423
[openwrt/svn-archive/archive.git] / libs / libgdbm / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=libgdbm
12 PKG_VERSION:=1.8.3
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=gdbm-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@GNU/gdbm
17 PKG_MD5SUM:=1d1b1d5c0245b1c00aff92da751e9aa1
18 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/gdbm-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/libgdbm
26 SECTION:=libs
27 CATEGORY:=Libraries
28 TITLE:=GNU database manager
29 URL:=http://www.gnu.org/software/gdbm/
30 endef
31
32 define Build/Configure
33 $(call Build/Configure/Default, \
34 --enable-shared \
35 --enable-static \
36 )
37 endef
38
39 define Build/Compile
40 $(MAKE) -C $(PKG_BUILD_DIR) \
41 BINOWN=`id -u` \
42 BINGRP=`id -g` \
43 INSTALL_ROOT="$(PKG_INSTALL_DIR)" \
44 all install
45 endef
46
47 define Build/InstallDev
48 mkdir -p $(STAGING_DIR)/usr/include
49 $(CP) $(PKG_INSTALL_DIR)/usr/include/gdbm.h $(STAGING_DIR)/usr/include/
50 mkdir -p $(STAGING_DIR)/usr/lib
51 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgdbm.{a,so*} $(STAGING_DIR)/usr/lib/
52 endef
53
54 define Build/UninstallDev
55 rm -rf \
56 $(STAGING_DIR)/usr/include/gdbm.h \
57 $(STAGING_DIR)/usr/lib/libgdbm.{a,so*}
58 endef
59
60 define Package/libgdbm/install
61 install -d -m0755 $(1)/usr/lib
62 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgdbm.so.* $(1)/usr/lib/
63 endef
64
65 $(eval $(call BuildPackage,libgdbm))