2 # Copyright (C) 2006-2015 OpenWrt.org
3 # Copyright (C) 2016 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-03-15
20 PKG_SOURCE_VERSION
:=cfe46c7d5787df0bd643d44e8f985107b562300e
21 PKG_MIRROR_HASH
:=abc0c125c856318a457add3d2c5ec668464ed962ccfc688ea1cbd5047b435f23
24 PKG_LICENSE_FILES
:=COPYING
26 PKG_MAINTAINER
:=Jo-Philipp Wich
<jo@mein.io
>
28 PKG_FLAGS
:= nonshared
29 PKG_CONFIG_DEPENDS
:= CONFIG_SIGNED_PACKAGES CONFIG_TARGET_INIT_PATH
32 HOST_BUILD_PARALLEL
:=1
35 HOST_BUILD_DEPENDS
:=libubox
/host
37 include $(INCLUDE_DIR
)/package.mk
38 include $(INCLUDE_DIR
)/host-build.mk
39 include $(INCLUDE_DIR
)/cmake.mk
44 TITLE
:=opkg package manager
45 DEPENDS
:=+uclient-fetch
+libpthread
+libubox
46 URL
:=https
://git.lede-project.org
/?p
=project
/opkg-lede.git
50 define Package
/opkg
/description
51 Lightweight package management system
52 opkg is the opkg Package Management System
, for handling
53 installation and removal of packages on a system. It can
54 recursively follow dependencies and download
all packages
55 necessary to
install a particular package.
57 opkg knows how to
install both .ipk and .deb packages.
60 define Package
/opkg
/conffiles
63 /etc
/opkg
/customfeeds.conf
66 TARGET_CFLAGS
+= -ffunction-sections
-fdata-sections
67 EXTRA_CFLAGS
+= $(TARGET_CPPFLAGS
)
71 -DHOST_CPU
=$(PKGARCH
) \
72 -DPATH_SPEC
="$(TARGET_INIT_PATH)" \
73 -DVERSION
="$(PKG_SOURCE_VERSION) ($(PKG_SOURCE_DATE))"
75 CMAKE_HOST_OPTIONS
+= \
78 -DHOST_CPU
=$(PKGARCH
) \
79 -DLOCK_FILE
=/tmp
/opkg.lock \
80 -DVERSION
="$(PKG_SOURCE_VERSION) ($(PKG_SOURCE_DATE))"
82 define Package
/opkg
/install
83 $(INSTALL_DIR
) $(1)/usr
/lib
/opkg
84 $(INSTALL_DIR
) $(1)/bin
85 $(INSTALL_DIR
) $(1)/etc
/opkg
86 $(INSTALL_DIR
) $(1)/etc
/uci-defaults
87 $(INSTALL_DATA
) .
/files
/customfeeds.conf
$(1)/etc
/opkg
/customfeeds.conf
88 $(INSTALL_DATA
) .
/files
/opkg
$(2).conf
$(1)/etc
/opkg.conf
89 $(call FeedSourcesAppend
,$(1)/etc
/opkg
/distfeeds.conf
)
90 $(VERSION_SED
) $(1)/etc
/opkg
/distfeeds.conf
91 $(INSTALL_BIN
) .
/files
/20_migrate-feeds
$(1)/etc
/uci-defaults
/
92 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/opkg-cl
$(1)/bin
/opkg
93 ifneq ($(CONFIG_SIGNED_PACKAGES
),)
94 echo
"option check_signature 1" >> $(1)/etc
/opkg.conf
96 $(INSTALL_DIR
) $(1)/usr
/sbin
97 $(INSTALL_BIN
) .
/files
/opkg-key
$(1)/usr
/sbin
/
101 $(INSTALL_BIN
) $(HOST_BUILD_DIR
)/src
/opkg-cl
$(STAGING_DIR_HOST
)/bin
/opkg
104 $(eval
$(call BuildPackage
,opkg
))
105 $(eval
$(call HostBuild
))