2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
11 CATEGORY
:=Extra packages
15 MAINTAINER
:=OpenWrt Developers Team
<openwrt-devel@openwrt.org
>
16 SOURCE
:=$(patsubst $(TOPDIR
)/%,%,$(CURDIR
))
17 ifneq ($(PKG_VERSION
),)
18 ifneq ($(PKG_RELEASE
),)
19 VERSION
:=$(PKG_VERSION
)-$(PKG_RELEASE
)
21 VERSION
:=$(PKG_VERSION
)
24 VERSION
:=$(PKG_RELEASE
)
38 Build
/Patch
:=$(Build
/Patch
/Default
)
39 ifneq ($(strip $(PKG_UNPACK
)),)
40 define Build
/Prepare
/Default
46 CONFIGURE_PREFIX
:=/usr
48 --target
=$(GNU_TARGET_NAME
) \
49 --host
=$(GNU_TARGET_NAME
) \
50 --build
=$(GNU_HOST_NAME
) \
53 --prefix=$(CONFIGURE_PREFIX
) \
54 --exec-prefix
=$(CONFIGURE_PREFIX
) \
55 --bindir=$(CONFIGURE_PREFIX
)/bin \
56 --sbindir
=$(CONFIGURE_PREFIX
)/sbin \
57 --libexecdir
=$(CONFIGURE_PREFIX
)/lib \
59 --datadir=$(CONFIGURE_PREFIX
)/share \
60 --localstatedir
=/var \
61 --mandir=$(CONFIGURE_PREFIX
)/man \
62 --infodir=$(CONFIGURE_PREFIX
)/info \
66 $(TARGET_CONFIGURE_OPTS
) \
67 CFLAGS
="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
68 CXXFLAGS
="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
69 CPPFLAGS
="$(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
70 LDFLAGS
="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)" \
73 CONFIGURE_CMD
= .
/configure
75 replace_script
=$(FIND
) $(1) -name
$(2) |
$(XARGS
) chmod u
+w
; $(FIND
) $(1) -name
$(2) |
$(XARGS
) -n1 cp
$(SCRIPT_DIR
)/$(2);
77 define Build
/Configure
/Default
78 (cd
$(PKG_BUILD_DIR
)/$(CONFIGURE_PATH
)/$(strip $(3)); \
79 if
[ -x
$(CONFIGURE_CMD
) ]; then \
80 $(call replace_script
,$(PKG_BUILD_DIR
)/$(3),config.guess
) \
81 $(call replace_script
,$(PKG_BUILD_DIR
)/$(3),config.sub
) \
92 CFLAGS
="$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
93 CXXFLAGS
="$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
94 LDFLAGS
="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)"
97 $(TARGET_CONFIGURE_OPTS
) \
98 CROSS
="$(TARGET_CROSS)" \
101 MAKE_INSTALL_FLAGS
= \
103 DESTDIR
="$(PKG_INSTALL_DIR)"
107 define Build
/Compile
/Default
109 $(MAKE
) -C
$(PKG_BUILD_DIR
)/$(MAKE_PATH
) \
114 define Build
/Install
/Default
116 $(MAKE
) -C
$(PKG_BUILD_DIR
)/$(MAKE_PATH
) \
117 $(MAKE_INSTALL_FLAGS
) \