-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure
executable file
·161 lines (151 loc) · 4.43 KB
/
configure
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
#!/bin/bash
##
## configure script to configure the package hookwall
##
SED="/usr/bin/sed"
DATE_YEAR="$(date +'%Y')"
DATE_MONTHYEAR="$(date +'%B %Y')"
DATE_MANPAGEDATE="$(date +'%m/%d/%Y')"
files=''
while [ $# -ge 1 ]; do
case $1 in
--packagename=*)
PACKAGENAME="${1##--packagename=}"; shift;;
--version=*)
_VERSION="${1##--version=}"; shift;;
--revision=*)
_REVISION="${1##--revision=}"; shift;;
--author=*)
AUTHOR="${1##--author=}"; shift;;
--emailaddr=*)
EMAILADDR="${1##--emailaddr=}"; shift;;
--prefix=*)
PREFIX="${1##--prefix=}"; shift;;
--exec-prefix=*)
EXECPREFIX="${1##--exec-prefix=}"; shift;;
--bindir=*)
BINDIR="${1##--bindir=}"; shift;;
--sbindir=*)
SBINDIR="${1##--sbindir=}"; shift;;
--sysconfdir=*)
SYSCONFDIR="${1##--sysconfdir=}"; shift;;
--datadir=*)
DATADIR="${1##--datadir=}"; shift;;
--includedir=*)
INCLUDEDIR="${1##--includedir=}"; shift;;
--libdir=*)
LIBDIR="${1##--libdir=}"; shift;;
--libexecdir=*)
LIBEXECDIR="${1##--libexecdir=}"; shift;;
--localstatedir=*)
LOCALSTATEDIR="${1##--localstatedir=}"; shift;;
--sharedstatedir=*)
SHAREDSTATEDIR="${1##--sharedstatedir=}"; shift;;
--mandir=*)
MANDIR="${1##--mandir=}"; shift;;
--infodir=*)
INFODIR="${1##--infodir=}"; shift;;
--build=*)
BUILDARCH="${1##--build=}"; shift;;
--target=*)
TARGETARCH="${1##--target=}"; shift;;
--host=*)
HOSTARCH="${1##--host=}"; shift;;
--program-prefix=*)
PROGRAMPREFIX="${1##--program-prefix=}"; shift;;
--rfccachedir=*)
RFCCACHEDIR="${1##--rfccachedir=}"; shift;;
--rfcholdtime=*)
RFCHOLDTIME="${1##--rfcholdtime=}"; shift;;
--*)
echo "Unknown option: $1"; shift;;
--)
shift; files="$@"; shift $#;;
*)
files="$@"; shift $#;;
esac;
done;
if [ -z "$files" ]; then
files="`find ./ \( -type f -or -type l \) -name "*.in" -print`"
fi
: ${USER:=nobody}
: ${MAILLOCALPART:=${USER}}
: ${MAILDOMAIN:=icebear.org}
: ${DOMAIN_MAIL_DEVELOPMENT:=${MAILDOMAIN}}
: ${AUTONOMOUS_SYSTEM:=Aeon}
: ${SITENAME:=${AUTONOMOUS_SYSTEM}}
: ${DIRBASENAME:="${PWD##*/}"}
: ${PACKAGENAME:=${DIRBASENAME}}
: ${AUTHOR:=$(getent passwd $USER | cut -d : -f 5 | cut -d , -f 1)}
: ${EMAILADDR:=${MAILLOCALPART}+project.${PACKAGENAME}@${DOMAIN_MAIL_DEVELOPMENT}}
: ${PREFIX:=/usr}
: ${EXECPREFIX:=$PREFIX}
: ${BINDIR:=$EXECPREFIX/bin}
: ${SBINDIR:=$EXECPREFIX/sbin}
: ${SYSCONFDIR:=$PREFIX/etc}
: ${DATADIR:=$PREFIX/share}
: ${INCLUDEDIR:=$PREFIX/include}
: ${LIBDIR:=$EXECPREFIX/lib}
: ${LIBEXECDIR:=$EXECPREFIX/libexec}
: ${LOCALSTATEDIR:=$PREFIX/var}
: ${SHAREDSTATEDIR:=$PREFIX/com}
: ${MANDIR:=$DATADIR/man}
: ${INFODIR:=$DATADIR/info}
: ${BUILDARCH:=x86_64-suse-linux-gnu}
: ${TARGETARCH:=linux-suse-x86_64-gnu}
: ${PROGRAMPREFIX:=${PACKAGENAME}}
: ${RFCCACHEDIR:=${LOCALSTATEDIR}/cache/rfcs}}
: ${RFCHOLDTIME:=30}
if [ -r ${PACKAGENAME}.ver ]; then
source ${PACKAGENAME}.ver
fi
: ${VERSION:=0.0}
: ${REVISION:=0}
: ${_VERSION:=${VERSION}}
: ${_REVISION:=${REVISION}}
if [ -w ${PACKAGENAME}.ver -a \
"${_VERSION}" != "${VERSION}" -o \
"${_REVISION}" != "${REVISION}" ]; then
cat <<-EOD >${PACKAGENAME}.ver
VERSION=${_VERSION}
REVISION=${_REVISION}
EOD
VERSION="${_VERSION}"; unset _VERSION
REVISION="${_REVISION}"; unset _REVISION
fi
for file in $files; do
echo 'm4_changequote(`{{{'"'"', `}}}'"'"')m4_dnl' | m4 -P - ${file} | \
sed -e "s%@DIRBASENAME@%${DIRBASENAME}%g;\
s%@MANPAGEDATE@%${DATE_MANPAGE}%g;\
s%@MAILDOMAIN@%${MAILDOMAIN}%g;\
s%@DOMAIN_MAIL_DEVELOPMENT@%${DOMAIN_MAIL_DEVELOPMENT}%g;\
s%@AUTONOMOUS_SYSTEM@%${AUTONOMOUS_SYSTEM}%g;\
s%@SITENAME@%${SITENAME}%g;\
s%@PACKAGENAME@%${PACKAGENAME}%g;\
s%@YEAR@%${DATE_YEAR}%g;\
s%@MONTHYEAR@%${DATE_MONTHYEAR}%g;\
s%@VERSION@%${VERSION}%g;\
s%@REVISION@%${REVISION}%g;\
s%@AUTHOR@%${AUTHOR}%g;\
s%@EMAILADDR@%${EMAILADDR}%g;\
s%@PREFIX@%${PREFIX}%g;\
s%@EXECPREFIX@%${EXECPREFIX}%g;\
s%@BINDIR@%${BINDIR}%g;\
s%@SBINDIR@%${SBINDIR}%g;\
s%@SYSCONFDIR@%${SYSCONFDIR}%g;\
s%@DATADIR@%${DATADIR}%g;\
s%@INCLUDEDIR@%${INCLUDEDIR}%g;\
s%@LIBDIR@%${LIBDIR}%g;\
s%@LIBEXECDIR@%${LIBEXECDIR}%g;\
s%@LOCALSTATEDIR@%${LOCALSTATEDIR}%g;\
s%@SHAREDSTATEDIR@%${SHAREDSTATEDIR}%g;\
s%@MANDIR@%${MANDIR}%g;\
s%@INFODIR@%${INFODIR}%g;\
s%@BUILDARCH@%${BUILDARCH}%g;\
s%@TARGETARCH@%${TARGETARCH}%g;\
s%@HOSTARCH@%${HOSTARCH}%g;\
s%@RFCCACHEDIR@%${RFCCACHEDIR}%g;\
s%@RFCHOLDTIME@%${RFCHOLDTIME}%g;\
s%@PROGRAMPREFIX@%${PROGRAMPREFIX}%g" >${file%%.in}
chmod --reference=${file} ${file%%.in}
done