summaryrefslogtreecommitdiffstats
path: root/meta/packages/apt
diff options
context:
space:
mode:
authorChris Larson <kergoth@openedhand.com>2006-09-07 20:46:06 +0000
committerChris Larson <kergoth@openedhand.com>2006-09-07 20:46:06 +0000
commitabfc1dbd73d59344564e7cc00754a259d2f2bc85 (patch)
tree6a24874055c7dc6bb6721d369764db479729c592 /meta/packages/apt
parent2ca2649935540acd6e160f82ddd074b04dfea924 (diff)
downloadpoky-abfc1dbd73d59344564e7cc00754a259d2f2bc85.tar.gz
Add apt & apt-native, including the generation of the apt.conf to be used for the rootfs population.
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@699 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/apt')
-rw-r--r--meta/packages/apt/apt-0.6.45exp2/autofoo.patch84
-rw-r--r--meta/packages/apt/apt-0.6.45exp2/nodoc.patch15
-rw-r--r--meta/packages/apt/apt-native.inc57
-rw-r--r--meta/packages/apt/apt-native_0.6.45exp2.bb3
-rw-r--r--meta/packages/apt/apt-package.inc101
-rw-r--r--meta/packages/apt/apt.inc11
-rw-r--r--meta/packages/apt/apt_0.6.45exp2.bb9
-rw-r--r--meta/packages/apt/files/apt.conf24
8 files changed, 304 insertions, 0 deletions
diff --git a/meta/packages/apt/apt-0.6.45exp2/autofoo.patch b/meta/packages/apt/apt-0.6.45exp2/autofoo.patch
new file mode 100644
index 0000000000..74d787cefd
--- /dev/null
+++ b/meta/packages/apt/apt-0.6.45exp2/autofoo.patch
@@ -0,0 +1,84 @@
1
2#
3# Patch managed by http://www.holgerschurig.de/patcher.html
4#
5
6---
7 configure.in | 20 ++++++++++----------
8 1 file changed, 10 insertions(+), 10 deletions(-)
9
10--- apt-0.6.45exp2.orig/configure.in
11+++ apt-0.6.45exp2/configure.in
12@@ -18,9 +18,9 @@ AC_CONFIG_AUX_DIR(buildlib)
13 AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in include/apti18n.h:buildlib/apti18n.h.in)
14
15 dnl -- SET THIS TO THE RELEASE VERSION --
16-AC_DEFINE_UNQUOTED(VERSION,"0.6.45exp2")
17+AC_DEFINE_UNQUOTED(VERSION,"0.6.45exp2",[package version])
18 PACKAGE="apt"
19-AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE")
20+AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE",[package name])
21 AC_SUBST(PACKAGE)
22
23 dnl Check the archs, we want the target type.
24@@ -47,7 +47,7 @@ AC_SUBST(SOCKETLIBS)
25 LIBS="$SAVE_LIBS"
26
27 dnl Checks for pthread -- disabled due to glibc bugs jgg
28-dnl AC_CHECK_LIB(pthread, pthread_create,[AC_DEFINE(HAVE_PTHREAD) PTHREADLIB="-lpthread"])
29+dnl AC_CHECK_LIB(pthread, pthread_create,[AC_DEFINE(HAVE_PTHREAD, 1, [define if we have pthreads]) PTHREADLIB="-lpthread"])
30 AC_SUBST(PTHREADLIB)
31 dnl if test "$PTHREADLIB" != "-lpthread"; then
32 dnl AC_MSG_ERROR(failed: I need posix threads, pthread)
33@@ -84,14 +84,14 @@ if test "x$archset" = "x"; then
34 AC_MSG_ERROR(failed: use --host= or check buildlib/archtable)
35 fi
36 AC_MSG_RESULT($archset)
37-AC_DEFINE_UNQUOTED(COMMON_CPU,"$archset")
38+AC_DEFINE_UNQUOTED(COMMON_CPU,"$archset",[define to the system architecture])
39
40 dnl Get a common name for the host OS - this is primarily only for HURD and is
41 dnl non fatal if it fails
42 AC_MSG_CHECKING(system OS)
43 osset="`awk \" ! /^#|^\\\$/ {if (match(\\\"$target_vendor-$target_os\\\",\\\$1)) {print \\\$2; exit}}\" $srcdir/buildlib/ostable`"
44 AC_MSG_RESULT($osset)
45-AC_DEFINE_UNQUOTED(COMMON_OS,"$osset")
46+AC_DEFINE_UNQUOTED(COMMON_OS,"$osset",[define to the system OS])
47
48 dnl We use C99 types if at all possible
49 AC_CACHE_CHECK([for C99 integer types],c9x_ints,[
50@@ -105,13 +105,13 @@ AC_SUBST(HAVE_STATVFS)
51
52 dnl Arg, linux and bsd put their statfs function in different places
53 if test x"$HAVE_STATVFS" != x"yes"; then
54- AC_EGREP_HEADER(statfs,sys/vfs.h,[AC_DEFINE(HAVE_VFS_H)],[
55- AC_EGREP_HEADER(statfs,sys/mount.h,[AC_DEFINE(HAVE_MOUNT_H)],[AC_MSG_ERROR(failed: Need statvfs)])
56+ AC_EGREP_HEADER(statfs,sys/vfs.h,[AC_DEFINE(HAVE_VFS_H, 1, [define if statfs is in sys/vfs.h])],[
57+ AC_EGREP_HEADER(statfs,sys/mount.h,[AC_DEFINE(HAVE_MOUNT_H, 1, [define if statfs is in sys/mount.h])],[AC_MSG_ERROR(failed: Need statvfs)])
58 ])
59 fi
60
61 dnl We should use the real timegm function if we have it.
62-AC_CHECK_FUNC(timegm,AC_DEFINE(HAVE_TIMEGM))
63+AC_CHECK_FUNC(timegm,AC_DEFINE(HAVE_TIMEGM, 1, [define if we have timegm]))
64 AC_SUBST(HAVE_TIMEGM)
65
66 dnl Check the sizes etc. of the architecture
67@@ -157,7 +157,7 @@ fi
68 dnl HP-UX sux..
69 AC_MSG_CHECKING(for missing socklen_t)
70 AC_EGREP_HEADER(socklen_t, sys/socket.h,[AC_MSG_RESULT(no)],[
71- AC_DEFINE(NEED_SOCKLEN_T_DEFINE)
72+ AC_DEFINE(NEED_SOCKLEN_T_DEFINE, 1, [define if we need to define socklen_t])
73 NEED_SOCKLEN_T_DEFINE=yes
74 AC_MSG_RESULT(missing.)])
75 AC_SUBST(NEED_SOCKLEN_T_DEFINE)
76@@ -204,7 +204,7 @@ dnl gettext approved makefiles, so this
77 ALL_LINGUAS="bg bs ca cs cy da de dz el en_GB es eu fi fr gl hu it ja ko nb nl nn pl pt_BR pt ro ru sk sl sv tl vi zn_CN zh_TW"
78 AM_GNU_GETTEXT(external)
79 if test x"$USE_NLS" = "xyes"; then
80- AC_DEFINE(USE_NLS)
81+ AC_DEFINE(USE_NLS, 1, [define if we have native language support])
82 fi
83 AC_SUBST(USE_NLS)
84 AC_PATH_PROG(BASH, bash)
diff --git a/meta/packages/apt/apt-0.6.45exp2/nodoc.patch b/meta/packages/apt/apt-0.6.45exp2/nodoc.patch
new file mode 100644
index 0000000000..9101847189
--- /dev/null
+++ b/meta/packages/apt/apt-0.6.45exp2/nodoc.patch
@@ -0,0 +1,15 @@
1---
2 Makefile | 2 +-
3 1 file changed, 1 insertion(+), 1 deletion(-)
4
5--- apt-0.6.45exp2.orig/Makefile
6+++ apt-0.6.45exp2/Makefile
7@@ -17,7 +17,7 @@ all headers library clean veryclean bina
8 $(MAKE) -C cmdline $@
9 $(MAKE) -C ftparchive $@
10 $(MAKE) -C dselect $@
11- $(MAKE) -C doc $@
12+# $(MAKE) -C doc $@
13 $(MAKE) -C po $@
14
15 # Some very common aliases
diff --git a/meta/packages/apt/apt-native.inc b/meta/packages/apt/apt-native.inc
new file mode 100644
index 0000000000..4ace9e94bb
--- /dev/null
+++ b/meta/packages/apt/apt-native.inc
@@ -0,0 +1,57 @@
1require apt.inc
2inherit native
3
4DEPENDS += "dpkg-native"
5FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/apt-${PV}"
6PACKAGES = ""
7USE_NLS = "no"
8
9python do_stage () {
10 bb.build.exec_func('do_stage_base', d)
11 bb.build.exec_func('do_stage_config', d)
12}
13
14python do_stage_config () {
15 indir = os.path.dirname(bb.data.getVar('FILE',d,1))
16 infile = file(os.path.join(indir, 'files', 'apt.conf'), 'r')
17 data = infile.read()
18 infile.close()
19
20 data = bb.data.expand(data, d)
21
22 outpath = bb.data.expand('${STAGING_DIR}/${sysconfdir}/apt.conf', d)
23 outfile = file(outpath, 'w')
24 outfile.write(data)
25 outfile.close()
26}
27
28do_stage_base () {
29 install -d ${STAGING_BINDIR}
30 install -m 0755 bin/apt-cdrom ${STAGING_BINDIR}/
31 install -m 0755 bin/apt-get ${STAGING_BINDIR}/
32 install -m 0755 bin/apt-config ${STAGING_BINDIR}/
33 install -m 0755 bin/apt-cache ${STAGING_BINDIR}/
34
35 install -m 0755 bin/apt-sortpkgs ${STAGING_BINDIR}/
36 install -m 0755 bin/apt-extracttemplates ${STAGING_BINDIR}/
37
38 eval `cat environment.mak | grep ^GLIBC_VER | sed -e's, = ,=,'`
39 oe_libinstall -so -C bin libapt-pkg$GLIBC_VER-6 ${STAGING_LIBDIR}/
40 ln -sf libapt-pkg$GLIBC_VER-6.so ${STAGING_LIBDIR}/libapt-pkg.so
41 oe_libinstall -so -C bin libapt-inst$GLIBC_VER-6 ${STAGING_LIBDIR}/
42 ln -sf libapt-inst$GLIBC_VER-6.so ${STAGING_LIBDIR}/libapt-inst.so
43
44 install -d ${STAGING_LIBDIR}/apt/methods
45 install -m 0755 bin/methods/* ${STAGING_LIBDIR}/apt/methods/
46
47 install -d ${STAGING_LIBDIR}/dpkg/methods/apt
48 install -m 0644 dselect/desc.apt ${STAGING_LIBDIR}/dpkg/methods/apt/
49 install -m 0644 dselect/names ${STAGING_LIBDIR}/dpkg/methods/apt/
50 install -m 0755 dselect/install ${STAGING_LIBDIR}/dpkg/methods/apt/
51 install -m 0755 dselect/setup ${STAGING_LIBDIR}/dpkg/methods/apt/
52 install -m 0755 dselect/update ${STAGING_LIBDIR}/dpkg/methods/apt/
53
54 install -d ${STAGING_DIR}${sysconfdir}/apt
55 install -d ${STAGING_DIR}${localstatedir}/lib/apt/lists/partial
56 install -d ${STAGING_DIR}${localstatedir}/cache/apt/archives/partial
57}
diff --git a/meta/packages/apt/apt-native_0.6.45exp2.bb b/meta/packages/apt/apt-native_0.6.45exp2.bb
new file mode 100644
index 0000000000..32f19e8e4c
--- /dev/null
+++ b/meta/packages/apt/apt-native_0.6.45exp2.bb
@@ -0,0 +1,3 @@
1require apt-native.inc
2
3SRC_URI += "file://nodoc.patch;patch=1"
diff --git a/meta/packages/apt/apt-package.inc b/meta/packages/apt/apt-package.inc
new file mode 100644
index 0000000000..43f54cadab
--- /dev/null
+++ b/meta/packages/apt/apt-package.inc
@@ -0,0 +1,101 @@
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}
diff --git a/meta/packages/apt/apt.inc b/meta/packages/apt/apt.inc
new file mode 100644
index 0000000000..9a4f8f329d
--- /dev/null
+++ b/meta/packages/apt/apt.inc
@@ -0,0 +1,11 @@
1DESCRIPTION = "Advanced front-end for dpkg."
2LICENSE = "GPL"
3SECTION = "base"
4MAINTAINER = "Chris Larson <kergoth@handhelds.org>"
5
6SRC_URI = "${DEBIAN_MIRROR}/main/a/apt/apt_${PV}.tar.gz"
7S = "${WORKDIR}/apt-${PV}"
8
9inherit autotools gettext
10
11EXTRA_AUTORECONF = "--exclude=autopoint,autoheader"
diff --git a/meta/packages/apt/apt_0.6.45exp2.bb b/meta/packages/apt/apt_0.6.45exp2.bb
new file mode 100644
index 0000000000..1cd8eb270e
--- /dev/null
+++ b/meta/packages/apt/apt_0.6.45exp2.bb
@@ -0,0 +1,9 @@
1require apt.inc
2
3SRC_URI += "file://autofoo.patch;patch=1 \
4 file://nodoc.patch;patch=1"
5
6require apt-package.inc
7
8FILES_${PN} += "${bindir}/apt-key"
9apt-manpages += "doc/apt-key.8"
diff --git a/meta/packages/apt/files/apt.conf b/meta/packages/apt/files/apt.conf
new file mode 100644
index 0000000000..944233c347
--- /dev/null
+++ b/meta/packages/apt/files/apt.conf
@@ -0,0 +1,24 @@
1Dir "${STAGING_DIR}/"
2{
3 State "var/lib/apt/"
4 {
5 Lists "lists/";
6 status "${IMAGE_ROOTFS}/${localstatedir}/lib/dpkg/status";
7 };
8 Cache "var/cache/apt/"
9 {
10 Archives "archives/";
11 pkgcache "";
12 srcpkgcache "";
13 };
14 Bin "${STAGING_BINDIR}/"
15 {
16 methods "${STAGING_LIBDIR}/apt/methods/";
17 gzip "/bin/gzip";
18 dpkg "dpkg";
19 dpkg-source "dpkg-source";
20 dpkg-buildpackage "dpkg-buildpackage";
21 apt-get "apt-get";
22 apt-cache "apt-cache";
23 };
24};