2009-05-18 00:49:50 +08:00
|
|
|
#
|
2009-05-18 01:09:12 +08:00
|
|
|
# Copyright (C) 2006-2009 OpenWrt.org
|
2008-07-29 12:16:43 +08:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=opkg
|
2009-05-18 01:09:12 +08:00
|
|
|
PKG_REV:=4993
|
2008-07-29 12:16:43 +08:00
|
|
|
PKG_VERSION:=$(PKG_REV)
|
2009-05-18 00:49:50 +08:00
|
|
|
PKG_RELEASE:=4
|
2008-07-29 12:16:43 +08:00
|
|
|
|
|
|
|
PKG_SOURCE_PROTO:=svn
|
|
|
|
PKG_SOURCE_VERSION:=$(PKG_REV)
|
|
|
|
PKG_SOURCE_SUBDIR:=opkg-$(PKG_VERSION)
|
|
|
|
PKG_SOURCE_URL:=http://svn.openmoko.org/trunk/src/target/opkg/
|
|
|
|
PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
|
|
|
|
PKG_FIXUP = libtool
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
|
|
|
define Package/opkg
|
|
|
|
SECTION:=base
|
|
|
|
CATEGORY:=Base system
|
|
|
|
TITLE:=opkg package management system
|
|
|
|
URL:=http://wiki.openmoko.org/wiki/Opkg
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/opkg/description
|
|
|
|
Lightweight package management system
|
|
|
|
opkg is the opkg Package Management System, for handling
|
|
|
|
installation and removal of packages on a system. It can
|
|
|
|
recursively follow dependencies and download all packages
|
|
|
|
necessary to install a particular package.
|
|
|
|
|
|
|
|
opkg knows how to install both .ipk and .deb packages.
|
|
|
|
endef
|
|
|
|
|
2008-08-16 14:35:14 +08:00
|
|
|
define Package/opkg/conffiles
|
|
|
|
/etc/opkg.conf
|
|
|
|
endef
|
|
|
|
|
2009-05-01 03:38:58 +08:00
|
|
|
TARGET_CFLAGS += $(FPIC) $(if $(CONFIG_GCC_VERSION_4_3)$(CONFIG_GCC_VERSION_4_4),-Wno-array-bounds)
|
2009-02-24 08:08:08 +08:00
|
|
|
EXTRA_CFLAGS += $(TARGET_CPPFLAGS)
|
|
|
|
EXTRA_LDFLAGS += $(TARGET_LDFLAGS) -Wl,-rpath-link,$(STAGING_DIR)/usr/lib
|
2008-07-29 12:16:43 +08:00
|
|
|
|
|
|
|
CONFIGURE_ARGS += \
|
|
|
|
--disable-curl \
|
|
|
|
--disable-gpg \
|
|
|
|
|
|
|
|
define Build/Configure
|
|
|
|
(cd $(PKG_BUILD_DIR); \
|
2008-07-29 20:57:43 +08:00
|
|
|
autoreconf -v --install || exit 1 \
|
2008-07-29 12:16:43 +08:00
|
|
|
);
|
|
|
|
$(call Build/Configure/Default)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Compile
|
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR) \
|
2008-08-14 05:12:26 +08:00
|
|
|
CC="$(TARGET_CC)" \
|
2008-07-29 12:16:43 +08:00
|
|
|
DESTDIR="$(PKG_INSTALL_DIR)" \
|
2009-07-31 20:15:51 +08:00
|
|
|
HOST_CPU="$(BOARD)" \
|
2008-07-29 12:16:43 +08:00
|
|
|
all install
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/opkg/install
|
2008-08-16 14:35:14 +08:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/opkg
|
2008-07-29 12:16:43 +08:00
|
|
|
$(INSTALL_DIR) $(1)/bin
|
2008-08-16 14:35:14 +08:00
|
|
|
$(INSTALL_DIR) $(1)/etc
|
|
|
|
$(INSTALL_DATA) ./files/opkg.conf $(1)/etc/
|
|
|
|
$(SED) 's,$$$$S,$(BOARD),g' -e 's,$$$$A,$(ARCH),g' $(1)/etc/opkg.conf
|
2008-07-29 12:16:43 +08:00
|
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/opkg-cl $(1)/bin/opkg
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libopkg.so.* $(1)/usr/lib/
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/InstallDev
|
|
|
|
mkdir -p $(1)/usr/include
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/include/libopkg $(1)/usr/include/
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,opkg))
|