/[gentoo-x86]/app-text/an/an-0.95.3.2.ebuild
Gentoo

Contents of /app-text/an/an-0.95.3.2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations) (download)
Sun Sep 30 18:12:43 2012 UTC (2 years, 2 months ago) by armin76
Branch: MAIN
Changes since 1.6: +2 -2 lines
Drop alpha keywords

(Portage version: 2.1.11.16/cvs/Linux ia64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/app-text/an/an-0.95.3.2.ebuild,v 1.6 2012/06/09 14:39:02 jer Exp $
4
5 EAPI="2"
6
7 inherit eutils toolchain-funcs versionator
8
9 DESCRIPTION="Very fast anagram generator with dictionary lookup"
10 HOMEPAGE="http://packages.debian.org/unstable/games/an"
11
12 MY_PV="$(get_version_component_range 1-2)"
13 DEB_REV="$(get_version_component_range 3-4)"
14 SRC_URI="
15 mirror://debian/pool/main/a/${PN}/${PN}_${MY_PV}.orig.tar.gz
16 mirror://debian/pool/main/a/${PN}/${PN}_${MY_PV}-${DEB_REV}.diff.gz
17 "
18
19 LICENSE="GPL-2 LGPL-2"
20 SLOT="0"
21 KEYWORDS="amd64 hppa ppc ppc64 x86"
22 IUSE=""
23
24 RDEPEND="sys-apps/miscfiles[-minimal]"
25
26 S="${WORKDIR}/${PN}-${MY_PV}"
27
28 src_prepare() {
29 MY_PL="$(replace_version_separator 2 -)"
30 epatch "${WORKDIR}"/${PN}_${MY_PV}-${DEB_REV}.diff
31
32 # sys-apps/miscfiles doesn't have /usr/dict/words:
33 sed -i README \
34 -e 's:/usr/dict/words:/usr/share/dict/words:' \
35 || die "sed README failed"
36 sed -i Makefile \
37 -e 's|^CC=gcc|#CC=gcc|g' \
38 -e 's|^CFLAGS=-O2|CFLAGS := $(CFLAGS)|g' \
39 -e 's|$(CC) $(CFLAGS)|$(CC) $(CFLAGS) $(LDFLAGS)|g' \
40 -e 's|&& make|\&\& $(MAKE)|g' \
41 || die "sed Makefile failed"
42 }
43
44 src_compile() {
45 tc-export CC
46 emake LDFLAGS="${LDFLAGS}" || die "emake failed"
47 }
48
49 src_install() {
50 dobin ${PN} || die
51 doman ${PN}.6 || die
52 dodoc \
53 debian/changelog \
54 debian/README.Debian \
55 DICTIONARY \
56 EXAMPLE.ANAGRAMS \
57 HINTS \
58 README \
59 TODO || die
60 }
61
62 pkg_postinst() {
63 einfo "Helpful note from an's author:"
64 einfo " If you do not have a dictionary you can obtain one from the"
65 einfo " following site: ftp://ftp.funet.fi/pub/doc/dictionaries/"
66 einfo " You will find a selection of dictionaries in many different"
67 einfo " languages here."
68 }

  ViewVC Help
Powered by ViewVC 1.1.20