2 # Copyright (C) 2006-2008 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 include $(TOPDIR
)/rules.mk
11 PKG_VERSION
:=$(PKG_REV
)
15 PKG_SOURCE_VERSION
:=$(PKG_REV
)
16 PKG_SOURCE_SUBDIR
:=opkg-
$(PKG_VERSION
)
17 PKG_SOURCE_URL
:=http
://svn.openmoko.org
/trunk
/src
/target
/opkg
/
18 PKG_SOURCE
:=$(PKG_SOURCE_SUBDIR
).
tar.gz
20 include $(INCLUDE_DIR
)/package.mk
25 TITLE
:=opkg package management system
26 URL
:=http
://wiki.openmoko.org
/wiki
/Opkg
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.
36 opkg knows how to
install both .ipk and .deb packages.
39 EXTRA_CFLAGS
+=-I
$(STAGING_DIR
)/usr
/include -I
$(STAGING_DIR
)/include -I
$(STAGING_DIR
)/usr
/lib
40 EXTRA_LDFLAGS
+=-L
$(STAGING_DIR
)/usr
/lib
-Wl
,-rpath-link
,$(STAGING_DIR
)/usr
/lib
46 define Build
/Configure
47 (cd
$(PKG_BUILD_DIR
); \
48 autoreconf
-v
--install || exit
1 \
50 $(call Build
/Configure
/Default
)
54 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
56 DESTDIR
="$(PKG_INSTALL_DIR)" \
60 define Package
/opkg
/install
61 $(INSTALL_DIR
) $(1)/etc
62 $(INSTALL_DATA
) .
/files
/opkg.conf
$(1)/etc
/
63 $(SED
) 's,$$$$S,$(BOARD),g' $(1)/etc
/opkg.conf
64 $(INSTALL_BIN
) .
/files
/postinst
$(1)/CONTROL
/postinst
65 $(INSTALL_DIR
) $(1)/bin
66 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/opkg-cl
$(1)/bin
/opkg
67 $(INSTALL_DIR
) $(1)/usr
/lib
68 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libopkg.so.
* $(1)/usr
/lib
/
71 define Build
/InstallDev
72 mkdir
-p
$(1)/usr
/include
73 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/libopkg
$(1)/usr
/include/
76 $(eval
$(call BuildPackage
,opkg
))