summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/apt/apt-native.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/apt/apt-native.inc')
-rw-r--r--meta/recipes-devtools/apt/apt-native.inc68
1 files changed, 68 insertions, 0 deletions
diff --git a/meta/recipes-devtools/apt/apt-native.inc b/meta/recipes-devtools/apt/apt-native.inc
new file mode 100644
index 0000000..36035b0
--- /dev/null
+++ b/meta/recipes-devtools/apt/apt-native.inc
@@ -0,0 +1,68 @@
1require apt.inc
2inherit native
3
4DEPENDS += "dpkg-native gettext-native"
5PACKAGES = ""
6USE_NLS = "yes"
7
8SRC_URI += "file://db_linking_hack.patch"
9
10python do_install () {
11 bb.build.exec_func('do_install_base', d)
12 bb.build.exec_func('do_install_config', d)
13}
14
15python do_install_config () {
16 indir = os.path.dirname(d.getVar('FILE',1))
17 infile = file(oe.path.join(indir, 'files', 'apt.conf'), 'r')
18 data = infile.read()
19 infile.close()
20
21 data = d.expand(data)
22
23 outdir = oe.path.join(d.getVar('D', True), d.getVar('sysconfdir', True), 'apt')
24 if not os.path.exists(outdir):
25 os.makedirs(outdir)
26
27 outpath = oe.path.join(outdir, 'apt.conf.sample')
28 if not os.path.exists(outpath):
29 outfile = file(outpath, 'w')
30 outfile.write(data)
31 outfile.close()
32}
33
34do_install_base () {
35 install -d ${D}${bindir}
36 install -m 0755 bin/apt-cdrom ${D}${bindir}/
37 install -m 0755 bin/apt-get ${D}${bindir}/
38 install -m 0755 bin/apt-config ${D}${bindir}/
39 install -m 0755 bin/apt-cache ${D}${bindir}/
40 install -m 0755 bin/apt-sortpkgs ${D}${bindir}/
41 install -m 0755 bin/apt-extracttemplates ${D}${bindir}/
42 install -m 0755 bin/apt-ftparchive ${D}${bindir}/
43
44 eval `cat environment.mak | grep ^GLIBC_VER | sed -e's, = ,=,'`
45 eval `cat environment.mak | grep ^LIBSTDCPP_VER | sed -e's, = ,=,'`
46 oe_libinstall -so -C bin libapt-pkg$GLIBC_VER$LIBSTDCPP_VER ${D}${libdir}/
47 ln -sf libapt-pkg$GLIBC_VER$LIBSTDCPP_VER.so ${D}${libdir}/libapt-pkg.so
48 oe_libinstall -so -C bin libapt-inst$GLIBC_VER$LIBSTDCPP_VER ${D}${libdir}/
49 ln -sf libapt-inst$GLIBC_VER$LIBSTDCPP_VER.so ${D}${libdir}/libapt-inst.so
50
51 install -d ${D}${libdir}/apt/methods
52 install -m 0755 bin/methods/* ${D}${libdir}/apt/methods/
53
54 install -d ${D}${libdir}/dpkg/methods/apt
55 install -m 0644 ${S}/dselect/desc.apt ${D}${libdir}/dpkg/methods/apt/
56 install -m 0644 ${S}/dselect/names ${D}${libdir}/dpkg/methods/apt/
57 install -m 0755 ${S}/dselect/install ${D}${libdir}/dpkg/methods/apt/
58 install -m 0755 ${S}/dselect/setup ${D}${libdir}/dpkg/methods/apt/
59 install -m 0755 ${S}/dselect/update ${D}${libdir}/dpkg/methods/apt/
60
61 install -d ${D}${sysconfdir}/apt
62 install -d ${D}${sysconfdir}/apt/apt.conf.d
63 install -d ${D}${sysconfdir}/apt/preferences.d
64 install -d ${D}${localstatedir}/lib/apt/lists/partial
65 install -d ${D}${localstatedir}/cache/apt/archives/partial
66
67 install -d ${D}${localstatedir}/log/apt/
68}