aboutsummaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorAndreas Oberritter <obi@opendreambox.org>2016-04-22 00:50:13 +0200
committerAndreas Oberritter <obi@opendreambox.org>2017-06-26 22:57:09 +0200
commit1c71d3a6eddc153a0a15d0fba9308032f69228fd (patch)
treea49cf39b44f5c07aac30522bd6677f8c1d3d7d09 /meta
parent4f3f1e84b738b1b1d72709b0d27a354671354390 (diff)
downloadopenembedded-core-contrib-1c71d3a6eddc153a0a15d0fba9308032f69228fd.tar.gz
apt-native: use sed to prepare apt.conf.sample
Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/apt/apt-native_1.0.10.1.bb32
-rw-r--r--meta/recipes-devtools/apt/apt/apt.conf.in (renamed from meta/recipes-devtools/apt/files/apt.conf)6
2 files changed, 10 insertions, 28 deletions
diff --git a/meta/recipes-devtools/apt/apt-native_1.0.10.1.bb b/meta/recipes-devtools/apt/apt-native_1.0.10.1.bb
index 9e56aec6a5..695e21d188 100644
--- a/meta/recipes-devtools/apt/apt-native_1.0.10.1.bb
+++ b/meta/recipes-devtools/apt/apt-native_1.0.10.1.bb
@@ -11,33 +11,10 @@ SRC_URI += "file://db_linking_hack.patch \
file://0001-fix-the-gcc-version-check.patch \
file://noconfigure.patch \
file://no-curl.patch \
+ file://apt.conf.in \
"
-python do_install () {
- bb.build.exec_func('do_install_base', d)
- bb.build.exec_func('do_install_config', d)
-}
-
-python do_install_config () {
- indir = os.path.dirname(d.getVar('FILE',1))
- infile = file(oe.path.join(indir, 'files', 'apt.conf'), 'r')
- data = infile.read()
- infile.close()
-
- data = d.expand(data)
-
- outdir = oe.path.join(d.getVar('D', True), d.getVar('sysconfdir', True), 'apt')
- if not os.path.exists(outdir):
- os.makedirs(outdir)
-
- outpath = oe.path.join(outdir, 'apt.conf.sample')
- if not os.path.exists(outpath):
- outfile = file(outpath, 'w')
- outfile.write(data)
- outfile.close()
-}
-
-do_install_base () {
+do_install() {
install -d ${D}${bindir}
install -m 0755 bin/apt-cdrom ${D}${bindir}/
install -m 0755 bin/apt-get ${D}${bindir}/
@@ -69,4 +46,9 @@ do_install_base () {
install -d ${D}${localstatedir}/cache/apt/archives/partial
install -d ${D}${localstatedir}/log/apt/
+
+ sed -e "s,@STAGING_DIR_NATIVE@,${STAGING_DIR_NATIVE},g" \
+ -e "s,@STAGING_BINDIR_NATIVE@,${STAGING_BINDIR_NATIVE},g" \
+ -e "s,@STAGING_LIBDIR@,${STAGING_LIBDIR},g" \
+ < ${WORKDIR}/apt.conf.in > ${D}${sysconfdir}/apt/apt.conf.sample
}
diff --git a/meta/recipes-devtools/apt/files/apt.conf b/meta/recipes-devtools/apt/apt/apt.conf.in
index 1b53b3c4bd..03a2c8dbb2 100644
--- a/meta/recipes-devtools/apt/files/apt.conf
+++ b/meta/recipes-devtools/apt/apt/apt.conf.in
@@ -1,4 +1,4 @@
-Dir "${STAGING_DIR_NATIVE}/"
+Dir "@STAGING_DIR_NATIVE@/"
{
State "var/lib/apt/"
{
@@ -11,9 +11,9 @@ Dir "${STAGING_DIR_NATIVE}/"
pkgcache "";
srcpkgcache "";
};
- Bin "${STAGING_BINDIR_NATIVE}/"
+ Bin "@STAGING_BINDIR_NATIVE@/"
{
- methods "${STAGING_LIBDIR}/apt/methods/";
+ methods "@STAGING_LIBDIR@/apt/methods/";
gzip "/bin/gzip";
dpkg "dpkg";
dpkg-source "dpkg-source";