summaryrefslogtreecommitdiff
path: root/net/netams/scripts/configure
blob: b7e5ae9402d04def7a7d6268cee6249159660ee2 (plain) (blame)
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
#! ${SH}
#
# $FreeBSD$

PATH_TO_CONFIG="${PREFIX}/etc/natams.conf"
PATH_TO_LOG="/var/log/netams.log"
FLAGS="-g"

cd ${WRKSRC}
    rm -f Makefile.new
    cp Makefile Makefile.orig
    grep -v "^LIB" Makefile > Makefile.new || exit 1
    grep -v "^DEFINE" Makefile.new  > Makefile || exit 1
    grep -v "^PATH_TO_CONFIG" Makefile > Makefile.new || exit 1
    grep -v "^PATH_TO_LOG" Makefile.new > Makefile || exit 1
    grep -v "^FLAGS" Makefile > Makefile.new || exit 1
    grep -v "^CFLAGS" Makefile.new > Makefile || exit 1
    echo "PATH_TO_CONFIG=${PATH_TO_CONFIG}" > Makefile.new || exit 1
    echo "PATH_TO_LOG=${PATH_TO_LOG}" >> Makefile.new || exit 1
    echo "LIB=${LIB}" >> Makefile.new || exit 1
    echo "DEFINE=${DEFINE}" >> Makefile.new || exit 1
    echo "FLAGS=${FLAGS}" >> Makefile.new || exit 1
    echo 'CFLAGS  = $(FLAGS) -I$(INCLUDE) $(DEFINE)' >> Makefile.new || exit 1
    cat Makefile >> Makefile.new || exit 1
    mv -f Makefile.new Makefile || exit 1