#!/bin/sh

name="statserial"
title="statserial"
package="statserial"
version="1.1"
build="1"
noarch="n"
build_info="Standard build."

info="Displays the status of serial port modem lines."
desc="The statserial utility displays a table of the signals on a
standard 9-pin or 25-pin serial port and indicates the status of
the handshaking lines. Statserial is useful for debugging serial
port and/or modem problems."
category="tools/diagnostic"
environment="console/text"
contact="$name@packages.packware.gnu.pl"
vendor="The Packware Project"
vendor_id="pw"

requires=""
obsoletes=""
conflicts=""

docs_source="COPYING,ChangeLog,README,phone_log"
docs_cwd=""

strip_bin="y"
reset_own="y"
reset_dir="y"
reset_fil="y"
delete_cat="y"

. /usr/src/tgz/lib/builder.defs

add_source ftp://sunsite.unc.edu/pub/Linux/system/serial/$name-$version.tar.gz

apply_patch statserial-config.patch 1
apply_patch statserial-dev.patch 1

replace_regexp $src1/Makefile "-O3" "-O2 \$(AM_CFLAGS)"

parent_package="$package"
write_info main

cd $src1

do_make

copy statserial $pkg_main/usr/bin
copy statserial.1 $pkg_main/usr/man/man1

make_docs

make_package main

clean_up
