source: trunk/package/opkg/Makefile @ 17101

Last change on this file since 17101 was 17101, checked in by kaloz, 7 years ago

add special handling for the adm5120 target, which uses subtargets for different endianess -- later we should come up with something smarter

File size: 2.1 KB
Line 
1#
2# Copyright (C) 2006-2009 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
8
9PKG_NAME:=opkg
10PKG_REV:=4993
11PKG_VERSION:=$(PKG_REV)
12PKG_RELEASE:=4
13
14PKG_SOURCE_PROTO:=svn
15PKG_SOURCE_VERSION:=$(PKG_REV)
16PKG_SOURCE_SUBDIR:=opkg-$(PKG_VERSION)
17PKG_SOURCE_URL:=http://svn.openmoko.org/trunk/src/target/opkg/
18PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
19PKG_FIXUP = libtool
20include $(INCLUDE_DIR)/package.mk
21
22define Package/opkg
23  SECTION:=base
24  CATEGORY:=Base system
25  TITLE:=opkg package management system
26  URL:=http://wiki.openmoko.org/wiki/Opkg
27endef
28
29define Package/opkg/description
30  Lightweight package management system
31  opkg is the opkg Package Management System, for handling
32  installation and removal of packages on a system. It can
33  recursively follow dependencies and download all packages
34  necessary to install a particular package.
35
36  opkg knows how to install both .ipk and .deb packages.
37endef
38
39define Package/opkg/conffiles
40/etc/opkg.conf
41endef
42
43TARGET_CFLAGS += $(FPIC) $(if $(CONFIG_GCC_VERSION_4_3)$(CONFIG_GCC_VERSION_4_4),-Wno-array-bounds)
44EXTRA_CFLAGS += $(TARGET_CPPFLAGS)
45EXTRA_LDFLAGS += $(TARGET_LDFLAGS) -Wl,-rpath-link,$(STAGING_DIR)/usr/lib
46
47CONFIGURE_ARGS += \
48        --disable-curl \
49        --disable-gpg \
50
51define Build/Configure
52        (cd $(PKG_BUILD_DIR); \
53                autoreconf -v --install || exit 1 \
54        );
55        $(call Build/Configure/Default)
56endef
57
58define Build/Compile
59        $(MAKE) -C $(PKG_BUILD_DIR) \
60                CC="$(TARGET_CC)" \
61                DESTDIR="$(PKG_INSTALL_DIR)" \
62                HOST_CPU="$(PKGARCH)" \
63                all install
64endef
65
66define Package/opkg/install
67        $(INSTALL_DIR) $(1)/usr/lib/opkg
68        $(INSTALL_DIR) $(1)/bin
69        $(INSTALL_DIR) $(1)/etc
70        $(INSTALL_DATA) ./files/opkg.conf $(1)/etc/
71        $(SED) 's,$$$$S,$(PKGARCH),g' $(1)/etc/opkg.conf
72        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/opkg-cl $(1)/bin/opkg
73        $(INSTALL_DIR) $(1)/usr/lib
74        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libopkg.so.* $(1)/usr/lib/
75endef
76
77define Build/InstallDev
78        mkdir -p $(1)/usr/include
79        $(CP) $(PKG_INSTALL_DIR)/usr/include/libopkg $(1)/usr/include/
80endef
81
82$(eval $(call BuildPackage,opkg))
Note: See TracBrowser for help on using the repository browser.