/[gentoo-alt]/trunk/prefix/app-arch/gzip/gzip-1.3.5-r8.ebuild
Gentoo

Contents of /trunk/prefix/app-arch/gzip/gzip-1.3.5-r8.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1166 - (show annotations) (download)
Sat Mar 25 22:08:50 2006 UTC (13 years, 2 months ago) by kito
File size: 2348 byte(s)
PREFIX->EPREFIX DEST->EDEST
1 # Copyright 1999-2005 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/app-arch/gzip/gzip-1.3.5-r8.ebuild,v 1.1 2005/07/02 13:44:07 vapier Exp $
4
5 EAPI="prefix"
6
7 inherit eutils flag-o-matic
8
9 DESCRIPTION="Standard GNU compressor"
10 HOMEPAGE="http://www.gnu.org/software/gzip/gzip.html"
11 SRC_URI="mirror://gentoo/${P}.tar.gz"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15 KEYWORDS="alpha amd64 arm hppa ia64 m68k mips ppc ~ppc-macos ppc64 s390 sh sparc x86"
16 IUSE="nls build static pic"
17
18 RDEPEND=""
19 DEPEND="${RDEPEND}
20 nls? ( sys-devel/gettext )"
21 PROVIDE="virtual/gzip"
22
23 src_unpack() {
24 unpack ${A}
25 cd "${S}"
26 epatch "${FILESDIR}"/${P}-debian.patch
27 epatch "${FILESDIR}"/${P}-znew-tempfile-2.patch
28 epatch "${FILESDIR}"/${P}-gunzip-dir.patch
29 epatch "${FILESDIR}"/${P}-asm-execstack.patch
30 epatch "${FILESDIR}"/${P}-gzip-perm.patch
31 epatch "${FILESDIR}"/${P}-infodir.patch
32 epatch "${FILESDIR}"/${P}-rsync.patch
33 epatch "${FILESDIR}"/${P}-zgrep-sed.patch
34 epatch "${FILESDIR}"/${P}-alpha.patch
35 epatch "${FILESDIR}"/${P}-huft-build-return-fix.patch
36 epatch "${FILESDIR}"/${P}-zgreppipe.patch
37 }
38
39 src_compile() {
40 use static && append-flags -static
41 # avoid text relocation in gzip
42 use pic && export DEFS="NO_ASM"
43 append-ldflags -L${EPREFIX}/lib -lz
44 econf --exec-prefix=${EPREFIX}/ $(use_enable nls) || die
45 emake || die
46 }
47
48 src_install() {
49 dodir /usr/bin /usr/share/man/man1
50 make prefix=${D}/usr \
51 exec_prefix=${D}/ \
52 mandir=${D}/usr/share/man \
53 infodir=${D}/usr/share/info \
54 install || die
55
56 cd ${D}/bin
57
58 for i in gzexe zforce zgrep zmore znew zcmp
59 do
60 sed -i -e "s:${D}::" ${i} || die
61 chmod 755 ${i}
62 done
63
64 # No need to waste space -- these guys should be links
65 # gzcat is equivilant to zcat, but historically zcat
66 # was a link to compress.
67 rm -f gunzip zcat zcmp zegrep zfgrep
68 dosym gzip /bin/gunzip
69 dosym gzip /bin/gzcat
70 dosym gzip /bin/zcat
71 dosym zdiff /bin/zcmp
72 dosym zgrep /bin/zegrep
73 dosym zgrep /bin/zfgrep
74
75 if ! use build
76 then
77 cd ${D}/usr/share/man/man1
78 rm -f gunzip.* zcmp.* zcat.*
79 ln -s gzip.1.gz gunzip.1.gz
80 ln -s zdiff.1.gz zcmp.1.gz
81 ln -s gzip.1.gz zcat.1.gz
82 ln -s gzip.1.gz gzcat.1.gz
83 cd ${S}
84 rm -rf ${D}/usr/man ${D}/usr/lib
85 dodoc ChangeLog NEWS README THANKS TODO
86 docinto txt
87 dodoc algorithm.doc gzip.doc
88 else
89 rm -rf ${D}/usr
90 fi
91 }

  ViewVC Help
Powered by ViewVC 1.1.20