summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rpm
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2011-01-15 21:36:23 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-01-28 17:52:55 +0000
commitf6ddba2a9dc15560f639faaba8233c29c0c37e9d (patch)
tree568c80749bdfd9c005c769bbb49b18a6b1390cff /meta/recipes-devtools/rpm
parenta606ad5022e7c0ca34a5bc086254ac8ec16bc8c7 (diff)
downloadpoky-f6ddba2a9dc15560f639faaba8233c29c0c37e9d.tar.gz
rpm: Uprev to RPM 5.4.0
Update RPM to the latest release, RPM 5.4.0. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Diffstat (limited to 'meta/recipes-devtools/rpm')
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-autogen.patch54
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-libsql-fix.patch18
-rwxr-xr-xmeta/recipes-devtools/rpm/rpm/rpm2cpio51
-rw-r--r--meta/recipes-devtools/rpm/rpm_5.1.10.bb168
-rw-r--r--meta/recipes-devtools/rpm/rpm_5.4.0.bb432
5 files changed, 555 insertions, 168 deletions
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-autogen.patch b/meta/recipes-devtools/rpm/rpm/rpm-autogen.patch
new file mode 100644
index 0000000000..323bb7151e
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm/rpm-autogen.patch
@@ -0,0 +1,54 @@
1Remove the sanity checking from the rpm autogen.sh. This is required because
2we may have slightly different, but yet compatible versions. If we do end
3up breaking things, we'll deal with it at that time.
4
5Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
6
7diff -ur rpm-5.4.0.orig/autogen.sh rpm-5.4.0/autogen.sh
8--- rpm-5.4.0.orig/autogen.sh 2010-11-02 11:55:53.000000000 -0500
9+++ rpm-5.4.0/autogen.sh 2011-01-06 00:15:05.158946295 -0600
10@@ -34,12 +34,6 @@
11 eval $_libtoolize $_libtoolize_args
12 }
13
14-# requirements sanity check
15-[ "`automake --version | head -1`" != "$AMV" ] && echo "$USAGE" # && exit 1
16-[ "`autoconf --version | head -1`" != "$ACV" ] && echo "$USAGE" # && exit 1
17-[ "`libtoolize --version | head -1`" != "$LTV" ] && echo "$USAGE" # && exit 1
18-[ "`gettextize --version | head -1 | sed -e 's;^.*/\\(gettextize\\);\\1;'`" != "$GTT" ] && echo "$USAGE" # && exit 1
19-
20 for dir in bash beecrypt file neon pcre popt rc syck xar xz; do
21
22 if [ -d $dir ]; then
23diff -ur rpm-5.4.0.orig/neon/autogen.sh rpm-5.4.0/neon/autogen.sh
24--- rpm-5.4.0.orig/neon/autogen.sh 2010-10-30 19:11:33.000000000 -0500
25+++ rpm-5.4.0/neon/autogen.sh 2011-01-06 00:15:17.863962139 -0600
26@@ -34,12 +34,6 @@
27 eval $_libtoolize $_libtoolize_args
28 }
29
30-# requirements sanity check
31-[ "`automake --version | head -1`" != "$AMV" ] && echo "$USAGE" # && exit 1
32-[ "`autoconf --version | head -1`" != "$ACV" ] && echo "$USAGE" # && exit 1
33-[ "`libtoolize --version | head -1`" != "$LTV" ] && echo "$USAGE" # && exit 1
34-[ "`gettextize --version | head -1 | sed -e 's;^.*/\\(gettextize\\);\\1;'`" != "$GTT" ] && echo "$USAGE" # && exit 1
35-
36 echo "---> generate files via GNU libtool (libtoolize)"
37 libtoolize --quiet --copy --force --install
38 echo "---> generate files via GNU autoconf (aclocal, autoheader)"
39diff -ur rpm-5.4.0.orig/syck/autogen.sh rpm-5.4.0/syck/autogen.sh
40--- rpm-5.4.0.orig/syck/autogen.sh 2010-11-02 11:55:56.000000000 -0500
41+++ rpm-5.4.0/syck/autogen.sh 2011-01-06 00:15:27.103949601 -0600
42@@ -34,12 +34,6 @@
43 eval $_libtoolize $_libtoolize_args
44 }
45
46-# requirements sanity check
47-[ "`automake --version | head -1`" != "$AMV" ] && echo "$USAGE" # && exit 1
48-[ "`autoconf --version | head -1`" != "$ACV" ] && echo "$USAGE" # && exit 1
49-[ "`libtoolize --version | head -1`" != "$LTV" ] && echo "$USAGE" # && exit 1
50-[ "`gettextize --version | head -1 | sed -e 's;^.*/\\(gettextize\\);\\1;'`" != "$GTT" ] && echo "$USAGE" # && exit 1
51-
52 echo "---> generate files via GNU libtool (libtoolize)"
53 libtoolize --quiet --copy --force --install
54 echo "---> generate files via GNU autoconf (aclocal, autoheader)"
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-libsql-fix.patch b/meta/recipes-devtools/rpm/rpm/rpm-libsql-fix.patch
new file mode 100644
index 0000000000..829399c95e
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm/rpm-libsql-fix.patch
@@ -0,0 +1,18 @@
1During installation, the libtool relink attempts to link to -lrpm...
2The problem is that it hasn't been installed yet! So small change causes
3the libtool to instead use the build version.
4
5Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
6
7--- rpm-5.4.0/lib/Makefile.am.orig
8+++ rpm-5.4.0/lib/Makefile.am
9@@ -90,6 +90,9 @@
10 libsql_la_SOURCES = libsql.c
11 libsql_la_LIBADD = librpm.la $(RPMDB_LDADD_COMMON)
12
13+# pkglib libraries needs to have usrlib libraries already installed!
14+install-pkglibLTLIBRARIES: install-usrlibLTLIBRARIES
15+
16 install-data-hook:
17 if !ENABLE_BUILD_LAFILES
18 -for l in $(usrlib_LTLIBRARIES); do \
diff --git a/meta/recipes-devtools/rpm/rpm/rpm2cpio b/meta/recipes-devtools/rpm/rpm/rpm2cpio
new file mode 100755
index 0000000000..00c4ec549e
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm/rpm2cpio
@@ -0,0 +1,51 @@
1#!/bin/sh
2
3pkg=$1
4if [ "$pkg" = "" -o ! -e "$pkg" ]; then
5 echo "no package supplied" 1>&2
6 exit 1
7fi
8
9leadsize=96
10o=`expr $leadsize + 8`
11set `od -j $o -N 8 -t u1 $pkg`
12il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5`
13dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9`
14# echo "sig il: $il dl: $dl"
15
16sigsize=`expr 8 + 16 \* $il + $dl`
17o=`expr $o + $sigsize + \( 8 - \( $sigsize \% 8 \) \) \% 8 + 8`
18set `od -j $o -N 8 -t u1 $pkg`
19il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5`
20dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9`
21# echo "hdr il: $il dl: $dl"
22
23hdrsize=`expr 8 + 16 \* $il + $dl`
24o=`expr $o + $hdrsize`
25EXTRACTOR="dd if=$pkg ibs=$o skip=1"
26
27COMPRESSION=`($EXTRACTOR |file -) 2>/dev/null`
28if echo $COMPRESSION |grep -q gzip; then
29 DECOMPRESSOR=gunzip
30elif echo $COMPRESSION |grep -q bzip2; then
31 DECOMPRESSOR=bunzip2
32elif echo $COMPRESSION |grep -q xz; then
33 DECOMPRESSOR=unxz
34elif echo $COMPRESSION |grep -q cpio; then
35 DECOMPRESSOR=cat
36else
37 # Most versions of file don't support LZMA, therefore we assume
38 # anything not detected is LZMA
39 DECOMPRESSOR=`which unlzma 2>/dev/null`
40 case "$DECOMPRESSOR" in
41 /* ) ;;
42 * ) DECOMPRESSOR=`which lzmash 2>/dev/null`
43 case "$DECOMPRESSOR" in
44 /* ) DECOMPRESSOR="lzmash -d -c" ;;
45 * ) DECOMPRESSOR=cat ;;
46 esac
47 ;;
48 esac
49fi
50
51$EXTRACTOR 2>/dev/null | $DECOMPRESSOR
diff --git a/meta/recipes-devtools/rpm/rpm_5.1.10.bb b/meta/recipes-devtools/rpm/rpm_5.1.10.bb
deleted file mode 100644
index b9ba8dbb4c..0000000000
--- a/meta/recipes-devtools/rpm/rpm_5.1.10.bb
+++ /dev/null
@@ -1,168 +0,0 @@
1DESCRIPTION = "The RPM Package Manager - relaunched"
2DESCRIPTION_rpm-build = "The RPM Package Manager rpmbuild and related commands."
3HOMEPAGE = "http://rpm5.org/"
4LICENSE = "LGPL 2.1"
5LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1"
6
7DEPENDS = "zlib perl popt beecrypt python libpcre elfutils"
8PR = "r8"
9
10SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.1/POKY/${BPN}-${PV}.tar.gz \
11 file://hdraddorappend.patch \
12 file://export-rpmbag-h.patch \
13 file://rpm-nrescan.patch \
14 file://rpm-autoconf.patch \
15 file://remove-compiled-tests.patch;apply=no \
16 file://perfile_rpmdeps.sh \
17 file://rpm-no-loop.patch \
18 "
19
20SRC_URI[md5sum] = "a5deb83b451f11c04461c630937b1189"
21SRC_URI[sha256sum] = "701726a6ae8283fcabc308dae523ad9599388296a562db1b3d7d7c871641af7e"
22inherit autotools gettext
23
24acpaths = "-I ${S}/db/dist/aclocal -I ${S}/db/dist/aclocal_java"
25
26# Specify the default rpm macros in terms of adjustable variables
27rpm_macros = "%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:~/.oerpmmacros"
28
29EXTRA_OECONF = "--with-python=${PYTHON_BASEVERSION} \
30 --with-python-inc-dir=${STAGING_INCDIR}/python${PYTHON_BASEVERSION} \
31 --with-python-lib-dir=${libdir}/python${PYTHON_BASEVERSION} \
32 --with-db=internal \
33 --with-db-tools-integrated \
34 --with-libelf \
35 --with-file=internal \
36 --without-apidocs \
37 --without-selinux \
38 --without-lua \
39 --without-dmalloc \
40 --without-efence \
41 --without-neon \
42 --with-pcre=internal \
43 --with-path-macros=${rpm_macros} \
44 --with-bugreport=http://bugzilla.pokylinux.org"
45
46CFLAGS_append = " -DRPM_VENDOR_WINDRIVER"
47
48PACKAGES =+ "rpm-build python-rpm python-rpm-dbg"
49
50SOLIBS = "5.0.so"
51
52FILES_rpm-build = "${bindir}/*-rpmbuild \
53 ${bindir}/*-gendiff \
54 ${bindir}/*-rpmspecdump \
55 ${libdir}/rpm/helpers/* \
56 ${libdir}/rpm/*brp* \
57 ${libdir}/rpm/*check-files \
58 ${libdir}/rpm/*cross-build \
59 ${libdir}/rpm/*debugedit \
60 ${libdir}/rpm/*dep* \
61 ${libdir}/rpm/*prov* \
62 ${libdir}/rpm/*req* \
63 ${libdir}/rpm/*find* \
64 ${libdir}/rpm/qf/* \
65 "
66
67FILES_python-rpm = "${libdir}/python*/rpm/_*"
68FILES_python-rpm-dbg = "${libdir}/python*/rpm/.debug/_*"
69
70# The mutex needs to be POSIX/pthreads/library or we can't
71# share a database between host and target environments
72# (there is a minor performance penalty, but not one great enough
73# to justify the pain of a more optimized approach!)
74EXTRA_OECONF += "--with-mutex=POSIX/pthreads/library"
75
76do_configure() {
77 # Manually run through the steps of the autogen.sh
78 ( cd pcre
79 libtoolize --quiet --copy --force --install
80 aclocal
81 autoheader
82 automake -Wall -Wno-override -a -c
83 autoconf
84 )
85
86 ( cd xz
87 autopoint -f
88 rm -f \
89 codeset.m4 \
90 glibc2.m4 \
91 glibc21.m4 \
92 intdiv0.m4 \
93 intl.m4 \
94 intldir.m4 \
95 intmax.m4 \
96 inttypes-pri.m4 \
97 inttypes_h.m4 \
98 lcmessage.m4 \
99 lock.m4 \
100 longdouble.m4 \
101 longlong.m4 \
102 printf-posix.m4 \
103 size_max.m4 \
104 stdint_h.m4 \
105 uintmax_t.m4 \
106 ulonglong.m4 \
107 visibility.m4 \
108 wchar_t.m4 \
109 wint_t.m4 \
110 xsize.m4
111 libtoolize -c -f || glibtoolize -c -f
112 aclocal -I m4
113 autoconf
114 autoheader
115 automake -acf --foreign
116 )
117
118 ( cd file
119 libtoolize --quiet --copy --force --install
120 aclocal
121 autoheader
122 automake -Wall -Wno-override -a -c
123 autoconf
124 )
125
126 (cd syck
127 libtoolize --quiet --copy --force --install
128 aclocal
129 autoheader
130 automake -Wall -Wno-override -a -c
131 autoconf
132 )
133
134 (cd xar
135 libtoolize --quiet --copy --force --install
136 aclocal
137 autoheader
138 automake -Wall -Wno-override -a -c
139 autoconf
140 )
141
142 rm -rf autom4te.cache || true
143 libtoolize --quiet --copy --force --install
144 autopoint --force
145 rm -f aclocal.m4
146 aclocal -I m4
147 autoheader -I m4
148 automake -Wall -Wno-override -a -c
149 autoconf -I m4
150 # end of autogen.sh steps
151
152 export ac_cv_va_copy=C99
153 oe_runconf
154}
155
156do_install_append() {
157 sed -i -e 's,%__check_files,#%%__check_files,' ${D}/${libdir}/rpm/macros
158 sed -i -e 's,%__scriptlet_requires,#%%__scriptlet_requires,' ${D}/${libdir}/rpm/macros
159 sed -i -e 's,%__perl_provides,#%%__perl_provides,' ${D}/${libdir}/rpm/macros
160 sed -i -e 's,%__perl_requires,#%%__perl_requires,' ${D}/${libdir}/rpm/macros
161
162 # Enable Debian style arbitrary tags...
163 sed -i -e 's,%_arbitrary_tags[^_].*,%_arbitrary_tags %{_arbitrary_tags_debian},' ${D}/${libdir}/rpm/macros
164
165 install -m 0755 ${WORKDIR}/perfile_rpmdeps.sh ${D}/${libdir}/rpm/perfile_rpmdeps.sh
166}
167
168BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/rpm/rpm_5.4.0.bb b/meta/recipes-devtools/rpm/rpm_5.4.0.bb
new file mode 100644
index 0000000000..541fb6078b
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm_5.4.0.bb
@@ -0,0 +1,432 @@
1SUMMARY = "The RPM package management system"
2DESCRIPTION = "The RPM Package Manager (RPM) is a powerful command line driven \
3package management system capable of installing, uninstalling, \
4verifying, querying, and updating software packages. Each software \
5package consists of an archive of files along with information about \
6the package like its version, a description, etc."
7
8SUMMARY_${PN}-libs = "Libraries for manipulating RPM packages."
9DESCRIPTION_${PN}-libs = "This package contains the RPM shared libraries."
10
11SUMMARY_${PN}-dev = "Development files for manipulating RPM packages."
12DESCRIPTION_${PN}-dev = "This package contains the RPM C library and header files. These \
13development files will simplify the process of writing programs that \
14manipulate RPM packages and databases. These files are intended to \
15simplify the process of creating graphical package managers or any \
16other tools that need an intimate knowledge of RPM packages in order \
17to function."
18
19SUMMARY_${PN}-common = "Common RPM paths, scripts, documentation and configuration."
20DESCRIPTION_${PN}-common = "The rpm-common package contains paths, scripts, documentation \
21and configuration common between RPM Package Manager."
22
23SUMMARY_${PN}-build = "Scripts and executable programs used to build packages."
24DESCRIPTION_${PN}-build = "The rpm-build packagec ontains the scripts and executable programs \
25that are used to build packages using the RPM Package Manager."
26
27SUMMARY_python-rpm = "Python bindings for apps which will manupulate RPM packages."
28DESCRIPTION_python-rpm = "The rpm-python package contains a module that permits applications \
29written in the Python programming language to use the interface \
30supplied by the RPM Package Manager libraries."
31
32SUMMARY_perl-module-rpm = "Perl bindings for apps which will manipulate RPM packages."
33DESCRIPTION_perl-modules-rpm = "The perl-modules-rpm package contains a module that permits applications \
34written in the Perl programming language to use the interface \
35supplied by the RPM Package Manager libraries."
36
37SUMMARY_perl-module-rpm-dev = "Development components for perl bindings"
38DESCRIPTION_perl-modules-rpm-dev = "Development items such as man pages for use with the Perl \
39language bindings."
40
41HOMEPAGE = "http://rpm5.org/"
42LICENSE = "LGPL 2.1"
43LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1"
44
45DEPENDS = "bzip2 zlib python perl db openssl elfutils expat libpcre attr acl popt"
46PR = "r9"
47
48# rpm2cpio is a shell script, which is part of the rpm src.rpm. It is needed
49# in order to extract the distribution SRPM into a format we can extract...
50SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.0-0.20101229.src.rpm \
51 file://rpm2cpio;md5=1850f9872a4803f5165bfd5816274275 \
52 file://perfile_rpmdeps.sh \
53 file://rpm-autogen.patch \
54 file://rpm-libsql-fix.patch \
55 "
56
57# file://hdraddorappend.patch \
58# file://export-rpmbag-h.patch \
59# file://rpm-nrescan.patch \
60# file://rpm-autoconf.patch \
61# file://remove-compiled-tests.patch;apply=no \
62# file://rpm-no-loop.patch \
63# "
64
65SRC_URI[md5sum] = "19c1a7f68d7765eeb7615c9c4e54e380"
66SRC_URI[sha256sum] = "887e76218308b570c33c8c2fb10b5298b3afd5d602860d281befc85357b3b923"
67
68SRPM_UNPACK = "rpm-5.4.0.tar.gz"
69
70inherit autotools gettext
71
72acpaths = "-I ${S}/db/dist/aclocal -I ${S}/db/dist/aclocal_java"
73
74# Specify the default rpm macros in terms of adjustable variables
75rpm_macros = "%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:~/.oerpmmacros"
76
77# Configure values taken from rpm.spec
78WITH_BZIP2 = "--with-bzip2"
79
80WITH_XZ = "--without-xz"
81
82WITH_Z = "--with-zlib $WITH_BZIP2 $WITH_XZ"
83
84WITH_PYTHON = " --with-python=${PYTHON_BASEVERSION} \
85 --with-python-inc-dir=${STAGING_INCDIR}/python${PYTHON_BASEVERSION} \
86 --with-python-lib-dir=${libdir}/python${PYTHON_BASEVERSION} \
87 --without-pythonembed \
88 "
89
90WITH_PYTHON_native = " --without-python"
91
92# Perl modules are not built, but they could be enabled fairly easily
93# the perl module creation and installation would need to be patched.
94# (currently has host perl contamination issues)
95#WITH_PERL = " --with-perl --without-perlembed"
96WITH_PERL = " --without-perl"
97
98WITH_PERL_native = " --without-perl"
99
100WITH_DB = "--with-db --with-dbsql --without-db-tools-integrated --without-sqlite"
101
102WITH_CRYPTO = "--with-beecrypt=internal --with-openssl --without-nss --without-gcrypt"
103
104WITH_KEYUTILS = "--without-keyutils"
105WITH_LIBELF = "--with-libelf"
106WITH_SELINUX = "--without-selinux --without-sepol --without-semanage"
107#WITH_NEON = "--with-neon=internal --without-libproxy --with-expat --without-gssapi"
108WITH_NEON = "--without-neon --without-libproxy --without-expat --without-gssapi"
109
110EXTRA_OECONF = "--verbose \
111 --sysconfdir=/etc \
112 ${WITH_DB} \
113 ${WITH_Z} \
114 --with-file \
115 --with-path-magic=/usr/share/misc/magic \
116 --without-lua \
117 --without-tcl \
118 --with-syck=internal \
119 --without-readline \
120 --without-augeas \
121 ${WITH_CRYPTO} \
122 --without-libtasn1 \
123 --without-pakchois \
124 --without-gnutls \
125 ${WITH_NEON} \
126 --with-pcre \
127 --enable-utf8 \
128 --without-uuid \
129 --with-attr \
130 --with-acl \
131 --without-xar \
132 --with-popt=external \
133 ${WITH_KEYUTILS} \
134 --with-pthreads \
135 ${WITH_LIBELF} \
136 --without-cudf \
137 --without-ficl \
138 --without-aterm \
139 --without-nix \
140 --without-bash \
141 --without-rc \
142 --without-js \
143 --without-gpsee \
144 ${WITH_PYTHON} \
145 ${WITH_PERL} \
146 --without-ruby \
147 --without-squirrel \
148 --with-build-extlibdep \
149 --with-build-maxextlibdep \
150 --without-valgrind \
151 --disable-openmp \
152 --enable-build-pic \
153 --enable-build-versionscript \
154 --enable-build-warnings \
155 --enable-build-debug \
156 --enable-maintainer-mode \
157 --with-path-macros=${rpm_macros} \
158 --with-bugreport=http://bugzilla.pokylinux.org"
159
160CFLAGS_append = " -DRPM_VENDOR_WINDRIVER"
161
162PACKAGES = "${PN}-dbg ${PN} ${PN}-doc ${PN}-libs ${PN}-dev ${PN}-common ${PN}-build python-rpm-dbg python-rpm perl-module-rpm perl-module-rpm-dev ${PN}-locale"
163
164SOLIBS = "5.4.so"
165
166# Based on %files section in the rpm.spec
167
168FILES_${PN} = "${bindir}/rpm \
169 ${bindir}/rpmconstant \
170 ${libdir}/rpm/rpm.* \
171 ${libdir}/rpm/tgpg \
172 ${libdir}/rpm/macros \
173 ${libdir}/rpm/rpmpopt \
174 ${libdir}/rpm/rpmdb_loadcvt \
175 ${libdir}/rpm/rpm2cpio \
176 ${libdir}/rpm/vcheck \
177 ${libdir}/rpm/helpers \
178 ${libdir}/rpm/qf \
179 ${libdir}/rpm/cpuinfo.yaml \
180 ${libdir}/rpm/bin/mtree \
181 ${libdir}/rpm/bin/rpmkey \
182 ${libdir}/rpm/bin/rpmrepo \
183 ${libdir}/rpm/bin/rpmspecdump \
184 ${libdir}/rpm/bin/wget \
185 "
186
187# ${libdir}/rpm/magic \
188# ${libdir}/rpm/magic.mgc \
189# ${libdir}/rpm/magic.mime \
190# ${libdir}/rpm/magic.mime.mgc \
191# ${libdir}/rpm/bin/db_* \
192# ${libdir}/rpm/bin/grep \
193
194FILES_${PN}-dbg = "${bindir}/.debug \
195 ${libdir}/.debug \
196 ${libdir}/rpm/.debug \
197 ${libdir}/rpm/bin/.debug \
198 "
199
200FILES_${PN}-common = "${bindir}/rpm2cpio \
201 ${bindir}/gendiff \
202 /etc/rpm \
203 /var/lib/rpm \
204 /var/spool/repackage \
205 "
206
207FILES_${PN}-libs = "${libdir}/librpm-*.so \
208 ${libdir}/librpmconstant-*.so \
209 ${libdir}/librpmdb-*.so \
210 ${libdir}/librpmio-*.so \
211 ${libdir}/librpmmisc-*.so \
212 ${libdir}/librpmbuild-*.so \
213 "
214
215###%{_rpmhome}/lib/libxar.so.*
216###%{_rpmhome}/lib/libjs.so.*
217###%{_rpmhome}/lib/librpmjsm.so.*
218###%{_rpmhome}/lib/rpmjsm.so
219
220
221FILES_${PN}-build = "${prefix}/src/rpm \
222 ${bindir}/rpmbuild \
223 ${libdir}/rpm/brp-* \
224 ${libdir}/rpm/check-files \
225 ${libdir}/rpm/cross-build \
226 ${libdir}/rpm/find-debuginfo.sh \
227 ${libdir}/rpm/find-lang.sh \
228 ${libdir}/rpm/find-prov.pl \
229 ${libdir}/rpm/find-provides.perl \
230 ${libdir}/rpm/find-req.pl \
231 ${libdir}/rpm/find-requires.perl \
232 ${libdir}/rpm/getpo.sh \
233 ${libdir}/rpm/http.req \
234 ${libdir}/rpm/javadeps.sh \
235 ${libdir}/rpm/mono-find-provides \
236 ${libdir}/rpm/mono-find-requires \
237 ${libdir}/rpm/executabledeps.sh \
238 ${libdir}/rpm/libtooldeps.sh \
239 ${libdir}/rpm/osgideps.pl \
240 ${libdir}/rpm/perldeps.pl \
241 ${libdir}/rpm/perl.prov \
242 ${libdir}/rpm/perl.req \
243 ${libdir}/rpm/php.prov \
244 ${libdir}/rpm/php.req \
245 ${libdir}/rpm/pkgconfigdeps.sh \
246 ${libdir}/rpm/pythondeps.sh \
247 ${libdir}/rpm/bin/debugedit \
248 ${libdir}/rpm/bin/rpmcache \
249 ${libdir}/rpm/bin/rpmcmp \
250 ${libdir}/rpm/bin/rpmdeps \
251 ${libdir}/rpm/bin/rpmdigest \
252 ${libdir}/rpm/bin/abi-compliance-checker.pl \
253 ${libdir}/rpm/bin/api-sanity-autotest.pl \
254 ${libdir}/rpm/bin/chroot \
255 ${libdir}/rpm/bin/cp \
256 ${libdir}/rpm/bin/dbsql \
257 ${libdir}/rpm/bin/find \
258 ${libdir}/rpm/bin/install-sh \
259 ${libdir}/rpm/bin/lua \
260 ${libdir}/rpm/bin/luac \
261 ${libdir}/rpm/bin/mkinstalldirs \
262 ${libdir}/rpm/bin/rpmlua \
263 ${libdir}/rpm/bin/rpmluac \
264 ${libdir}/rpm/bin/sqlite3 \
265 ${libdir}/rpm/lib/liblua.a \
266 ${libdir}/rpm/lib/liblua.la \
267 ${libdir}/rpm/macros.d/cmake \
268 ${libdir}/rpm/macros.d/java \
269 ${libdir}/rpm/macros.d/libtool \
270 ${libdir}/rpm/macros.d/mandriva \
271 ${libdir}/rpm/macros.d/mono \
272 ${libdir}/rpm/macros.d/perl \
273 ${libdir}/rpm/macros.d/php \
274 ${libdir}/rpm/macros.d/pkgconfig \
275 ${libdir}/rpm/macros.d/python \
276 ${libdir}/rpm/macros.d/ruby \
277 ${libdir}/rpm/macros.d/selinux \
278 ${libdir}/rpm/macros.d/tcl \
279 ${libdir}/rpm/macros.rpmbuild \
280 ${libdir}/rpm/u_pkg.sh \
281 ${libdir}/rpm/vpkg-provides.sh \
282 ${libdir}/rpm/vpkg-provides2.sh \
283 ${libdir}/rpm/perfile_rpmdeps.sh \
284 "
285
286#%rpmattr %{_rpmhome}/gem_helper.rb
287#%rpmattr %{_rpmhome}/symclash.*
288
289FILES_python-rpm-dbg = "${libdir}/python*/rpm/.debug/_*"
290FILES_python-rpm = "${libdir}/python*/rpm"
291
292FILES_perl-module-rpm = "${libdir}/perl/*/* \
293 "
294
295FILES_perl-module-rpm-dev = "${prefix}/share/man/man3/RPM* \
296 "
297
298FILE_${PN}-dev = "${includedir}/rpm \
299 ${libdir}/librpm.a \
300 ${libdir}/librpm.la \
301 ${libdir}/librpm.so \
302 ${libdir}/librpmconstant.a \
303 ${libdir}/librpmconstant.la \
304 ${libdir}/librpmconstant.so \
305 ${libdir}/librpmdb.a \
306 ${libdir}/librpmdb.la \
307 ${libdir}/librpmdb.so \
308 ${libdir}/librpmio.a \
309 ${libdir}/librpmio.la \
310 ${libdir}/librpmio.so \
311 ${libdir}/librpmmisc.a \
312 ${libdir}/librpmmisc.la \
313 ${libdir}/librpmmisc.so \
314 ${libdir}/librpmbuild.a \
315 ${libdir}/librpmbuild.la \
316 ${libdir}/librpmbuild.so \
317 ${libdir}/pkgconfig/rpm.pc \
318 "
319
320###%{_rpmhome}/lib/libxar.a
321###%{_rpmhome}/lib/libxar.la
322###%{_rpmhome}/lib/libxar.so
323###%{_rpmhome}/lib/libjs.a
324###%{_rpmhome}/lib/libjs.la
325###%{_rpmhome}/lib/libjs.so
326###%{_rpmhome}/lib/librpmjsm.a
327###%{_rpmhome}/lib/librpmjsm.la
328###%{_rpmhome}/lib/librpmjsm.so
329
330# If base_do_unpack is refactored this may have to be adjusted
331python base_do_unpack_append() {
332 import subprocess
333
334 for url in src_uri.split():
335 try:
336 local = bb.data.expand(bb.fetch.localpath(url, localdata), localdata)
337 except bb.MalformedUrl, e:
338 raise FuncFailed('Unable to generate local path for malformed uri: %s' % e)
339 if local is None:
340 continue
341 local = os.path.realpath(local)
342
343 if local.endswith('.src.rpm') or local.endswith('.srpm'):
344 cmdname = os.path.join(bb.data.getVar('WORKDIR', localdata, 1),'rpm2cpio')
345 efile = os.path.join(bb.data.getVar('WORKDIR', localdata, 1),os.path.basename(local))
346 cmd = "%s %s | cpio -i" % (cmdname, efile)
347 cmd = "PATH=\"%s\" %s" % (bb.data.getVar('PATH', localdata, 1), cmd)
348 old_cwd = os.getcwd()
349 newdir = ("%s/%s" % (old_cwd, 'srpm-unpack'))
350 bb.mkdirhier(newdir)
351 os.chdir(newdir)
352 ret = subprocess.call(cmd, preexec_fn=subprocess_setup, shell=True)
353 os.chdir(old_cwd)
354 if ret != 0:
355 raise bb.build.FuncFailed('Unpack command failed: %s (%s)' % (cmd, ret))
356
357 srpm_uri = bb.data.getVar('SRPM_UNPACK', localdata, True)
358 if not srpm_uri:
359 return
360
361 # Note, not really URI's! Just a list of files
362 for url in srpm_uri.split():
363 local = os.path.join(bb.data.getVar('WORKDIR', localdata, 1), "srpm-unpack/" + url)
364 ret = oe_unpack_file(local, localdata, 'file://' + url)
365 if not ret:
366 raise bb.build.FuncFailed("oe_unpack_file failed with return value %s" % ret)
367}
368
369do_configure() {
370 # Disable tests!
371 echo "all:" > tests/Makefile.am
372
373 ./autogen.sh
374
375 oe_runconf
376}
377
378do_install_append() {
379 sed -i -e 's,%__check_files,#%%__check_files,' ${D}/${libdir}/rpm/macros
380 sed -i -e 's,%__scriptlet_requires,#%%__scriptlet_requires,' ${D}/${libdir}/rpm/macros
381 sed -i -e 's,%__perl_provides,#%%__perl_provides,' ${D}/${libdir}/rpm/macros
382 sed -i -e 's,%__perl_requires,#%%__perl_requires,' ${D}/${libdir}/rpm/macros
383
384 # Enable Debian style arbitrary tags...
385 sed -i -e 's,%_arbitrary_tags[^_].*,%_arbitrary_tags %{_arbitrary_tags_debian},' ${D}/${libdir}/rpm/macros
386
387 install -m 0755 ${WORKDIR}/perfile_rpmdeps.sh ${D}/${libdir}/rpm/perfile_rpmdeps.sh
388
389 # Remove unpackaged files (based on list in rpm.spec)
390 rm -f ${D}/${libdir}/rpm/{Specfile.pm,cpanflute,cpanflute2,rpmdiff,rpmdiff.cgi,sql.prov,sql.req,tcl.req,trpm}
391
392 rm -f ${D}/${mandir}/man8/rpmcache.8*
393 rm -f ${D}/${mandir}/man8/rpmgraph.8*
394 rm -f ${D}/${mandir}/*/man8/rpmcache.8*
395 rm -f ${D}/${mandir}/*/man8/rpmgraph.8*
396 rm -rf ${D}/${mandir}/{fr,ko}
397
398 rm -f ${D}/${includedir}/popt.h
399 rm -f ${D}/${libdir}/libpopt.*
400 rm -f ${D}/${libdir}/pkgconfig/popt.pc
401 rm -f ${D}/${datadir}/locale/*/LC_MESSAGES/popt.mo
402 rm -f ${D}/${mandir}/man3/popt.3
403
404 rm -f ${D}/${mandir}/man1/xar.1*
405 rm -f ${D}/${bindir}/xar
406 rm -rf ${D}/${includedir}/xar
407 rm -f ${D}/${libdir}/libxar*
408
409 rm -f ${D}/${bindir}/lz*
410 rm -f ${D}/${bindir}/unlzma
411 rm -f ${D}/${bindir}/unxz
412 rm -f ${D}/${bindir}/xz*
413 rm -rf ${D}/${includedir}/lzma*
414 rm -f ${D}/${mandir}/man1/lz*.1
415 rm -f ${D}/${libdir}/pkgconfig/liblzma*
416
417 rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/*.{a,la}
418 rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/rpm/*.{a,la}
419
420 #find ${D}/${libdir}/perl5 -type f -a \( -name perllocal.pod -o -name .packlist \
421 # -o \( -name '*.bs' -a -empty \) \) -exec rm -f {} ';'
422 #find ${D}/${libdir}/perl5 -type d -depth -exec rmdir {} 2>/dev/null ';'
423
424 # We don't want the default macro set
425 rm -rf ${D}/${libdir}/rpm/{i[3456]86*,athlon*,pentium*,x86_64*,alpha*,sparc*,ia64*,ppc*,s390*,armv[34][lb]*,armv[345]*,mips*,noarch*}
426
427 rm -f ${D}/${libdir}/rpm/dbconvert.sh
428
429 rm -f ${D}/${libdir}/rpm/libsqldb.*
430}
431
432BBCLASSEXTEND = "native"