source: branches/backfire/package/opkg/Makefile @ 25743

Last change on this file since 25743 was 25743, checked in by jow, 5 years ago

[backfire] package: sync opkg with trunk

File size: 2.3 KB
Line 
1#
2# Copyright (C) 2006-2010 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6
7include $(TOPDIR)/rules.mk
8include $(INCLUDE_DIR)/kernel.mk
9
10PKG_NAME:=opkg
11PKG_REV:=576
12PKG_VERSION:=$(PKG_REV)
13PKG_RELEASE:=1
14
15PKG_SOURCE_PROTO:=svn
16PKG_SOURCE_VERSION:=$(PKG_REV)
17PKG_SOURCE_SUBDIR:=opkg-$(PKG_VERSION)
18PKG_SOURCE_URL:=http://opkg.googlecode.com/svn/trunk/
19PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
20PKG_FIXUP = libtool
21PKG_REMOVE_FILES = autogen.sh aclocal.m4
22
23include $(INCLUDE_DIR)/package.mk
24include $(INCLUDE_DIR)/host-build.mk
25
26define Package/opkg
27  SECTION:=base
28  CATEGORY:=Base system
29  TITLE:=opkg package management system
30  MAINTAINER:=Jo-Philipp Wich <xm@subsignal.org>
31  URL:=http://wiki.openmoko.org/wiki/Opkg
32endef
33
34define Package/opkg/description
35  Lightweight package management system
36  opkg is the opkg Package Management System, for handling
37  installation and removal of packages on a system. It can
38  recursively follow dependencies and download all packages
39  necessary to install a particular package.
40
41  opkg knows how to install both .ipk and .deb packages.
42endef
43
44define Package/opkg/conffiles
45/etc/opkg.conf
46endef
47
48TARGET_CFLAGS += $(if $(CONFIG_GCC_VERSION_4_3)$(CONFIG_GCC_VERSION_4_4),-Wno-array-bounds)
49EXTRA_CFLAGS += $(TARGET_CPPFLAGS)
50
51CONFIGURE_ARGS += \
52        --disable-curl \
53        --disable-gpg \
54        --with-opkgetcdir=/etc \
55        --with-opkglockfile=/var/lock/opkg.lock
56
57define Build/Compile
58        $(MAKE) -C $(PKG_BUILD_DIR) \
59                CC="$(TARGET_CC)" \
60                DESTDIR="$(PKG_INSTALL_DIR)" \
61                HOST_CPU="$(PKGARCH)" \
62                all install
63endef
64
65define Package/opkg/install
66        $(INSTALL_DIR) $(1)/usr/lib/opkg
67        $(INSTALL_DIR) $(1)/bin
68        $(INSTALL_DIR) $(1)/etc
69        $(INSTALL_DATA) ./files/opkg.conf $(1)/etc/
70        $(SED) 's,$$$$S,$(PKGARCH),g' $(1)/etc/opkg.conf
71        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/opkg-cl $(1)/bin/opkg
72endef
73
74define Build/InstallDev
75        mkdir -p $(1)/usr/include
76        $(CP) $(PKG_INSTALL_DIR)/usr/include/libopkg $(1)/usr/include/
77endef
78
79
80HOST_CONFIGURE_ARGS+= \
81        --disable-curl \
82        --disable-gpg \
83        --with-opkgetcdir=/etc \
84        --with-opkglockfile=/tmp/opkg.lock
85
86define Host/Compile
87        $(MAKE) -C $(HOST_BUILD_DIR) CC="$(HOSTCC)" all
88endef
89
90define Host/Install
91        $(INSTALL_BIN) $(HOST_BUILD_DIR)/src/opkg-cl $(STAGING_DIR_HOST)/bin/opkg
92endef
93
94$(eval $(call BuildPackage,opkg))
95$(eval $(call HostBuild))
Note: See TracBrowser for help on using the repository browser.