fix InstallDev / UninstallDev, cleanup, add 'svn:keywords' property
[openwrt/svn-archive/archive.git] / libs / libtool / 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:=libtool
12 PKG_VERSION:=1.5.22
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@GNU/libtool
17 PKG_MD5SUM:=8e0ac9797b62ba4dcc8a2fb7936412b0
18 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/libltdl
26 SECTION:=libs
27 CATEGORY:=Libraries
28 TITLE:=A generic dynamic object loading library
29 URL:=http://www.gnu.org/software/libtool/
30 endef
31
32 define Build/Configure
33 (cd $(PKG_BUILD_DIR); touch \
34 libltdl/configure.ac \
35 libltdl/acinclude.m4 \
36 libltdl/aclocal.m4 \
37 libltdl/Makefile.in \
38 libltdl/config-h.in \
39 libltdl/configure \
40 );
41 $(call Build/Configure/Default, \
42 --enable-shared \
43 --enable-static \
44 )
45 endef
46
47 define Build/Compile
48 $(MAKE) -C $(PKG_BUILD_DIR) \
49 DESTDIR="$(PKG_INSTALL_DIR)" \
50 all install
51 endef
52
53 define Build/InstallDev
54 mkdir -p $(STAGING_DIR)/usr/include
55 $(CP) $(PKG_INSTALL_DIR)/usr/include/ltdl.h $(STAGING_DIR)/usr/include/
56 mkdir -p $(I_LIBLTDL_DEV)/usr/lib
57 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libltdl.{a,so*} $(STAGING_DIR)/usr/lib/
58 endef
59
60 define Build/UninstallDev
61 rm -rf \
62 $(STAGING_DIR)/usr/include/ltdl.h \
63 $(STAGING_DIR)/usr/lib/libltdl.{a,so*}
64 endef
65
66 define Package/libltdl/install
67 install -m0755 -d $(1)/usr/lib
68 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libltdl.so.* $(1)/usr/lib/
69 endef
70
71 $(eval $(call BuildPackage,libltdl))