2013-02-06 100 views
4

我正在嘗試爲OpenWrt創建一個libxerces包。從本網站http://wiki.openwrt.org/doc/devel/packages下面的說明,我創建了一個名爲packages目錄和一個簡單的Makefile文件對make menuconfig後列出的包內libxerces-C文件夾,但它沒有發生。如何使make menuconfig上創建的軟件包可用?

的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後仍然看不到包。

回答

0

您需要

  1. 與包添加飼料feeds.conf.default或創建feeds.conf

  2. 然後./scripts/feeds update -a(更新所有的飼料......你可以只設置進的名字代替使用-a

  3. 然後./scripts/feeds install foobar

[...]

...你明明叫上安裝libxerces-c,而你的包被稱爲libxerces

+0

你也可以簡單地用你的Makefile在$的buildroot /包/目錄添加一個文件夾。 – 0xception

0

也許你是不是還在尋找,但這裏就是答案。 你的包在menuconfig的TUI出現需要以下 選項添加到您的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 
0

你可以做一個make menuconfig,看看是否顯示關於你的軟件包'libxerces'的錯誤信息。我對定製軟件包的設置是這樣的:

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

如果你的makefile是正確的,那麼Libraries-> libxerces應該出現在menuconfig的,如果不是錯誤消息應該化妝上打印/ make menuconfig進行。你也可以做make package/libxerces/compile等。注意:你的軟件包名稱是libxerces而不是libxerces-c。