mxml: moved to github
[openwrt.org/packages.git] / libs / Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
#
# Copyright (C) 2006-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
 
include $(TOPDIR)/rules.mk
 
PKG_NAME:=libdnet
PKG_VERSION:=1.11
PKG_RELEASE:=2
 
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/$(PKG_NAME)
PKG_MD5SUM:=04c394ed8e1e7fc455456e79e908916d
 
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
 
PKG_CONFIG_DEPENDS:=\
        CONFIG_PACKAGE_libdnet \
        CONFIG_PACKAGE_pydnet
 
PKG_BUILD_DEPENDS:=PACKAGE_pydnet:python
 
include $(INCLUDE_DIR)/package.mk
$(call include_mk, python-package.mk)
 
define Package/libdnet/Default
  SECTION:=libs
  CATEGORY:=Libraries
  TITLE:=Low-level network library
  URL:=http://sourceforge.net/projects/libdnet/
endef
 
define Package/libdnet/Default/description
        libdnet is a library of simplified, portable interface to several
        low-level networking routines.
endef
 
define Package/libdnet
  $(call Package/libdnet/Default)
endef
 
define Package/libdnet/description
  $(call Package/libdnet/Default/description)
endef
 
define Package/pydnet
  $(call Package/libdnet/Default)
  DEPENDS:=libdnet +python-mini
endef
 
define Package/pydnet/description
  $(call Package/libdnet/Default/description)
  This package contains the python dnet library.
endef
 
TARGET_CFLAGS += $(FPIC)
 
CONFIGURE_ARGS += \
        --enable-shared \
        --enable-static \
        --without-check \
        --without-python
 
CONFIGURE_VARS += \
        ac_cv_dnet_bsd_bpf=no
 
MAKE_FLAGS += \
        CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE"
 
define Build/Configure
        (cd $(PKG_BUILD_DIR); \
                ln -sf config/acinclude.m4 . ; \
                autoreconf -v --install || exit 1 \
        );
        $(call Build/Configure/Default)
endef
 
define Build/Compile
        $(call Build/Compile/Default)
        $(if $(CONFIG_PACKAGE_pydnet), \
                $(call Build/Compile/PyMod, \
                        python/, \
                        build \
                ) \
        )
endef
 
define Build/Install
        $(call Build/Install/Default)
        $(if $(CONFIG_PACKAGE_pydnet), \
                $(call Build/Compile/PyMod, \
                        python/, \
                        install --no-compile --prefix $(PKG_INSTALL_DIR)/usr \
                ) \
        )
endef
 
define Build/InstallDev
        $(INSTALL_DIR) $(2)/bin
        $(INSTALL_BIN) \
                $(PKG_INSTALL_DIR)/usr/bin/dnet-config \
                $(2)/bin/
        $(SED) \
                's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
                $(2)/bin/dnet-config
 
        $(INSTALL_DIR) $(1)/usr/include
        $(INSTALL_DATA)\
                $(PKG_INSTALL_DIR)/usr/include/dnet.h \
                $(1)/usr/include/
        $(CP) \
                $(PKG_INSTALL_DIR)/usr/include/dnet \
                $(1)/usr/include/
 
        $(INSTALL_DIR) $(1)/usr/lib
        $(CP) \
                $(PKG_INSTALL_DIR)/usr/lib/libdnet.{la,a,so*} \
                $(1)/usr/lib/
endef
 
define Package/libdnet/install
        $(INSTALL_DIR) $(1)/usr/lib
        $(CP) \
                $(PKG_INSTALL_DIR)/usr/lib/libdnet.so.* \
                $(1)/usr/lib/
 
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) \
                $(PKG_INSTALL_DIR)/usr/sbin/dnet \
                $(1)/usr/sbin/
endef
 
define Package/pydnet/install
        $(INSTALL_DIR) $(1)/usr/lib
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/python* $(1)/usr/lib/
endef
 
 
$(eval $(call BuildPackage,libdnet))
$(eval $(call BuildPackage,pydnet))
 
comments