Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 1 | SUMMARY = "The RPM package management system" |
| 2 | DESCRIPTION = "The RPM Package Manager (RPM) is a powerful command line driven \ |
| 3 | package management system capable of installing, uninstalling, \ |
| 4 | verifying, querying, and updating software packages. Each software \ |
| 5 | package consists of an archive of files along with information about \ |
| 6 | the package like its version, a description, etc." |
| 7 | |
| 8 | SUMMARY_${PN}-libs = "Libraries for manipulating RPM packages" |
| 9 | DESCRIPTION_${PN}-libs = "This package contains the RPM shared libraries." |
| 10 | |
| 11 | SUMMARY_${PN}-dev = "Development files for manipulating RPM packages" |
| 12 | DESCRIPTION_${PN}-dev = "This package contains the RPM C library and header files. These \ |
| 13 | development files will simplify the process of writing programs that \ |
| 14 | manipulate RPM packages and databases. These files are intended to \ |
| 15 | simplify the process of creating graphical package managers or any \ |
| 16 | other tools that need an intimate knowledge of RPM packages in order \ |
| 17 | to function." |
| 18 | |
| 19 | SUMMARY_${PN}-common = "Common RPM paths, scripts, documentation and configuration" |
| 20 | DESCRIPTION_${PN}-common = "The rpm-common package contains paths, scripts, documentation \ |
| 21 | and configuration common between RPM Package Manager." |
| 22 | |
| 23 | SUMMARY_${PN}-build = "Scripts and executable programs used to build packages" |
| 24 | DESCRIPTION_${PN}-build = "The rpm-build packagec ontains the scripts and executable programs \ |
| 25 | that are used to build packages using the RPM Package Manager." |
| 26 | |
| 27 | SUMMARY_python-rpm = "Python bindings for apps which will manupulate RPM packages" |
| 28 | DESCRIPTION_python-rpm = "The rpm-python package contains a module that permits applications \ |
| 29 | written in the Python programming language to use the interface \ |
| 30 | supplied by the RPM Package Manager libraries." |
| 31 | |
| 32 | SUMMARY_perl-module-rpm = "Perl bindings for apps which will manipulate RPM packages" |
| 33 | DESCRIPTION_perl-modules-rpm = "The perl-modules-rpm package contains a module that permits applications \ |
| 34 | written in the Perl programming language to use the interface \ |
| 35 | supplied by the RPM Package Manager libraries." |
| 36 | |
| 37 | HOMEPAGE = "http://rpm5.org/" |
| 38 | LICENSE = "LGPLv2.1 & Apache-2.0" |
| 39 | LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1" |
| 40 | LIC_FILES_CHKSUM += "file://rpmio/mongo.c;begin=5;end=18;md5=d8327ba2c71664c059143e6d333b8901" |
| 41 | |
| 42 | # We must have gettext-native, we need gettextize, which may not be provided |
| 43 | DEPENDS = "libpcre attr acl ossp-uuid file byacc-native gettext-native" |
| 44 | DEPENDS_append_class-native = " file-replacement-native" |
| 45 | |
| 46 | # rpm2cpio is a shell script, which is part of the rpm src.rpm. It is needed |
| 47 | # in order to extract the distribution SRPM into a format we can extract... |
| 48 | |
| 49 | # There is no official 5.4.16 release yet, so start w/ 5.4.15 and patch it |
| 50 | # based on CVS |
| 51 | S = "${WORKDIR}/rpm-5.4.15" |
| 52 | |
| 53 | SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.15-0.20140824.src.rpm;name=srpm;extract=rpm-5.4.15.tar.gz \ |
| 54 | http://downloads.yoctoproject.org/releases/rpm5/rpm-5.4.15-to-5.4.16-20160225.patch.gz;name=rpm-patch \ |
| 55 | http://downloads.yoctoproject.org/releases/rpm5/syck-5.4.15-to-5.4.16-20160225.patch.gz;name=syck-patch \ |
| 56 | http://downloads.yoctoproject.org/releases/rpm5/beecrypt-5.4.15-to-5.4.16-20160225.patch.gz;name=beecrypt-patch \ |
| 57 | http://downloads.yoctoproject.org/releases/rpm5/lua-5.4.15-to-5.4.16-20160225.patch.gz;name=lua-patch \ |
| 58 | file://perfile_rpmdeps.sh \ |
| 59 | file://pythondeps.sh \ |
| 60 | " |
| 61 | |
| 62 | SRC_URI[srpm.md5sum] = "d53782842ac11b3100a43fb2958c9bc0" |
| 63 | SRC_URI[srpm.sha256sum] = "d4ae5e9ed5df8ab9931b660f491418d20ab5c4d72eb17ed9055b80b71ef6c4ee" |
| 64 | |
| 65 | SRC_URI[rpm-patch.md5sum] = "8b7deb1c9574d3d47ed8ba8c690fd8bf" |
| 66 | SRC_URI[rpm-patch.sha256sum] = "1c1983d001b04eaa23eb2c8d9598b9d0899acb0a89f54a2d4c4e974086fd17a5" |
| 67 | |
| 68 | SRC_URI[syck-patch.md5sum] = "f31d7a32105a364688354419ec3559e4" |
| 69 | SRC_URI[syck-patch.sha256sum] = "4dd1d04489206d8b5d1970f2a8d143a002f2895cefbe15d73459785096545e8a" |
| 70 | |
| 71 | SRC_URI[beecrypt-patch.md5sum] = "9e71ee3ccb0a52985a071dd250279132" |
| 72 | SRC_URI[beecrypt-patch.sha256sum] ="df7c0708a7fab9bdf6d46194519b42e736f99cb0599dcc1c3c1bf1b228705cde" |
| 73 | |
| 74 | SRC_URI[lua-patch.md5sum] = "ca10d03d83b1fc1c31a0b50819534cd7" |
| 75 | SRC_URI[lua-patch.sha256sum] = "6bde435cc827a7d4b2520e8f3e1c9bd2ca74375de0a4402aa99ef4d48eab9a7e" |
| 76 | |
| 77 | # Bug fixes |
| 78 | SRC_URI += " \ |
| 79 | file://header-include-fix.patch \ |
| 80 | file://rpm-libsql-fix.patch \ |
| 81 | file://rpm-platform.patch \ |
| 82 | file://rpm-platform2.patch \ |
| 83 | file://rpm-tools-mtree-LDFLAGS.patch \ |
| 84 | file://rpm-canonarch.patch \ |
| 85 | file://rpm-no-loopmsg.patch \ |
| 86 | file://rpm-resolvedep.patch \ |
| 87 | file://rpm-packageorigin.patch \ |
| 88 | file://uclibc-support.patch \ |
| 89 | file://rpmatch.patch \ |
| 90 | file://makefile-am-exec-hook.patch \ |
| 91 | file://python-rpm-rpmsense.patch \ |
| 92 | file://debugedit-segv.patch \ |
| 93 | file://debugedit-valid-file-to-fix-segment-fault.patch \ |
| 94 | file://rpm-platform-file-fix.patch \ |
| 95 | file://rpm-lsb-compatibility.patch \ |
| 96 | file://rpm-tag-generate-endian-conversion-fix.patch \ |
| 97 | file://rpm-hardlink-segfault-fix.patch \ |
| 98 | file://rpm-payload-use-hashed-inode.patch \ |
| 99 | file://rpm-fix-logio-cp.patch \ |
| 100 | file://0001-using-poptParseArgvString-to-parse-the-_gpg_check_pa.patch \ |
| 101 | file://rpm-opendb-before-verifyscript-to-avoid-null-point.patch \ |
| 102 | file://0001-define-EM_AARCH64.patch \ |
| 103 | file://rpm-rpmfc.c-fix-for-N32-MIPS64.patch \ |
| 104 | file://rpm-lib-transaction.c-fix-file-conflicts-for-mips64-N32.patch \ |
| 105 | file://rpm-mongodb-sasl.patch \ |
| 106 | file://rpm-fix-parseEmbedded.patch \ |
| 107 | file://rpm-rpmio-headers.patch \ |
| 108 | file://rpm-python-restore-origin.patch \ |
| 109 | file://rpm-keccak-sse-intrin.patch \ |
| 110 | file://rpm-atomic-ops.patch \ |
| 111 | file://rpm-gnu-atomic.patch \ |
| 112 | file://rpm-tagname-type.patch \ |
| 113 | file://rpm-python-tagname.patch \ |
| 114 | file://rpm-python-AddErase.patch \ |
| 115 | file://rpm-rpmpgp-popt.patch \ |
| 116 | file://rpm-fix-lua-tests-compilation-failure.patch \ |
| 117 | file://rpmqv.c-check-_gpg_passphrase-before-ask-for-input.patch \ |
| 118 | file://0001-Disable-__sync_add_and_fetch_8-on-nios2.patch \ |
| 119 | " |
| 120 | |
| 121 | # OE specific changes |
| 122 | SRC_URI += " \ |
| 123 | file://rpm-log-auto-rm.patch \ |
| 124 | file://rpm-db-reduce.patch \ |
| 125 | file://rpm-autogen.patch \ |
| 126 | file://rpm-showrc.patch \ |
| 127 | file://rpm-fileclass.patch \ |
| 128 | file://rpm-scriptletexechelper.patch \ |
| 129 | file://rpmdeps-oecore.patch \ |
| 130 | file://rpm-no-perl-urpm.patch \ |
| 131 | file://rpm-macros.patch \ |
| 132 | file://rpm-lua.patch \ |
| 133 | file://rpm-ossp-uuid.patch \ |
| 134 | file://rpm-uuid-include.patch \ |
| 135 | file://rpm-pkgconfigdeps.patch \ |
| 136 | file://no-ldflags-in-pkgconfig.patch \ |
| 137 | file://dbconvert.patch \ |
| 138 | file://rpm-db_buffer_small.patch \ |
| 139 | file://rpm-py-init.patch \ |
| 140 | file://rpm-reloc-macros.patch \ |
| 141 | file://rpm-db5-or-db6.patch \ |
| 142 | file://rpm-db60.patch \ |
| 143 | file://rpmqv_cc_b_gone.patch \ |
| 144 | file://rpm-realpath.patch \ |
| 145 | file://rpm-check-rootpath-reasonableness.patch \ |
| 146 | file://rpm-macros.in-disable-external-key-server.patch \ |
| 147 | file://configure.ac-check-for-both-gpg2-and-gpg.patch \ |
| 148 | file://rpm-disable-auto-stack-protector.patch \ |
| 149 | file://popt-disable-auto-stack-protector.patch \ |
| 150 | file://rpm-syck-fix-gram.patch \ |
| 151 | file://rpm-rpmdb-grammar.patch \ |
| 152 | file://rpm-disable-blaketest.patch \ |
| 153 | file://rpm-autogen-force.patch \ |
| 154 | file://rpmdb-more-verbose-error-logging-in-rpmTempFile.patch \ |
| 155 | " |
| 156 | |
| 157 | SRC_URI_append_libc-musl = "\ |
| 158 | file://0001-rpm-Fix-build-on-musl.patch \ |
| 159 | " |
| 160 | # Uncomment the following line to enable platform score debugging |
| 161 | # This is useful when identifying issues with Smart being unable |
| 162 | # to process certain package feeds. |
| 163 | #SRC_URI += "file://rpm-debug-platform.patch" |
| 164 | |
| 165 | UPSTREAM_CHECK_REGEX = "rpm-(?P<pver>(\d+[\.\-_]*)+)-.*$" |
| 166 | |
| 167 | inherit autotools gettext |
| 168 | |
| 169 | acpaths = "-I ${S}/db/dist/aclocal -I ${S}/db/dist/aclocal_java" |
| 170 | |
| 171 | # The local distribution macro directory |
| 172 | distromacrodir = "${libdir}/rpm/poky" |
| 173 | |
| 174 | # Specify the default rpm macros in terms of adjustable variables |
| 175 | rpm_macros = "%{_usrlibrpm}/macros:%{_usrlibrpm}/${DISTRO}/macros:%{_usrlibrpm}/${DISTRO}/%{_target}/macros:%{_etcrpm}/macros.*:%{_etcrpm}/macros:%{_etcrpm}/%{_target}/macros:~/.oerpmmacros" |
| 176 | rpm_macros_class-native = "%{_usrlibrpm}/macros:%{_usrlibrpm}/${DISTRO}/macros:%{_usrlibrpm}/${DISTRO}/%{_target}/macros:~/.oerpmmacros" |
| 177 | rpm_macros_class-nativesdk = "%{_usrlibrpm}/macros:%{_usrlibrpm}/${DISTRO}/macros:%{_usrlibrpm}/${DISTRO}/%{_target}/macros:~/.oerpmmacros" |
| 178 | |
| 179 | # sqlite lua tcl augeas nss gcrypt neon xz xar keyutils perl selinux |
| 180 | |
| 181 | # Set the digest algorithm used for verifying file integrity |
| 182 | # If this value changes, and two different packages have different values |
| 183 | # the "same file" validation (two packages have a non-conflict file) |
| 184 | # will fail. This may lead to upgrade problems. You should treat this |
| 185 | # value as a distribution wide setting, and only change it when you intend |
| 186 | # a full system upgrade! |
| 187 | # |
| 188 | # Defined file digest algorithm values (note: not all are available!): |
| 189 | # 1 MD5 (legacy RPM default) |
| 190 | # 2 SHA1 |
| 191 | # 3 RIPEMD-160 |
| 192 | # 5 MD2 |
| 193 | # 6 TIGER-192 |
| 194 | # 8 SHA256 |
| 195 | # 9 SHA384 |
| 196 | # 10 SHA512 |
| 197 | # 11 SHA224 |
| 198 | # 104 MD4 |
| 199 | # 105 RIPEMD-128 |
| 200 | # 106 CRC-32 |
| 201 | # 107 ADLER-32 |
| 202 | # 108 CRC-64 (ECMA-182 polynomial, untested uint64_t problems) |
| 203 | # 109 Jenkins lookup3.c hashlittle() |
| 204 | # 111 RIPEMD-256 |
| 205 | # 112 RIPEMD-320 |
| 206 | # 188 BLAKE2B |
| 207 | # 189 BLAKE2BP |
| 208 | # 190 BLAKE2S |
| 209 | # 191 BLAKE2SP |
| 210 | RPM_FILE_DIGEST_ALGO ?= "1" |
| 211 | |
| 212 | # All packages build with RPM5 contain a non-repudiable signature. |
| 213 | # The purpose of this signature is not to show authenticity of a package, |
| 214 | # but instead act as a secondary package wide validation that shows it |
| 215 | # wasn't damaged by accident in transport. (When later you sign the package, |
| 216 | # this signature may or may not be replaced as there are three signature |
| 217 | # slots, one for DSA/RSA, one for ECSDA, and one reserved.) |
| 218 | # |
| 219 | # There is a known issue w/ RSA signatures that if they start with an 0x00 |
| 220 | # the signing and validation may fail. |
| 221 | # |
| 222 | # The following is the list of choices for the non-rpudiable signature |
| 223 | # (note: not all of these are implemented): |
| 224 | # DSA (default) |
| 225 | # RSA (implies SHA1) |
| 226 | # ECDSA (implies SHA256) |
| 227 | # DSA/SHA1 |
| 228 | # DSA/SHA224 |
| 229 | # DSA/SHA256 |
| 230 | # DSA/SHA384 |
| 231 | # DSA/SHA512 |
| 232 | # RSA/SHA1 |
| 233 | # RSA/SHA224 |
| 234 | # RSA/SHA256 |
| 235 | # RSA/SHA384 |
| 236 | # RSA/SHA512 |
| 237 | # ECDSA/SHA224 (using NIST P-224) |
| 238 | # ECDSA/SHA256 (using NIST P-256) |
| 239 | # ECDSA/SHA384 (using NIST P-384) |
| 240 | # ECDSA/SHA512 (using NIST P-521) |
| 241 | RPM_SELF_SIGN_ALGO ?= "DSA" |
| 242 | |
| 243 | # Note: perl and sqlite w/o db specified does not currently work. |
| 244 | # tcl, augeas, nss, gcrypt, xar and keyutils support is untested. |
| 245 | PACKAGECONFIG ??= "db bzip2 zlib popt openssl libelf python" |
| 246 | |
| 247 | # Note: switching to internal popt may not work, as it will generate |
| 248 | # a shared library which will intentionally not be packaged. |
| 249 | # |
| 250 | # If you intend to use the internal version, additional work may be required. |
| 251 | PACKAGECONFIG[popt] = "--with-popt=external,--with-popt=internal,popt," |
| 252 | |
| 253 | PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2," |
| 254 | PACKAGECONFIG[xz] = "--with-xz,--without-xz,xz," |
| 255 | PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib," |
| 256 | PACKAGECONFIG[xar] = "--with-xar,--without-xar,xar," |
| 257 | |
| 258 | WITH_PYTHON = " --with-python=${PYTHON_BASEVERSION} \ |
| 259 | --with-python-inc-dir=${STAGING_INCDIR}/python${PYTHON_BASEVERSION} \ |
| 260 | --with-python-lib-dir=${libdir}/python${PYTHON_BASEVERSION}/site-packages \ |
| 261 | --without-pythonembed" |
| 262 | PACKAGECONFIG[python] = "${WITH_PYTHON},--without-python,python," |
| 263 | |
| 264 | # Perl modules are not built, but they could be enabled fairly easily |
| 265 | # the perl module creation and installation would need to be patched. |
| 266 | # (currently has host perl contamination issues) |
| 267 | WITH_PERL = "--with-perl --without-perlembed --without-perl-urpm" |
| 268 | WITHOUT_PERL = "--without-perl --without-perl-urpm" |
| 269 | PACKAGECONFIG[perl] = "${WITH_PERL},${WITHOUT_PERL},perl," |
| 270 | |
| 271 | # The --with-dbsql will only tell RPM to check for support, db |
| 272 | # may or may not be built w/ the dbsql support. |
| 273 | WITH_DB = "--with-db --with-dbsql --without-db-tools-integrated" |
| 274 | PACKAGECONFIG[db] = "${WITH_DB},--without-db,db," |
| 275 | |
| 276 | PACKAGECONFIG[sqlite] = "--with-sqlite,--without-sqlite,sqlite3," |
| 277 | |
| 278 | # This switch simply disables external beecrypt, RPM5 always uses beecrypt |
| 279 | # for base64 processing and various digest algorithms. |
| 280 | # Beecrypt is only the preferred crypto engine if it's the only engine enabled. |
| 281 | PACKAGECONFIG[beecrypt] = "--with-beecrypt=external,--with-beecrypt=internal,beecrypt," |
| 282 | |
| 283 | # --with-usecrypto= setting defined the item as the preferred system |
| 284 | # crypto engine, which will take priority over the included beecrypt |
| 285 | PACKAGECONFIG[openssl] = "--with-openssl --with-usecrypto=openssl,--without-openssl,openssl," |
| 286 | PACKAGECONFIG[nss] = "--with-nss --with-usecrypto=nss,--without-nss,nss," |
| 287 | PACKAGECONFIG[gcrypt] = "--with-gcrypt --with-usecrypto=gcrypt,--without-gcrypt,gcrypt," |
| 288 | |
| 289 | PACKAGECONFIG[keyutils] = "--with-keyutils,--without-keyutils,keyutils," |
| 290 | PACKAGECONFIG[libelf] = "--with-libelf,--without-libelf,elfutils," |
| 291 | |
| 292 | WITH_SELINUX = "--with-selinux --with-sepol --with-semanage" |
| 293 | WITHOUT_SELINUX = "--without-selinux --without-sepol --without-semanage" |
| 294 | PACKAGECONFIG[selinux] = "${WITH_SELINUX},${WITHOUT_SELINUX},libselinux," |
| 295 | |
| 296 | WITH_NEON = "--with-neon --with-libproxy --with-expat --without-gssapi" |
| 297 | WITHOUT_NEON = "--without-neon --without-libproxy --without-expat --without-gssapi" |
| 298 | PACKAGECONFIG[neon] = "${WITH_NEON},${WITHOUT_NEON},neon expat," |
| 299 | |
| 300 | PACKAGECONFIG[lua] = "--with-lua,--without-lua,expat," |
| 301 | PACKAGECONFIG[tcl] = "--with-tcl,--without-tcl,tcl," |
| 302 | |
| 303 | PACKAGECONFIG[augeas] = "--with-augeas,--without-augeas,augeas," |
| 304 | |
| 305 | EXTRA_OECONF += "--verbose \ |
| 306 | --sysconfdir=${sysconfdir} \ |
| 307 | --with-file \ |
| 308 | --with-path-magic=%{_usrlibrpm}/../../share/misc/magic.mgc \ |
| 309 | --with-syck=internal \ |
| 310 | --without-readline \ |
| 311 | --without-libtasn1 \ |
| 312 | --without-pakchois \ |
| 313 | --without-gnutls \ |
| 314 | --with-pcre \ |
| 315 | --enable-utf8 \ |
| 316 | --with-uuid \ |
| 317 | --with-attr \ |
| 318 | --with-acl \ |
| 319 | --with-pthreads \ |
| 320 | --without-cudf \ |
| 321 | --without-ficl \ |
| 322 | --without-aterm \ |
| 323 | --without-nix \ |
| 324 | --without-bash \ |
| 325 | --without-rc \ |
| 326 | --without-js \ |
| 327 | --without-gpsee \ |
| 328 | --without-ruby \ |
| 329 | --without-squirrel \ |
| 330 | --without-sasl2 \ |
Andreas Oberritter | 85eebc3 | 2016-04-25 09:25:33 +0200 | [diff] [blame] | 331 | --without-tomcrypt \ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 332 | --with-build-extlibdep \ |
| 333 | --with-build-maxextlibdep \ |
| 334 | --without-valgrind \ |
| 335 | --disable-openmp \ |
| 336 | --enable-build-pic \ |
| 337 | --enable-build-versionscript \ |
| 338 | --enable-build-warnings \ |
| 339 | --enable-build-debug \ |
| 340 | --enable-maintainer-mode \ |
| 341 | --with-path-macros=${rpm_macros} \ |
| 342 | --with-path-lib=${libdir}/rpm \ |
| 343 | --with-bugreport=http://bugzilla.yoctoproject.org \ |
| 344 | --program-prefix= \ |
| 345 | YACC=byacc" |
| 346 | |
| 347 | CFLAGS_append = " -DRPM_VENDOR_WINDRIVER -DRPM_VENDOR_POKY -DRPM_VENDOR_OE" |
| 348 | |
| 349 | LDFLAGS_append_libc-uclibc = "-lrt -lpthread" |
| 350 | |
| 351 | PACKAGES = "${PN}-dbg ${PN} ${PN}-doc ${PN}-libs ${PN}-dev ${PN}-staticdev ${PN}-common ${PN}-build python-rpm perl-module-rpm ${PN}-locale" |
| 352 | |
| 353 | SOLIBS = "5.4.so" |
| 354 | |
| 355 | # Based on %files section in the rpm.spec |
| 356 | |
| 357 | FILES_${PN} = "${bindir}/rpm \ |
| 358 | ${bindir}/rpmconstant \ |
| 359 | ${libdir}/rpm/rpm.* \ |
| 360 | ${libdir}/rpm/tgpg \ |
| 361 | ${libdir}/rpm/macros \ |
| 362 | ${libdir}/rpm/rpmpopt \ |
| 363 | ${libdir}/rpm/rpm2cpio \ |
| 364 | ${libdir}/rpm/vcheck \ |
| 365 | ${libdir}/rpm/helpers \ |
| 366 | ${libdir}/rpm/qf \ |
| 367 | ${libdir}/rpm/cpuinfo.yaml \ |
| 368 | ${libdir}/rpm/bin/mtree \ |
| 369 | ${libdir}/rpm/bin/rpmkey \ |
| 370 | ${libdir}/rpm/bin/rpmrepo \ |
| 371 | ${libdir}/rpm/bin/rpmrepo.real \ |
| 372 | ${libdir}/rpm/bin/rpmspecdump \ |
| 373 | ${libdir}/rpm/bin/rpmspecdump.real \ |
| 374 | ${libdir}/rpm/bin/wget \ |
| 375 | ${localstatedir}/cache \ |
| 376 | ${localstatedir}/cache/rpm \ |
| 377 | ${localstatedir}/cache/wdj \ |
| 378 | ${localstatedir}/lib \ |
| 379 | ${localstatedir}/lib/rpm \ |
| 380 | ${localstatedir}/lib/wdj \ |
| 381 | ${bindir}/rpm.real \ |
| 382 | ${bindir}/rpmconstant.real \ |
| 383 | ${bindir}/rpm2cpio.real \ |
| 384 | " |
| 385 | |
| 386 | FILES_${PN}-common = "${bindir}/rpm2cpio \ |
| 387 | ${bindir}/gendiff \ |
| 388 | ${sysconfdir}/rpm \ |
| 389 | ${localstatedir}/spool/repackage \ |
| 390 | " |
| 391 | |
| 392 | FILES_${PN}-libs = "${libdir}/librpm-*.so \ |
| 393 | ${libdir}/librpmconstant-*.so \ |
| 394 | ${libdir}/librpmdb-*.so \ |
| 395 | ${libdir}/librpmio-*.so \ |
| 396 | ${libdir}/librpmmisc-*.so \ |
| 397 | ${libdir}/librpmbuild-*.so \ |
| 398 | " |
| 399 | |
| 400 | FILES_${PN}-build = "${prefix}/src/rpm \ |
| 401 | ${bindir}/rpmbuild \ |
| 402 | ${bindir}/rpmbuild.real \ |
| 403 | ${libdir}/rpm/brp-* \ |
| 404 | ${libdir}/rpm/check-files \ |
| 405 | ${libdir}/rpm/cross-build \ |
| 406 | ${libdir}/rpm/find-debuginfo.sh \ |
| 407 | ${libdir}/rpm/find-lang.sh \ |
| 408 | ${libdir}/rpm/find-prov.pl \ |
| 409 | ${libdir}/rpm/find-provides.perl \ |
| 410 | ${libdir}/rpm/find-req.pl \ |
| 411 | ${libdir}/rpm/find-requires.perl \ |
| 412 | ${libdir}/rpm/getpo.sh \ |
| 413 | ${libdir}/rpm/http.req \ |
| 414 | ${libdir}/rpm/javadeps.sh \ |
| 415 | ${libdir}/rpm/mono-find-provides \ |
| 416 | ${libdir}/rpm/mono-find-requires \ |
| 417 | ${libdir}/rpm/executabledeps.sh \ |
| 418 | ${libdir}/rpm/libtooldeps.sh \ |
| 419 | ${libdir}/rpm/osgideps.pl \ |
| 420 | ${libdir}/rpm/perldeps.pl \ |
| 421 | ${libdir}/rpm/perl.prov \ |
| 422 | ${libdir}/rpm/perl.req \ |
| 423 | ${libdir}/rpm/php.prov \ |
| 424 | ${libdir}/rpm/php.req \ |
| 425 | ${libdir}/rpm/pkgconfigdeps.sh \ |
| 426 | ${libdir}/rpm/pythondeps.sh \ |
| 427 | ${libdir}/rpm/bin/debugedit \ |
| 428 | ${libdir}/rpm/bin/debugedit.real \ |
| 429 | ${libdir}/rpm/bin/rpmcache \ |
| 430 | ${libdir}/rpm/bin/rpmcache.real \ |
| 431 | ${libdir}/rpm/bin/rpmcmp \ |
| 432 | ${libdir}/rpm/bin/rpmcmp.real \ |
| 433 | ${libdir}/rpm/bin/rpmdeps \ |
| 434 | ${libdir}/rpm/bin/rpmdeps.real \ |
| 435 | ${libdir}/rpm/bin/rpmdeps-oecore \ |
| 436 | ${libdir}/rpm/bin/rpmdeps-oecore.real \ |
| 437 | ${libdir}/rpm/bin/rpmdigest \ |
| 438 | ${libdir}/rpm/bin/rpmdigest.real \ |
| 439 | ${libdir}/rpm/bin/abi-compliance-checker.pl \ |
| 440 | ${libdir}/rpm/bin/api-sanity-autotest.pl \ |
| 441 | ${libdir}/rpm/bin/chroot \ |
| 442 | ${libdir}/rpm/bin/cp \ |
| 443 | ${libdir}/rpm/bin/dbsql \ |
| 444 | ${libdir}/rpm/bin/find \ |
| 445 | ${libdir}/rpm/bin/install-sh \ |
| 446 | ${libdir}/rpm/bin/lua \ |
| 447 | ${libdir}/rpm/bin/luac \ |
| 448 | ${libdir}/rpm/bin/mkinstalldirs \ |
| 449 | ${libdir}/rpm/bin/rpmlua \ |
| 450 | ${libdir}/rpm/bin/rpmluac \ |
| 451 | ${libdir}/rpm/bin/sqlite3 \ |
| 452 | ${libdir}/rpm/macros.d/cmake \ |
| 453 | ${libdir}/rpm/macros.d/java \ |
| 454 | ${libdir}/rpm/macros.d/libtool \ |
| 455 | ${libdir}/rpm/macros.d/mandriva \ |
| 456 | ${libdir}/rpm/macros.d/mono \ |
| 457 | ${libdir}/rpm/macros.d/perl \ |
| 458 | ${libdir}/rpm/macros.d/php \ |
| 459 | ${libdir}/rpm/macros.d/pkgconfig \ |
| 460 | ${libdir}/rpm/macros.d/python \ |
| 461 | ${libdir}/rpm/macros.d/ruby \ |
| 462 | ${libdir}/rpm/macros.d/selinux \ |
| 463 | ${libdir}/rpm/macros.d/tcl \ |
| 464 | ${libdir}/rpm/macros.rpmbuild \ |
| 465 | ${libdir}/rpm/u_pkg.sh \ |
| 466 | ${libdir}/rpm/vpkg-provides.sh \ |
| 467 | ${libdir}/rpm/vpkg-provides2.sh \ |
| 468 | ${libdir}/rpm/perfile_rpmdeps.sh \ |
| 469 | ${distromacrodir} \ |
| 470 | " |
| 471 | RDEPENDS_${PN} = "base-files run-postinsts" |
| 472 | RDEPENDS_${PN}_class-native = "" |
| 473 | RDEPENDS_${PN}_class-nativesdk = "" |
| 474 | RDEPENDS_${PN}-build = "file bash perl" |
| 475 | |
| 476 | RDEPENDS_python-rpm = "${PN} python" |
| 477 | |
| 478 | FILES_python-rpm = "${libdir}/python*/site-packages/rpm" |
| 479 | PROVIDES += "python-rpm" |
| 480 | |
| 481 | FILES_perl-module-rpm = "${libdir}/perl/*/* \ |
| 482 | " |
| 483 | |
| 484 | RDEPENDS_${PN}-dev += "bash" |
| 485 | |
| 486 | FILES_${PN}-dev = "${includedir}/rpm \ |
| 487 | ${libdir}/librpm.la \ |
| 488 | ${libdir}/librpm.so \ |
| 489 | ${libdir}/librpmconstant.la \ |
| 490 | ${libdir}/librpmconstant.so \ |
| 491 | ${libdir}/librpmdb.la \ |
| 492 | ${libdir}/librpmdb.so \ |
| 493 | ${libdir}/librpmio.la \ |
| 494 | ${libdir}/librpmio.so \ |
| 495 | ${libdir}/librpmmisc.la \ |
| 496 | ${libdir}/librpmmisc.so \ |
| 497 | ${libdir}/librpmbuild.la \ |
| 498 | ${libdir}/librpmbuild.so \ |
| 499 | ${libdir}/rpm/lib/liblua.la \ |
| 500 | ${libdir}/pkgconfig/rpm.pc \ |
| 501 | ${libdir}/rpm/rpmdb_loadcvt \ |
| 502 | ${libdir}/rpm/include \ |
| 503 | " |
| 504 | |
| 505 | FILES_${PN}-staticdev = " \ |
| 506 | ${libdir}/librpm.a \ |
| 507 | ${libdir}/librpmconstant.a \ |
| 508 | ${libdir}/librpmdb.a \ |
| 509 | ${libdir}/librpmio.a \ |
| 510 | ${libdir}/librpmmisc.a \ |
| 511 | ${libdir}/librpmbuild.a \ |
| 512 | ${libdir}/rpm/lib/liblua.a \ |
| 513 | ${libdir}/python*/site-packages/rpm/*.a \ |
| 514 | " |
| 515 | |
| 516 | do_configure() { |
| 517 | # Disable tests! |
| 518 | echo "all:" > ${S}/tests/Makefile.am |
| 519 | sed -e 's/@__MKDIR_P@/%{__mkdir} -p/' -i ${S}/macros/macros.in |
| 520 | |
| 521 | ( cd ${S}; ${S}/autogen.sh ) |
| 522 | |
| 523 | # NASTY hack to make sure configure files the right pkg-config file... |
| 524 | sed -e 's/pkg-config --exists uuid/pkg-config --exists ossp-uuid/g' \ |
| 525 | -e 's/pkg-config uuid/pkg-config ossp-uuid/g' -i ${S}/configure |
| 526 | |
| 527 | ( cd ${S}/syck ; set +e ; rm -- -l* ; make distclean ) || : |
| 528 | |
| 529 | export varprefix=${localstatedir} |
| 530 | oe_runconf |
| 531 | } |
| 532 | |
| 533 | do_install_append() { |
| 534 | # Configure -distribution wide- package crypto settings |
| 535 | # If these change, effectively all packages have to be upgraded! |
| 536 | sed -i -e 's,%_build_file_digest_algo.*,%_build_sign ${RPM_FILE_DIGEST_ALGO},' ${D}/${libdir}/rpm/macros.rpmbuild |
| 537 | sed -i -e 's,%_build_sign.*,%_build_sign ${RPM_SELF_SIGN_ALGO},' ${D}/${libdir}/rpm/macros.rpmbuild |
| 538 | |
| 539 | sed -i -e 's,%__scriptlet_requires,#%%__scriptlet_requires,' ${D}/${libdir}/rpm/macros |
| 540 | sed -i -e 's,%__perl_provides,#%%__perl_provides,' ${D}/${libdir}/rpm/macros ${D}/${libdir}/rpm/macros.d/* |
| 541 | sed -i -e 's,%__perl_requires,#%%__perl_requires,' ${D}/${libdir}/rpm/macros ${D}/${libdir}/rpm/macros.d/* |
| 542 | sed -i -e 's,%_repackage_all_erasures[^_].*,%_repackage_all_erasures 0,' ${D}/${libdir}/rpm/macros |
| 543 | sed -i -e 's,^#%_openall_before_chroot.*,%_openall_before_chroot\t1,' ${D}/${libdir}/rpm/macros |
| 544 | |
| 545 | # Enable MIPS64 N32 transactions. (This is a no-op on non-MIPS targets.) |
| 546 | sed -i -e 's,%_transaction_color[^_].*,%_transaction_color 7,' ${D}/${libdir}/rpm/macros |
| 547 | |
| 548 | # Enable Debian style arbitrary tags... |
| 549 | sed -i -e 's,%_arbitrary_tags[^_].*,%_arbitrary_tags %{_arbitrary_tags_debian},' ${D}/${libdir}/rpm/macros |
| 550 | |
| 551 | install -m 0755 ${WORKDIR}/pythondeps.sh ${D}/${libdir}/rpm/pythondeps.sh |
| 552 | install -m 0755 ${WORKDIR}/perfile_rpmdeps.sh ${D}/${libdir}/rpm/perfile_rpmdeps.sh |
| 553 | |
| 554 | # Remove unpackaged files (based on list in rpm.spec) |
| 555 | rm -f ${D}/${libdir}/rpm/{Specfile.pm,cpanflute,cpanflute2,rpmdiff,rpmdiff.cgi,sql.prov,sql.req,tcl.req,trpm} |
| 556 | |
| 557 | rm -f ${D}/${mandir}/man8/rpmcache.8* |
| 558 | rm -f ${D}/${mandir}/man8/rpmgraph.8* |
| 559 | rm -f ${D}/${mandir}/*/man8/rpmcache.8* |
| 560 | rm -f ${D}/${mandir}/*/man8/rpmgraph.8* |
| 561 | rm -rf ${D}/${mandir}/{fr,ko} |
| 562 | |
| 563 | rm -f ${D}/${includedir}/popt.h |
| 564 | rm -f ${D}/${libdir}/libpopt.* |
| 565 | rm -f ${D}/${libdir}/pkgconfig/popt.pc |
| 566 | rm -f ${D}/${datadir}/locale/*/LC_MESSAGES/popt.mo |
| 567 | rm -f ${D}/${mandir}/man3/popt.3 |
| 568 | |
| 569 | rm -f ${D}/${mandir}/man1/xar.1* |
| 570 | rm -f ${D}/${bindir}/xar |
| 571 | rm -rf ${D}/${includedir}/xar |
| 572 | rm -f ${D}/${libdir}/libxar* |
| 573 | |
| 574 | rm -f ${D}/${bindir}/lz* |
| 575 | rm -f ${D}/${bindir}/unlzma |
| 576 | rm -f ${D}/${bindir}/unxz |
| 577 | rm -f ${D}/${bindir}/xz* |
| 578 | rm -rf ${D}/${includedir}/lzma* |
| 579 | rm -f ${D}/${mandir}/man1/lz*.1 |
| 580 | rm -f ${D}/${libdir}/pkgconfig/liblzma* |
| 581 | |
| 582 | rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/*.a |
| 583 | rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/*.la |
| 584 | rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/rpm/*.a |
| 585 | rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/rpm/*.la |
| 586 | |
| 587 | #find ${D}/${libdir}/perl5 -type f -a \( -name perllocal.pod -o -name .packlist \ |
| 588 | # -o \( -name '*.bs' -a -empty \) \) -exec rm -f {} ';' |
| 589 | #find ${D}/${libdir}/perl5 -type d -depth -exec rmdir {} 2>/dev/null ';' |
| 590 | |
| 591 | rm -f ${D}/${libdir}/rpm/dbconvert.sh |
| 592 | |
| 593 | rm -f ${D}/${libdir}/rpm/libsqldb.* |
| 594 | |
| 595 | # We don't want, nor need the Mandriva multiarch items |
| 596 | rm -f ${D}/${bindir}/multiarch-dispatch |
| 597 | rm -f ${D}/${bindir}/multiarch-platform |
| 598 | rm -f ${D}/${libdir}/rpm/check-multiarch-files |
| 599 | rm -f ${D}/${libdir}/rpm/mkmultiarch |
| 600 | rm -f ${D}/${includedir}/multiarch-dispatch.h |
| 601 | |
| 602 | rm -f ${D}/${libdir}/rpm/gstreamer.sh |
| 603 | rm -f ${D}/${libdir}/rpm/gem_helper.rb |
| 604 | rm -f ${D}/${libdir}/rpm/rubygems.rb |
| 605 | rm -f ${D}/${libdir}/rpm/kmod-deps.sh |
| 606 | rm -f ${D}/${libdir}/rpm/pythoneggs.py |
| 607 | rm -f ${D}/${libdir}/rpm/macros.d/kernel |
| 608 | rm -f ${D}/${libdir}/rpm/macros.d/gstreamer |
| 609 | rm -f ${D}/${libdir}/rpm/bin/mgo |
| 610 | rm -f ${D}/${libdir}/rpm/bin/dbconvert |
| 611 | rm -f ${D}/${libdir}/rpm/bin/pom2spec |
| 612 | |
| 613 | rm -rf ${D}/var/lib/wdj ${D}/var/cache/wdj |
| 614 | rm -f ${D}/${libdir}/rpm/bin/api-sanity-checker.pl |
| 615 | |
| 616 | } |
| 617 | |
| 618 | do_install_append_class-target() { |
| 619 | # Create and install distribution specific macros |
| 620 | mkdir -p ${D}/${distromacrodir} |
| 621 | cat << EOF > ${D}/${distromacrodir}/macros |
| 622 | %_defaultdocdir ${docdir} |
| 623 | |
| 624 | %_prefix ${prefix} |
| 625 | %_exec_prefix ${exec_prefix} |
| 626 | %_datarootdir ${datadir} |
| 627 | %_bindir ${bindir} |
| 628 | %_sbindir ${sbindir} |
| 629 | %_libexecdir %{_libdir}/%{name} |
| 630 | %_datadir ${datadir} |
| 631 | %_sysconfdir ${sysconfdir} |
| 632 | %_sharedstatedir ${sharedstatedir} |
| 633 | %_localstatedir ${localstatedir} |
| 634 | %_lib lib |
| 635 | %_libdir %{_exec_prefix}/%{_lib} |
| 636 | %_includedir ${includedir} |
| 637 | %_oldincludedir ${oldincludedir} |
| 638 | %_infodir ${infodir} |
| 639 | %_mandir ${mandir} |
| 640 | %_localedir %{_libdir}/locale |
| 641 | EOF |
| 642 | |
| 643 | # Create and install multilib specific macros |
| 644 | ${@multilib_rpmmacros(d)} |
| 645 | } |
| 646 | |
| 647 | do_install_append_class-native () { |
| 648 | sed -i -e 's|^#!.*/usr/bin/python|#! /usr/bin/env nativepython|' ${D}/${libdir}/python2.7/site-packages/rpm/transaction.py |
| 649 | } |
| 650 | |
| 651 | do_install_append_class-nativesdk () { |
| 652 | sed -i -e 's|^#!.*/usr/bin/python|#! /usr/bin/env python|' ${D}/${libdir}/python2.7/site-packages/rpm/transaction.py |
| 653 | } |
| 654 | |
| 655 | def multilib_rpmmacros(d): |
| 656 | localdata = d.createCopy() |
| 657 | # We need to clear the TOOLCHAIN_OPTIONS (--sysroot) |
| 658 | localdata.delVar('TOOLCHAIN_OPTIONS') |
| 659 | |
| 660 | # Set 'localdata' values to be consistent with 'd' values. |
| 661 | localdata.setVar('distromacrodir', d.getVar('distromacrodir', True)) |
| 662 | localdata.setVar('WORKDIR', d.getVar('WORKDIR', True)) |
| 663 | |
| 664 | ret = gen_arch_macro(localdata) |
| 665 | |
| 666 | variants = d.getVar("MULTILIB_VARIANTS", True) or "" |
| 667 | for item in variants.split(): |
| 668 | # Load overrides from 'd' to avoid having to reset the value... |
| 669 | localdata = d.createCopy() |
| 670 | overrides = d.getVar("OVERRIDES", False) + ":virtclass-multilib-" + item |
| 671 | localdata.setVar("OVERRIDES", overrides) |
| 672 | localdata.setVar("MLPREFIX", item + "-") |
| 673 | bb.data.update_data(localdata) |
| 674 | ret += gen_arch_macro(localdata) |
| 675 | return ret |
| 676 | |
| 677 | def gen_arch_macro(d): |
| 678 | # Generate shell script to produce the file as part of do_install |
| 679 | val = "mkdir -p ${D}/${distromacrodir}/${TARGET_ARCH}-${TARGET_OS}\n" |
| 680 | val += "cat << EOF > ${D}/${distromacrodir}/${TARGET_ARCH}-${TARGET_OS}/macros\n" |
| 681 | val += "%_lib ${baselib}\n" |
| 682 | val += "%_libdir ${libdir}\n" |
| 683 | val += "%_localedir ${localedir}\n" |
| 684 | val += "\n" |
| 685 | val += "# Toolchain configuration\n" |
| 686 | val += "%TOOLCHAIN_OPTIONS %{nil}\n" |
| 687 | val += "%__ar ${@d.getVar('AR', True).replace('$','%')}\n" |
| 688 | val += "%__as ${@d.getVar('AS', True).replace('$','%')}\n" |
| 689 | val += "%__cc ${@d.getVar('CC', True).replace('$','%')}\n" |
| 690 | val += "%__cpp ${@d.getVar('CPP', True).replace('$','%')}\n" |
| 691 | val += "%__cxx ${@d.getVar('CXX', True).replace('$','%')}\n" |
| 692 | val += "%__ld ${@d.getVar('LD', True).replace('$','%')}\n" |
| 693 | val += "%__nm ${@d.getVar('NM', True).replace('$','%')}\n" |
| 694 | val += "%__objcopy ${@d.getVar('OBJCOPY', True).replace('$','%')}\n" |
| 695 | val += "%__objdump ${@d.getVar('OBJDUMP', True).replace('$','%')}\n" |
| 696 | val += "%__ranlib ${@d.getVar('RANLIB', True).replace('$','%')}\n" |
| 697 | val += "%__strip ${@d.getVar('STRIP', True).replace('$','%')}\n" |
| 698 | val += "EOF\n" |
| 699 | val += "\n" |
| 700 | return d.expand(val) |
| 701 | |
| 702 | |
| 703 | add_native_wrapper() { |
| 704 | create_wrapper ${D}/${bindir}/rpm \ |
| 705 | RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \ |
| 706 | RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \ |
| 707 | RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir', True), d.getVar('bindir', True))}/locale |
| 708 | |
| 709 | create_wrapper ${D}/${bindir}/rpm2cpio \ |
| 710 | RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \ |
| 711 | RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \ |
| 712 | RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir', True), d.getVar('bindir', True))}/locale |
| 713 | |
| 714 | create_wrapper ${D}/${bindir}/rpmbuild \ |
| 715 | RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \ |
| 716 | RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \ |
| 717 | RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir', True), d.getVar('bindir', True))}/locale |
| 718 | |
| 719 | create_wrapper ${D}/${bindir}/rpmconstant \ |
| 720 | RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \ |
| 721 | RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \ |
| 722 | RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir', True), d.getVar('bindir', True))}/locale |
| 723 | |
| 724 | for rpm_binary in ${D}/${libdir}/rpm/bin/rpm* ${D}/${libdir}/rpm/bin/debugedit; do |
| 725 | create_wrapper $rpm_binary \ |
| 726 | RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \ |
| 727 | RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \ |
| 728 | RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir', True), d.getVar('bindir', True))}/locale |
| 729 | done |
| 730 | } |
| 731 | |
| 732 | do_install_append_class-native() { |
| 733 | add_native_wrapper |
| 734 | } |
| 735 | |
| 736 | do_install_append_class-nativesdk() { |
| 737 | add_native_wrapper |
| 738 | } |
| 739 | |
| 740 | BBCLASSEXTEND = "native nativesdk" |