2006-09-07 20:46:06 +00:00
|
|
|
require apt.inc
|
|
|
|
inherit native
|
|
|
|
|
2008-06-30 13:32:23 +00:00
|
|
|
DEPENDS += "dpkg-native gettext-native"
|
2006-09-07 20:46:06 +00:00
|
|
|
PACKAGES = ""
|
2008-06-19 15:16:30 +00:00
|
|
|
USE_NLS = "yes"
|
2006-09-07 20:46:06 +00:00
|
|
|
|
2010-07-23 16:33:31 +00:00
|
|
|
SRC_URI += "file://db_linking_hack.patch"
|
2007-08-21 14:00:13 +00:00
|
|
|
|
2009-11-19 13:42:11 +00:00
|
|
|
python do_install () {
|
|
|
|
bb.build.exec_func('do_install_base', d)
|
|
|
|
bb.build.exec_func('do_install_config', d)
|
2006-09-07 20:46:06 +00:00
|
|
|
}
|
|
|
|
|
2009-11-19 13:42:11 +00:00
|
|
|
python do_install_config () {
|
Convert to use direct access to the data store (instead of bb.data.*Var*())
This is the result of running the following over the metadata:
sed \
-e 's:bb.data.\(setVar([^,()]*,[^,()]*\), *\([^ )]*\) *):\2.\1):g' \
-e 's:bb.data.\(setVarFlag([^,()]*,[^,()]*,[^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^() ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-i `grep -ril bb.data *`
(From OE-Core rev: b22831fd63164c4db9c0b72934d7d734a6585251)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-09 15:00:01 +00:00
|
|
|
indir = os.path.dirname(d.getVar('FILE',1))
|
2006-09-07 20:46:06 +00:00
|
|
|
infile = file(os.path.join(indir, 'files', 'apt.conf'), 'r')
|
|
|
|
data = infile.read()
|
|
|
|
infile.close()
|
|
|
|
|
|
|
|
data = bb.data.expand(data, d)
|
|
|
|
|
Convert to use direct access to the data store (instead of bb.data.*Var*())
This is the result of running the following over the metadata:
sed \
-e 's:bb.data.\(setVar([^,()]*,[^,()]*\), *\([^ )]*\) *):\2.\1):g' \
-e 's:bb.data.\(setVarFlag([^,()]*,[^,()]*,[^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^() ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-i `grep -ril bb.data *`
(From OE-Core rev: b22831fd63164c4db9c0b72934d7d734a6585251)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-09 15:00:01 +00:00
|
|
|
outdir = os.path.join(d.getVar('D', 1), d.getVar('sysconfdir', 1), 'apt')
|
2006-09-19 09:04:09 +00:00
|
|
|
if not os.path.exists(outdir):
|
|
|
|
os.makedirs(outdir)
|
2006-11-27 17:27:09 +00:00
|
|
|
outpath = os.path.join(outdir, 'apt.conf.sample')
|
2006-09-19 09:04:09 +00:00
|
|
|
|
2006-09-07 20:46:06 +00:00
|
|
|
outfile = file(outpath, 'w')
|
|
|
|
outfile.write(data)
|
|
|
|
outfile.close()
|
|
|
|
}
|
|
|
|
|
2009-11-19 13:42:11 +00:00
|
|
|
do_install_base () {
|
|
|
|
install -d ${D}${bindir}
|
|
|
|
install -m 0755 bin/apt-cdrom ${D}${bindir}/
|
|
|
|
install -m 0755 bin/apt-get ${D}${bindir}/
|
|
|
|
install -m 0755 bin/apt-config ${D}${bindir}/
|
|
|
|
install -m 0755 bin/apt-cache ${D}${bindir}/
|
|
|
|
install -m 0755 bin/apt-sortpkgs ${D}${bindir}/
|
|
|
|
install -m 0755 bin/apt-extracttemplates ${D}${bindir}/
|
2006-09-07 20:46:06 +00:00
|
|
|
|
|
|
|
eval `cat environment.mak | grep ^GLIBC_VER | sed -e's, = ,=,'`
|
2009-11-19 13:42:11 +00:00
|
|
|
oe_libinstall -so -C bin libapt-pkg$GLIBC_VER-6 ${D}${libdir}/
|
|
|
|
ln -sf libapt-pkg$GLIBC_VER-6.so ${D}${libdir}/libapt-pkg.so
|
|
|
|
oe_libinstall -so -C bin libapt-inst$GLIBC_VER-6 ${D}${libdir}/
|
|
|
|
ln -sf libapt-inst$GLIBC_VER-6.so ${D}${libdir}/libapt-inst.so
|
|
|
|
|
|
|
|
install -d ${D}${libdir}/apt/methods
|
|
|
|
install -m 0755 bin/methods/* ${D}${libdir}/apt/methods/
|
|
|
|
|
|
|
|
install -d ${D}${libdir}/dpkg/methods/apt
|
|
|
|
install -m 0644 dselect/desc.apt ${D}${libdir}/dpkg/methods/apt/
|
|
|
|
install -m 0644 dselect/names ${D}${libdir}/dpkg/methods/apt/
|
|
|
|
install -m 0755 dselect/install ${D}${libdir}/dpkg/methods/apt/
|
|
|
|
install -m 0755 dselect/setup ${D}${libdir}/dpkg/methods/apt/
|
|
|
|
install -m 0755 dselect/update ${D}${libdir}/dpkg/methods/apt/
|
|
|
|
|
|
|
|
install -d ${D}${sysconfdir}/apt
|
|
|
|
install -d ${D}${localstatedir}/lib/apt/lists/partial
|
|
|
|
install -d ${D}${localstatedir}/cache/apt/archives/partial
|
|
|
|
|
|
|
|
install -d ${D}${localstatedir}/log/apt/
|
2006-09-07 20:46:06 +00:00
|
|
|
}
|