[package] sctp: Add SCTP library support
[packages.git] / libs / sctp / Makefile
1 #
2 # Copyright (C) 2010 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:=lksctp-tools
11 PKG_VERSION:=1.0.11
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@SF/lksctp/
16 PKG_MD5SUM:=e9cf6c57402c9d4f1173a9529466e16d
17
18 PKG_BUILD_DEPENDS:=binutils
19 PKG_FIXUP:=libtool
20 PKG_INSTALL:=1
21
22 include $(INCLUDE_DIR)/package.mk
23
24 #####
25 ## lksctp library: provides sctp_* functions in user space
26 #####
27
28 define Package/sctp
29   SECTION:=libs
30   CATEGORY:=Network
31   TITLE:=SCTP user-land library
32   URL:=http://lksctp.sourceforge.net
33   DEPENDS:=+kmod-sctp
34 endef
35
36 define Package/sctp/description
37  SCTP user-land library for sctp_* functions (when socket API is too limited).
38 endef
39
40 TARGET_LDFLAGS := -L$(STAGING_DIR)/usr/lib $(TARGET_LDFLAGS)
41
42 define Package/sctp/install
43         # Install the library in the router
44         $(INSTALL_DIR) $(1)/usr/lib
45         $(CP) \
46                 $(PKG_INSTALL_DIR)/usr/lib/libsctp.so* \
47                 $(1)/usr/lib/
48         # And also in staging for dependent packages
49         $(INSTALL_DIR) $(STAGING_DIR)/usr/include/netinet
50         $(CP) \
51                 $(PKG_INSTALL_DIR)/usr/include/netinet/* \
52                 $(STAGING_DIR)/usr/include/netinet/
53         $(INSTALL_DIR) $(STAGING_DIR)/usr/lib
54         $(CP) \
55                 $(PKG_INSTALL_DIR)/usr/lib/libsctp.so* \
56                 $(STAGING_DIR)/usr/lib/
57
58 endef
59
60 $(eval $(call BuildPackage,sctp))
61