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
17 PKG_SOURCE_URL
:=https
://git.lede-project.org
/project
/opkg-lede.git
18 PKG_SOURCE_DATE
:=2017-02-22
19 PKG_SOURCE_VERSION
:=271d485c10f2070573b25e740b93839945dbcd9d
20 PKG_MIRROR_HASH
:=f48fcbc9f509629aec30bca6aeaf78d831c9a041ac87468f7429d20361384ca9
23 PKG_LICENSE_FILES
:=COPYING
25 PKG_MAINTAINER
:=Jo-Philipp Wich
<jo@mein.io
>
27 PKG_FLAGS
:= nonshared
28 PKG_CONFIG_DEPENDS
:= CONFIG_SIGNED_PACKAGES
31 HOST_BUILD_PARALLEL
:=1
34 HOST_BUILD_DEPENDS
:=libubox
/host
36 include $(INCLUDE_DIR
)/package.mk
37 include $(INCLUDE_DIR
)/host-build.mk
38 include $(INCLUDE_DIR
)/cmake.mk
43 TITLE
:=opkg package manager
44 DEPENDS
:=+uclient-fetch
+libpthread
+libubox
45 URL
:=https
://git.lede-project.org
/?p
=project
/opkg-lede.git
49 define Package
/opkg
/description
50 Lightweight package management system
51 opkg is the opkg Package Management System
, for handling
52 installation and removal of packages on a system. It can
53 recursively follow dependencies and download
all packages
54 necessary to
install a particular package.
56 opkg knows how to
install both .ipk and .deb packages.
59 define Package
/opkg
/conffiles
62 /etc
/opkg
/customfeeds.conf
65 TARGET_CFLAGS
+= -ffunction-sections
-fdata-sections
66 EXTRA_CFLAGS
+= $(TARGET_CPPFLAGS
)
70 -DHOST_CPU
=$(PKGARCH
) \
71 -DVERSION
="$(PKG_SOURCE_VERSION) ($(PKG_SOURCE_DATE))"
73 CMAKE_HOST_OPTIONS
+= \
76 -DHOST_CPU
=$(PKGARCH
) \
77 -DLOCK_FILE
=/tmp
/opkg.lock \
78 -DVERSION
="$(PKG_SOURCE_VERSION) ($(PKG_SOURCE_DATE))"
80 define Package
/opkg
/install
81 $(INSTALL_DIR
) $(1)/usr
/lib
/opkg
82 $(INSTALL_DIR
) $(1)/bin
83 $(INSTALL_DIR
) $(1)/etc
/opkg
84 $(INSTALL_DIR
) $(1)/etc
/uci-defaults
85 $(INSTALL_DATA
) .
/files
/customfeeds.conf
$(1)/etc
/opkg
/customfeeds.conf
86 $(INSTALL_DATA
) .
/files
/opkg
$(2).conf
$(1)/etc
/opkg.conf
87 $(call FeedSourcesAppend
,$(1)/etc
/opkg
/distfeeds.conf
)
88 $(VERSION_SED
) $(1)/etc
/opkg
/distfeeds.conf
89 $(INSTALL_BIN
) .
/files
/20_migrate-feeds
$(1)/etc
/uci-defaults
/
90 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/opkg-cl
$(1)/bin
/opkg
91 ifneq ($(CONFIG_SIGNED_PACKAGES
),)
92 echo
"option check_signature 1" >> $(1)/etc
/opkg.conf
94 $(INSTALL_DIR
) $(1)/usr
/sbin
95 $(INSTALL_BIN
) .
/files
/opkg-key
$(1)/usr
/sbin
/
99 $(INSTALL_BIN
) $(HOST_BUILD_DIR
)/src
/opkg-cl
$(STAGING_DIR_HOST
)/bin
/opkg
102 $(eval
$(call BuildPackage
,opkg
))
103 $(eval
$(call HostBuild
))