summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/apt/apt-package.inc
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-08-27 15:14:24 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-08-27 15:29:45 +0100
commit29d6678fd546377459ef75cf54abeef5b969b5cf (patch)
tree8edd65790e37a00d01c3f203f773fe4b5012db18 /meta/recipes-devtools/apt/apt-package.inc
parentda49de6885ee1bc424e70bc02f21f6ab920efb55 (diff)
downloadpoky-29d6678fd546377459ef75cf54abeef5b969b5cf.tar.gz
Major layout change to the packages directory
Having one monolithic packages directory makes it hard to find things and is generally overwhelming. This commit splits it into several logical sections roughly based on function, recipes.txt gives more information about the classifications used. The opportunity is also used to switch from "packages" to "recipes" as used in OpenEmbedded as the term "packages" can be confusing to people and has many different meanings. Not all recipes have been classified yet, this is just a first pass at separating things out. Some packages are moved to meta-extras as they're no longer actively used or maintained. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/recipes-devtools/apt/apt-package.inc')
-rw-r--r--meta/recipes-devtools/apt/apt-package.inc104
1 files changed, 104 insertions, 0 deletions
diff --git a/meta/recipes-devtools/apt/apt-package.inc b/meta/recipes-devtools/apt/apt-package.inc
new file mode 100644
index 0000000000..9e104f12ed
--- /dev/null
+++ b/meta/recipes-devtools/apt/apt-package.inc
@@ -0,0 +1,104 @@
1apt-manpages="doc/apt-cache.8 \
2 doc/apt-cdrom.8 \
3 doc/apt-config.8 \
4 doc/apt-get.8 \
5 doc/apt.8 \
6 doc/apt.conf.5 \
7 doc/apt_preferences.5 \
8 doc/fr/apt-cache.fr.8 \
9 doc/fr/apt-cdrom.fr.8 \
10 doc/fr/apt-config.fr.8 \
11 doc/fr/apt-get.fr.8 \
12 doc/fr/apt.conf.fr.5 \
13 doc/fr/apt_preferences.fr.5 \
14 doc/fr/sources.list.fr.5 \
15 doc/es/apt.es.8 \
16 doc/es/apt-cache.es.8 \
17 doc/es/apt-cdrom.es.8 \
18 doc/es/apt-config.es.8 \
19 doc/es/apt-get.es.8 \
20 doc/es/apt.conf.es.5 \
21 doc/es/apt_preferences.es.5 \
22 doc/es/sources.list.es.5 \
23 doc/pt_BR/apt_preferences.pt_BR.5 \
24 doc/ja/apt-cache.ja.8 \
25 doc/ja/apt-cdrom.ja.8 \
26 doc/ja/apt-get.ja.8 \
27 doc/ja/apt.conf.ja.5 \
28 doc/sources.list.5"
29apt-utils-manpages="doc/apt-extracttemplates.1 \
30 doc/apt-sortpkgs.1 \
31 doc/fr/apt-extracttemplates.fr.1 \
32 doc/fr/apt-sortpkgs.fr.1"
33# doc/fr/apt-ftparchive.fr.1
34# doc/apt-ftparchive.1
35
36def get_files_apt_doc(d, bb, manpages):
37 import re
38 manpages = re.sub(r'\bdoc/(\S+)/(\S+)\.\1\.(.)\b', r'${mandir}/\1/man\3/\2.\3', manpages)
39 manpages = re.sub(r'\bdoc/(\S+)\.(.)\b', r'${mandir}/man\2/\1.\2', manpages)
40 return manpages
41
42def get_commands_apt_doc(d, bb, manpages):
43 import os
44 s = list()
45 __dir_cache__ = list()
46 for m in manpages.split():
47 dest = get_files_apt_doc(d, bb, m)
48 dir = os.path.dirname(dest)
49 if not dir in __dir_cache__:
50 s.append("install -d ${D}/%s" % dir)
51 __dir_cache__.append(dir)
52 s.append("install -m 0644 %s ${D}/%s" % (m, dest))
53 return "\n".join(s)
54
55PACKAGES += "${PN}-utils ${PN}-utils-doc"
56FILES_${PN} = "${bindir}/apt-cdrom ${bindir}/apt-get \
57 ${bindir}/apt-config ${bindir}/apt-cache \
58 ${libdir}/apt ${libdir}/libapt*.so.* \
59 ${localstatedir} ${sysconfdir} \
60 ${libdir}/dpkg"
61FILES_${PN}-utils = "${bindir}/apt-sortpkgs ${bindir}/apt-extracttemplates"
62FILES_${PN}-doc = "${@get_files_apt_doc(d, bb, bb.data.getVar('apt-manpages', d, 1))} \
63 ${docdir}/apt"
64FILES_${PN}-utils-doc = "${@get_files_apt_doc(d, bb, bb.data.getVar('apt-utils-manpages', d, 1))}"
65FILES_${PN}-dev = "${libdir}/libapt*.so"
66
67do_install () {
68 set -x
69 ${@get_commands_apt_doc(d, bb, bb.data.getVar('apt-manpages', d, 1))}
70 ${@get_commands_apt_doc(d, bb, bb.data.getVar('apt-utils-manpages', d, 1))}
71 install -d ${D}${bindir}
72 install -m 0755 bin/apt-cdrom ${D}${bindir}/
73 install -m 0755 bin/apt-get ${D}${bindir}/
74 install -m 0755 bin/apt-config ${D}${bindir}/
75 install -m 0755 bin/apt-cache ${D}${bindir}/
76
77 install -m 0755 bin/apt-sortpkgs ${D}${bindir}/
78 install -m 0755 bin/apt-extracttemplates ${D}${bindir}/
79
80 eval `cat environment.mak | grep ^GLIBC_VER | sed -e's, = ,=,'`
81 oe_libinstall -so -C bin libapt-pkg$GLIBC_VER-6 ${D}${libdir}/
82 ln -sf libapt-pkg$GLIBC_VER-6.so ${D}${libdir}/libapt-pkg.so
83 oe_libinstall -so -C bin libapt-inst$GLIBC_VER-6 ${D}${libdir}/
84 ln -sf libapt-inst$GLIBC_VER-6.so ${D}${libdir}/libapt-inst.so
85
86 install -d ${D}${libdir}/apt/methods
87 install -m 0755 bin/methods/* ${D}${libdir}/apt/methods/
88
89 install -d ${D}${libdir}/dpkg/methods/apt
90 install -m 0644 dselect/desc.apt ${D}${libdir}/dpkg/methods/apt/
91 install -m 0644 dselect/names ${D}${libdir}/dpkg/methods/apt/
92 install -m 0755 dselect/install ${D}${libdir}/dpkg/methods/apt/
93 install -m 0755 dselect/setup ${D}${libdir}/dpkg/methods/apt/
94 install -m 0755 dselect/update ${D}${libdir}/dpkg/methods/apt/
95
96 install -d ${D}${sysconfdir}/apt
97 install -d ${D}${localstatedir}/lib/apt/lists/partial
98 install -d ${D}${localstatedir}/cache/apt/archives/partial
99 install -d ${D}${docdir}/apt/examples
100 install -m 0644 doc/examples/* ${D}${docdir}/apt/examples/
101
102 install -d ${D}${includedir}/apt-pkg/
103 install -m 0644 include/apt-pkg/*.h ${D}${includedir}/apt-pkg/
104}