2 # Copyright (C) 2006-2015 OpenWrt.org
3 # Copyright (C) 2016-2017 LEDE Project
5 # This is free software, licensed under the GNU General Public License v2.
6 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
9 include $(INCLUDE_DIR
)/kernel.mk
10 include $(INCLUDE_DIR
)/version.mk
11 include $(INCLUDE_DIR
)/feeds.mk
18 PKG_SOURCE_URL
:=https
://git.lede-project.org
/project
/opkg-lede.git
19 PKG_SOURCE_DATE
:=2017-07-28
20 PKG_SOURCE_VERSION
:=4bd8601ebd95c130e504cc724b0c5eb163050982
21 PKG_MIRROR_HASH
:=adb2d610185a83fb630ccd3f0c80cb8acfd89260e0a5e598aadb8c8f0d903cf5
24 PKG_LICENSE_FILES
:=COPYING
26 PKG_MAINTAINER
:=Jo-Philipp Wich
<jo@mein.io
>
28 PKG_FLAGS
:= nonshared
30 PKG_CONFIG_DEPENDS
:= \
31 CONFIG_SIGNED_PACKAGES \
32 CONFIG_TARGET_INIT_PATH \
33 CONFIG_PER_FEED_REPO \
34 CONFIG_PER_FEED_REPO_ADD_DISABLED \
35 CONFIG_PER_FEED_REPO_ADD_COMMENTED \
36 $(foreach feed
,$(FEEDS_INSTALLED
),CONFIG_FEED_
$(feed
))
39 HOST_BUILD_PARALLEL
:=1
42 HOST_BUILD_DEPENDS
:=libubox
/host
44 include $(INCLUDE_DIR
)/package.mk
45 include $(INCLUDE_DIR
)/host-build.mk
46 include $(INCLUDE_DIR
)/cmake.mk
51 TITLE
:=opkg package manager
52 DEPENDS
:=+uclient-fetch
+libpthread
+libubox
53 URL
:=https
://git.lede-project.org
/?p
=project
/opkg-lede.git
57 define Package
/opkg
/description
58 Lightweight package management system
59 opkg is the opkg Package Management System
, for handling
60 installation and removal of packages on a system. It can
61 recursively follow dependencies and download
all packages
62 necessary to
install a particular package.
64 opkg knows how to
install both .ipk and .deb packages.
67 define Package
/opkg
/conffiles
70 /etc
/opkg
/customfeeds.conf
73 TARGET_CFLAGS
+= -ffunction-sections
-fdata-sections
74 EXTRA_CFLAGS
+= $(TARGET_CPPFLAGS
)
78 -DHOST_CPU
=$(PKGARCH
) \
79 -DPATH_SPEC
="$(TARGET_INIT_PATH)" \
80 -DVERSION
="$(PKG_SOURCE_VERSION) ($(PKG_SOURCE_DATE))"
82 CMAKE_HOST_OPTIONS
+= \
85 -DHOST_CPU
=$(PKGARCH
) \
86 -DLOCK_FILE
=/tmp
/opkg.lock \
87 -DVERSION
="$(PKG_SOURCE_VERSION) ($(PKG_SOURCE_DATE))"
89 define Package
/opkg
/install
90 $(INSTALL_DIR
) $(1)/usr
/lib
/opkg
91 $(INSTALL_DIR
) $(1)/bin
92 $(INSTALL_DIR
) $(1)/etc
/opkg
93 $(INSTALL_DIR
) $(1)/etc
/uci-defaults
94 $(INSTALL_DATA
) .
/files
/customfeeds.conf
$(1)/etc
/opkg
/customfeeds.conf
95 $(INSTALL_DATA
) .
/files
/opkg
$(2).conf
$(1)/etc
/opkg.conf
96 $(call FeedSourcesAppend
,$(1)/etc
/opkg
/distfeeds.conf
)
97 $(VERSION_SED
) $(1)/etc
/opkg
/distfeeds.conf
98 $(INSTALL_BIN
) .
/files
/20_migrate-feeds
$(1)/etc
/uci-defaults
/
99 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/opkg-cl
$(1)/bin
/opkg
100 ifneq ($(CONFIG_SIGNED_PACKAGES
),)
101 echo
"option check_signature 1" >> $(1)/etc
/opkg.conf
103 $(INSTALL_DIR
) $(1)/usr
/sbin
104 $(INSTALL_BIN
) .
/files
/opkg-key
$(1)/usr
/sbin
/
108 $(INSTALL_BIN
) $(HOST_BUILD_DIR
)/src
/opkg-cl
$(STAGING_DIR_HOST
)/bin
/opkg
111 $(eval
$(call BuildPackage
,opkg
))
112 $(eval
$(call HostBuild
))