如何在make menuconfig上创建创建的包?

时间:2013-02-06 18:58:41

标签: makefile openwrt

我正在尝试为OpenWrt创建一个libxerces包。按照此站点http://wiki.openwrt.org/doc/devel/packages的说明,我在packages目录中创建了一个名为libxerces-c的文件夹,并在make menuconfig中创建了一个简单的Makefile,但是它没有发生。

Makefile定义如下:

#
# Copyright (C) 2006-2013 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

# Name and release number of this package
PKG_NAME:=xerces-c
PKG_VERSION:=3.1.1
PKG_RELEASE:=1

PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://apache.mirror.pop-sc.rnp.br/apache//xerces/c/3/sources/
PKG_CAT:=zcat

include $(INCLUDE_DIR)/package.mk

# Specify package information for this program. 
# The variables defined here should be self explanatory.
define Package/libxerces
  SECTION:=libs
  CATEGORY:=Libraries
  TITLE:=Validating XML parser written in a portable subset of C++.
  URL:=http://xerces.apache.org/
endef

define Package/libxerces/description
  Xerces-C++ is a validating XML parser written in a portable subset of
  C++.  Xerces-C++ makes it easy to give your application the ability
  to read and write XML data. A shared library is provided for parsing,
  generating, manipulating, and validating XML documents. Xerces-C++ is
  faithful to the XML 1.0 recommendation and associated standards (DOM
  1.0, DOM 2.0, SAX 1.0, SAX 2.0, Namespaces, XML Schema Part 1 and
  Part 2).  It also provides experimental implementations of XML 1.1
  and DOM Level 3.0.  The parser provides high performance, modularity,
  and scalability.
endef     

CONFIGURE_ARGS+= --host=mips-openwrt-linux

define Build/Configure
  $(call Build/Configure/Default)    
endef

define Build/Compile
  $(call Build/Compile/Default)
endef

define Package/libxerces/install
endef

$(eval $(call BuildPackage,libxerces))

我已经尝试执行安装脚本

./scripts/feeds install libxerces-c

但什么都没发生。执行make menuconfig后我仍然看不到包。

3 个答案:

答案 0 :(得分:0)

你需要

  1. 将包含的 Feed 添加到feeds.conf.default或创建feeds.conf

  2. 然后./scripts/feeds update -a(更新所有Feed ...您只需设置Feed的名称,而不是使用-a

  3. 然后./scripts/feeds install foobar

  4. [...]

    ...当您的包名为libxerces-c时,您显然在libxerces上调用了安装?

答案 1 :(得分:0)

可能你还没有找到它,但这里是答案。 要使您的包出现在menuconfig TUI中,您需要添加以下内容 make Package子句中的Makefile选项:

MENU:1

因此,Makefile的这一部分将如下所示:

define Package/libxerces
SECTION:=libs
  CATEGORY:=Libraries
  TITLE:=Validating XML parser written in a portable subset of C++.
  URL:=http://xerces.apache.org/
endef

答案 2 :(得分:0)

你能做make menuconfig,看看是否有任何关于你的软件包的错误消息' libxerces'显示。我对自定义软件包的设置如下:

mkdir package/custom
mkdir package/custom/
ln -s /path/to/package/libxerces/ package/custom/

如果你的makefile是正确的,那么libraries-> libxerces应该出现在menuconfig中,如果没有错误消息应该打印在make / make menuconfig上。您也可以make package/libxerces/compile等。注意:您的包名称是libxerces而不是libxerces-c。