All pastes #255287 Raw Edit

Miscellany

public text v1 · immutable
#255287 ·published 2006-11-22 20:28 UTC
rendered paste body
#
# Copyright (c) 2004-2005 rPath, Inc.
# This file is distributed under the terms of the MIT License.
# A copy is available at http://www.rpath.com/permanent/mit-license.html
#

class Grep(CPackageRecipe):
    if Use.bootstrap:
        clearBuildReqs()
        buildRequires = [ 'cross-gcc', 'glibc' ]
    elif Use.pcre:
        buildRequires = [ 'pcre:devel' ]

    name = "grep"
    version = "2.5.1"

    def setup(r):
        srpm = 'ftp://download.fedora.redhat.com/pub/fedora/linux/core/2/SRPMS/grep-2.5.1-26.src.rpm'

        # get new releases from http://ftp.gnu.org/pub/gnu/grep/ -- currently lost
        r.addArchive('grep-%(version)s.tar.bz2', rpm=srpm)

        r.addPatch("grep-2.5.1-fgrep.patch", rpm=srpm)
        r.addPatch("grep-2.5-i18n.patch", rpm=srpm)
        r.addPatch("grep-2.5.1-oi.patch", rpm=srpm)
        r.addPatch("grep-2.5.1-manpage.patch", rpm=srpm)
        r.addPatch("grep-2.5.1-gofast.patch", rpm=srpm)
        r.addPatch("grep-2.5.1-bracket.patch", rpm=srpm)

        if not Use.bootstrap and Use.pcre:
            r.macros.cflags += '-I%(sysroot)s/usr/include/pcre'
            config = " --without-included-regex"
        else:
            config = ' --disable-perl-regexp --with-included-regex'

        r.Configure(config)
        r.Make()
        r.MakePathsInstall()
        r.Move('%(prefix)s/bin/*', '/bin/')
        r.Remove('%(prefix)s/bin', recursive=1)
        r.AutoDoc('ABOUT-NLS')