Initial commit
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
SUMMARY = "Architecture-dependent configuration for opkg"
|
||||
HOMEPAGE = "http://code.google.com/p/opkg/"
|
||||
LICENSE = "MIT"
|
||||
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
||||
PR = "r1"
|
||||
|
||||
S = "${WORKDIR}"
|
||||
|
||||
do_compile() {
|
||||
mkdir -p ${S}/${sysconfdir}/opkg/
|
||||
|
||||
archconf=${S}/${sysconfdir}/opkg/arch.conf
|
||||
|
||||
rm -f $archconf
|
||||
ipkgarchs="${ALL_MULTILIB_PACKAGE_ARCHS}"
|
||||
priority=1
|
||||
for arch in $ipkgarchs; do
|
||||
echo "arch $arch $priority" >> $archconf
|
||||
priority=$(expr $priority + 5)
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
do_install () {
|
||||
install -d ${D}${sysconfdir}/opkg
|
||||
install -m 0644 ${S}/${sysconfdir}/opkg/* ${D}${sysconfdir}/opkg/
|
||||
}
|
||||
|
||||
FILES:${PN} = "${sysconfdir}/opkg/ "
|
||||
|
||||
CONFFILES:${PN} += "${sysconfdir}/opkg/arch.conf"
|
||||
|
||||
RREPLACES:${PN} = "opkg-config-base"
|
||||
RCONFLICTS:${PN} = "opkg-config-base"
|
||||
RPROVIDES:${PN} = "opkg-config-base"
|
||||
@@ -0,0 +1,43 @@
|
||||
SUMMARY = "Keyrings for verifying opkg packages and feeds"
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
|
||||
|
||||
# Distro-specific keys can be added to this package in two ways:
|
||||
#
|
||||
# 1) In a .bbappend, add .gpg and/or .asc files to SRC_URI and install them to
|
||||
# ${D}${datadir}/opkg/keyrings/ in a do_install:append function. These
|
||||
# files should not be named 'key-$name.gpg' to ensure they don't conflict
|
||||
# with keys exported as per (2).
|
||||
#
|
||||
# 2) In a .bbappend, distro config or local.conf, override the variable
|
||||
# OPKG_KEYRING_KEYS to contain a space-separated list of key names. For
|
||||
# each name, 'gpg --export $name' will be ran to export the public key to a
|
||||
# file named 'key-$name.gpg'. The public key must therefore be in the gpg
|
||||
# keyrings on the build machine.
|
||||
|
||||
OPKG_KEYRING_KEYS ?= ""
|
||||
|
||||
do_compile() {
|
||||
for name in ${OPKG_KEYRING_KEYS}; do
|
||||
gpg --export ${name} > ${B}/key-${name}.gpg
|
||||
done
|
||||
}
|
||||
|
||||
do_install () {
|
||||
install -d ${D}${datadir}/opkg/keyrings/
|
||||
for name in ${OPKG_KEYRING_KEYS}; do
|
||||
install -m 0644 ${B}/key-${name}.gpg ${D}${datadir}/opkg/keyrings/
|
||||
done
|
||||
}
|
||||
|
||||
FILES:${PN} = "${datadir}/opkg/keyrings"
|
||||
|
||||
# We need 'opkg-key' to run the postinst script
|
||||
RDEPENDS:${PN} = "opkg"
|
||||
|
||||
pkg_postinst_ontarget:${PN} () {
|
||||
if test -x ${bindir}/opkg-key
|
||||
then
|
||||
${bindir}/opkg-key populate
|
||||
fi
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
From a4628a6171f393add9a2b287483ca39bb72b4dd6 Mon Sep 17 00:00:00 2001
|
||||
From: Jonathan Liu <net147@gmail.com>
|
||||
Date: Mon, 21 Sep 2015 20:23:23 +1000
|
||||
Subject: [PATCH] opkg_conf: create opkg.lock in /run instead of /var/run
|
||||
|
||||
This avoids a "Could not unlink" warning when extracting a /var/run
|
||||
symbolic link pointing to /run from a package as it is unable to
|
||||
unlink the /var/run directory when it contains opkg.lock.
|
||||
|
||||
This also fixes an issue where /var/run is created as a directory
|
||||
instead of a symbolic link to /run.
|
||||
|
||||
Upstream-Status: Inappropriate [OE-Specific]
|
||||
Signed-off-by: Jonathan Liu <net147@gmail.com>
|
||||
---
|
||||
libopkg/opkg_conf.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libopkg/opkg_conf.h b/libopkg/opkg_conf.h
|
||||
index 7bca948..5a1bc44 100644
|
||||
--- a/libopkg/opkg_conf.h
|
||||
+++ b/libopkg/opkg_conf.h
|
||||
@@ -40,7 +40,7 @@ extern "C" {
|
||||
#define OPKG_CONF_DEFAULT_STATUS_FILE VARDIR "/lib/opkg/status"
|
||||
#define OPKG_CONF_DEFAULT_CACHE_DIR VARDIR "/cache/opkg"
|
||||
#define OPKG_CONF_DEFAULT_CONF_FILE_DIR SYSCONFDIR "/opkg"
|
||||
-#define OPKG_CONF_DEFAULT_LOCK_FILE VARDIR "/run/opkg.lock"
|
||||
+#define OPKG_CONF_DEFAULT_LOCK_FILE "/run/opkg.lock"
|
||||
|
||||
/* In case the config file defines no dest */
|
||||
#define OPKG_CONF_DEFAULT_DEST_NAME "root"
|
||||
--
|
||||
2.5.0
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
# Must have one or more source entries of the form:
|
||||
#
|
||||
# src <src-name> <source-url>
|
||||
#
|
||||
# and one or more destination entries of the form:
|
||||
#
|
||||
# dest <dest-name> <target-path>
|
||||
#
|
||||
# where <src-name> and <dest-names> are identifiers that
|
||||
# should match [a-zA-Z0-9._-]+, <source-url> should be a
|
||||
# URL that points to a directory containing a Familiar
|
||||
# Packages file, and <target-path> should be a directory
|
||||
# that exists on the target system.
|
||||
|
||||
# Proxy Support
|
||||
#option http_proxy http://proxy.tld:3128
|
||||
#option ftp_proxy http://proxy.tld:3128
|
||||
#option proxy_username <username>
|
||||
#option proxy_password <password>
|
||||
|
||||
# Enable GPGME signature
|
||||
# option check_signature 1
|
||||
|
||||
# Offline mode (for use in constructing flash images offline)
|
||||
#option offline_root target
|
||||
|
||||
# Default destination for installed packages
|
||||
dest root /
|
||||
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
OPKG_PATH=$(which opkg)
|
||||
|
||||
make OPKG_PATH=$OPKG_PATH run-tests
|
||||
@@ -0,0 +1,75 @@
|
||||
SUMMARY = "Open Package Manager"
|
||||
SUMMARY:libopkg = "Open Package Manager library"
|
||||
SECTION = "base"
|
||||
HOMEPAGE = "http://code.google.com/p/opkg/"
|
||||
DESCRIPTION = "Opkg is a lightweight package management system based on Ipkg."
|
||||
BUGTRACKER = "http://code.google.com/p/opkg/issues/list"
|
||||
LICENSE = "GPL-2.0-or-later"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
|
||||
file://src/opkg.c;beginline=4;endline=18;md5=d6200b0f2b41dee278aa5fad333eecae"
|
||||
|
||||
DEPENDS = "libarchive"
|
||||
|
||||
PE = "1"
|
||||
|
||||
SRC_URI = "http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz \
|
||||
file://opkg.conf \
|
||||
file://0001-opkg_conf-create-opkg.lock-in-run-instead-of-var-run.patch \
|
||||
file://run-ptest \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "ac73a90a2549cd04948e563d915912c78e1b8ba0f43af75c5a53fcca474adbd5"
|
||||
|
||||
# This needs to be before ptest inherit, otherwise all ptest files end packaged
|
||||
# in libopkg package if OPKGLIBDIR == libdir, because default
|
||||
# PTEST_PATH ?= "${libdir}/${BPN}/ptest"
|
||||
PACKAGES =+ "libopkg"
|
||||
|
||||
inherit autotools pkgconfig ptest
|
||||
|
||||
target_localstatedir := "${localstatedir}"
|
||||
OPKGLIBDIR ??= "${target_localstatedir}/lib"
|
||||
|
||||
PACKAGECONFIG ??= "libsolv"
|
||||
|
||||
PACKAGECONFIG[gpg] = "--enable-gpg,--disable-gpg,\
|
||||
gnupg gpgme libgpg-error,\
|
||||
${@ "gnupg" if ("native" in d.getVar("PN")) else "gnupg-gpg"}\
|
||||
"
|
||||
PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl"
|
||||
PACKAGECONFIG[ssl-curl] = "--enable-ssl-curl,--disable-ssl-curl,curl openssl"
|
||||
PACKAGECONFIG[sha256] = "--enable-sha256,--disable-sha256"
|
||||
PACKAGECONFIG[zstd] = "--enable-zstd,--disable-zstd,zstd"
|
||||
PACKAGECONFIG[libsolv] = "--with-libsolv,--without-libsolv,libsolv"
|
||||
|
||||
EXTRA_OECONF:class-native = "--localstatedir=/${@os.path.relpath('${localstatedir}', '${STAGING_DIR_NATIVE}')} --sysconfdir=/${@os.path.relpath('${sysconfdir}', '${STAGING_DIR_NATIVE}')}"
|
||||
|
||||
do_install:append () {
|
||||
install -d ${D}${sysconfdir}/opkg
|
||||
install -m 0644 ${WORKDIR}/opkg.conf ${D}${sysconfdir}/opkg/opkg.conf
|
||||
echo "option lists_dir ${OPKGLIBDIR}/opkg/lists" >>${D}${sysconfdir}/opkg/opkg.conf
|
||||
echo "option info_dir ${OPKGLIBDIR}/opkg/info" >>${D}${sysconfdir}/opkg/opkg.conf
|
||||
echo "option status_file ${OPKGLIBDIR}/opkg/status" >>${D}${sysconfdir}/opkg/opkg.conf
|
||||
|
||||
# We need to create the lock directory
|
||||
install -d ${D}${OPKGLIBDIR}/opkg
|
||||
}
|
||||
|
||||
do_install_ptest () {
|
||||
sed -i -e '/@echo $^/d' ${D}${PTEST_PATH}/tests/Makefile
|
||||
sed -i -e '/@PYTHONPATH=. $(PYTHON) $^/a\\t@if [ "$$?" != "0" ];then echo "FAIL:"$^;else echo "PASS:"$^;fi' ${D}${PTEST_PATH}/tests/Makefile
|
||||
}
|
||||
|
||||
RDEPENDS:${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-arch-config libarchive"
|
||||
RDEPENDS:${PN}:class-native = ""
|
||||
RDEPENDS:${PN}:class-nativesdk = ""
|
||||
RDEPENDS:${PN}-ptest += "make binutils python3-core python3-compression bash python3-crypt python3-io"
|
||||
RREPLACES:${PN} = "opkg-nogpg opkg-collateral"
|
||||
RCONFLICTS:${PN} = "opkg-collateral"
|
||||
RPROVIDES:${PN} = "opkg-collateral"
|
||||
|
||||
FILES:libopkg = "${libdir}/*.so.* ${OPKGLIBDIR}/opkg/"
|
||||
|
||||
BBCLASSEXTEND = "native nativesdk"
|
||||
|
||||
CONFFILES:${PN} = "${sysconfdir}/opkg/opkg.conf"
|
||||
Reference in New Issue
Block a user