summaryrefslogtreecommitdiff
blob: e534a3f9c7f2668488a001f0a147ba579d43a345 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Copyright 1999-2001 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# $Header: /var/cvsroot/gentoo-x86/net-dialup/minicom/minicom-1.83.1-r1.ebuild,v 1.2 2002/07/11 06:30:45 drobbins Exp $

A="${P}.src.tar.gz"
S=${WORKDIR}/${P}
DESCRIPTION="Serial Communication Program"
SRC_URI="http://www.clinet.fi/~walker/${A}"
HOMEPAGE="http://www.clinet.fi/~walker/minicom.html"

DEPEND=">=sys-libs/ncurses-5.2-r3"

src_unpack() {

    unpack ${A}
    cd ${S}/src
    cp Makefile Makefile.orig
    cat Makefile.orig | sed -e "s:^FLAGS\t=.*$:FLAGS\t= -Wall -D_POSIX -D_SYSV -D_SELECT -pipe # -I/usr/include/ncurses ${CFLAGS}:" |\
        sed -e "s:^LFLAGS\t=.*$:LFLAGS\t= -s ${CFLAGS}:" |\
        sed -e "s:^CC\t=.*$:CC\t= gcc:" |\
        sed -e "s:^LIBDIR\t=.*$:LIBDIR\t= /etc/minicom:" > Makefile
    cp dial.c dial.c.orig
    cat dial.c.orig | sed -e "s:<sys/time.h>:<time.h>:" > dial.c
    cp common.c common.c.orig
    cat common.c.orig |\
        sed -e "s:#include <stdarg.h>:#include <stdarg.h>\n#include <time.h>:" > common.c
    cp po/Makefile po/Makefile.orig
    cat po/Makefile.orig | sed -e 's:ko.mo::g' > po/Makefile
    
}

src_compile() {

    cd src 
    try make

}

src_install() {

    dobin src/minicom src/ascii-xfr src/runscript
    doman man/minicom.1 man/ascii-xfr.1 man/runscript.1
    dodoc doc/minicom.FAQ
    docinto scripts
    dodoc demos/*
    exeinto /usr/bin
    doexe src/xminicom
    insinto /etc/minicom
    doins ${FILESDIR}/minirc.dfl 

}