opkg: fix the -force_space option
[openwrt.git] / package / opkg / Makefile
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
7 include $(TOPDIR)/rules.mk
8
9 PKG_NAME:=opkg
10 PKG_REV:=215
11 PKG_VERSION:=$(PKG_REV)
12 PKG_RELEASE:=2
13
14 PKG_SOURCE_PROTO:=svn
15 PKG_SOURCE_VERSION:=$(PKG_REV)
16 PKG_SOURCE_SUBDIR:=opkg-$(PKG_VERSION)
17 PKG_SOURCE_URL:=http://opkg.googlecode.com/svn/trunk/
18 PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
19 PKG_FIXUP = libtool
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/opkg
23 SECTION:=base
24 CATEGORY:=Base system
25 TITLE:=opkg package management system
26 URL:=http://wiki.openmoko.org/wiki/Opkg
27 endef
28
29 define 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.
37 endef
38
39 define Package/opkg/conffiles
40 /etc/opkg.conf
41 endef
42
43 TARGET_CFLAGS += $(FPIC) $(if $(CONFIG_GCC_VERSION_4_3)$(CONFIG_GCC_VERSION_4_4),-Wno-array-bounds)
44 EXTRA_CFLAGS += $(TARGET_CPPFLAGS)
45 EXTRA_LDFLAGS += $(TARGET_LDFLAGS) -Wl,-rpath-link,$(STAGING_DIR)/usr/lib
46
47 CONFIGURE_ARGS += \
48 --disable-curl \
49 --disable-gpg \
50 --with-ipkgetcdir=/etc
51
52 define Build/Configure
53 (cd $(PKG_BUILD_DIR); \
54 autoreconf -v --install || exit 1 \
55 );
56 $(call Build/Configure/Default)
57 endef
58
59 define Build/Compile
60 $(MAKE) -C $(PKG_BUILD_DIR) \
61 CC="$(TARGET_CC)" \
62 DESTDIR="$(PKG_INSTALL_DIR)" \
63 HOST_CPU="$(PKGARCH)" \
64 all install
65 endef
66
67 define Package/opkg/install
68 $(INSTALL_DIR) $(1)/usr/lib/opkg
69 $(INSTALL_DIR) $(1)/bin
70 $(INSTALL_DIR) $(1)/etc
71 $(INSTALL_DATA) ./files/opkg.conf $(1)/etc/
72 $(SED) 's,$$$$S,$(PKGARCH),g' $(1)/etc/opkg.conf
73 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/opkg-cl $(1)/bin/opkg
74 $(INSTALL_DIR) $(1)/usr/lib
75 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libopkg.so.* $(1)/usr/lib/
76 endef
77
78 define Build/InstallDev
79 mkdir -p $(1)/usr/include
80 $(CP) $(PKG_INSTALL_DIR)/usr/include/libopkg $(1)/usr/include/
81 endef
82
83 $(eval $(call BuildPackage,opkg))
This page took 0.047308 seconds and 5 git commands to generate.