OpenWRT Makefile

Jann Traschewski jann at gmx.de
Thu Nov 5 21:08:28 CET 2009


I wrote:

> - Determine the endianness by used crosscompiler (I put 
> "bird_cv_c_endian=little-endian" for my Mipsel target into 
> CONFIGURE_ARGS as a workaround). Maybe this check could be 
> done using the configure-script.

After the release of V1.1.5 I was able to crosscompile BIRD using the
OpenWRT buildsystem without my "hack".

> - Find out how to get a package compiled with the buildsystem 
> depending on "readline" (I put "--disable-client" into 
> CONFIGURE_ARGS as a workaround). I managed to compile it 
> manually by crosscompiling the readline lib before.

Further I figured out how to handle the readline dependency.

> - Startupscripts: We need to put a startupscript depending on 
> the used OpenWRT version into the archive. I did include the 
> /etc/bird.conf file already.

It seems a user has to say "/etc/init.d/bird enable" to set a permanent
symlink to /etc/rc.d which will enable BIRD at startup.

Looking closer into the buildsystem I still have some questions:
- It might be worth to split "bird" and "birdc" into two packages since
birdc depends on libncurses and libreadline which takes much space on a
router. What do you think?
- Do I have to compile "birdc6 (or bird6c?)" if I want to provide the
"bird6"-package or is the client the same for IPv4 and IPv6?

The current Makefile looks like this:
----------
include $(TOPDIR)/rules.mk

PKG_NAME:=bird
PKG_VERSION:=1.1.5
PKG_RELEASE:=1

PKG_SOURCE:=bird-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=ftp://bird.network.cz/pub/bird
PKG_MD5SUM:=87e005d258198d9ee4e4481164bf8c18

PKG_BUILD_DEPENDS:=libreadline

PKG_BUILD_DIR:=$(BUILD_DIR)/bird-$(PKG_VERSION)

include $(INCLUDE_DIR)/package.mk

define Package/$(PKG_NAME)
  SECTION:=net
  CATEGORY:=Network
  TITLE:=The BIRD Internet Routing Daemon
  URL:=http://bird.network.cz
  DEPENDS:=+libncurses +libreadline
endef

define Package/$(PKG_NAME)/description
The BIRD project aims to develop a fully functional dynamic IP routing
daemon.
endef

CONFIGURE_ARGS += --with-linux-headers="$(LINUX_DIR)" -prefix=

define Package/$(PKG_NAME)/conffiles
/etc/bird.conf
endef

define Package/$(PKG_NAME)/install
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_DIR) $(1)/etc/init.d
        $(INSTALL_BIN) ./files/bird.init $(1)/etc/init.d/bird
        $(INSTALL_DATA) $(PKG_BUILD_DIR)/doc/bird.conf.example
$(1)/etc/bird.conf
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/bird $(1)/usr/sbin/
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/birdc $(1)/usr/sbin/
endef

$(eval $(call BuildPackage,$(PKG_NAME)))
----------

Any comments?
Bye,
Jann


--
Jann Traschewski, Drosselstr.1, D-90513 Zirndorf, Germany
Tel.: +49-911-696971, Mobile: +49-170-1045937, E-Mail: jann at gmx.de
Ham: DG8NGN / DB0VOX, http://www.qsl.net/dg8ngn, ICQ UIN: 4130182 
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4358 bytes
Desc: not available
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20091105/7de1f4dd/attachment.bin>


More information about the Bird-users mailing list