[packages] libaio: update to v0.3.107, use "make install"
[openwrt/svn-archive/archive.git] / libs / libaio / Makefile
1 #
2 # Copyright (C) 2007-2009 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=libaio
11 PKG_VERSION:=0.3.107
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz
15 PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/liba/libaio/
16 PKG_MD5SUM:=db32c19c61ca937bcb1ba48da9180682
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/libaio
21 SECTION:=libs
22 CATEGORY:=Libraries
23 DEPENDS:=@LINUX_2_6
24 TITLE:=Linux kernel AIO interface access library
25 URL:=http://lse.sourceforge.net/io/aio.html
26 endef
27
28 define Build/Configure
29 endef
30
31 LIBAIO_CFLAGS:=-nostdlib -nostartfiles -I. $(TARGET_CFLAGS) $(TARGET_CPPFLAGS)
32
33 TARGET_CFLAGS += $(FPIC)
34
35 define Build/Compile
36 $(MAKE) -C $(PKG_BUILD_DIR) \
37 $(TARGET_CONFIGURE_OPTS) \
38 ARCH="$(ARCH)" \
39 CC="$(TARGET_CROSS)gcc" \
40 LD="$(TARGET_CROSS)ld" \
41 CFLAGS="$(LIBAIO_CFLAGS)" \
42 all
43 $(MAKE) -C $(PKG_BUILD_DIR) \
44 prefix="$(PKG_INSTALL_DIR)/usr" \
45 install
46 endef
47
48 define Build/InstallDev
49 $(INSTALL_DIR) $(1)/usr/include
50 $(CP) $(PKG_INSTALL_DIR)/usr/include/libaio.h $(1)/usr/include/
51 $(INSTALL_DIR) $(1)/usr/lib
52 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libaio.{a,so*} $(1)/usr/lib/
53 endef
54
55 define Package/libaio/install
56 $(INSTALL_DIR) $(1)/usr/lib
57 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libaio.so.* $(1)/usr/lib/
58 endef
59
60 $(eval $(call BuildPackage,libaio))