File: Install

package info (click to toggle)
wmaker 0.14.1-7
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 2,868 kB
  • ctags: 2,744
  • sloc: ansic: 30,785; sh: 2,619; makefile: 547
file content (192 lines) | stat: -rwxr-xr-x 4,276 bytes parent folder | download
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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
#!/bin/sh
#
# WindowMaker configuration and compilation script.
#

export LINGUAS;LINGUAS=""
export NLSDIR;NLSDIR="/usr/lib/locale"

OPTIONS=""
PREFIX="/usr/local"

echo
echo "========================"
echo "WindowMaker Installation"
echo "========================"
echo
echo "NOTE: If the installation procedure fails, read the INSTALL file and do"
echo "the installation manually."
echo "Type <Return> when ready."
read foo
echo

if test "$USER" != "root"; then
	echo "Warning: you must run this script as the root user"
	echo "Type <Return> to continue or <Control>-<C> to stop"
	read foo
	echo
	echo "Be sure to specify an installation path where you have"
	echo "write persmission."
	echo
fi


echo
echo "Option Selection"
echo "================"

######################## Button Style
echo
echo "Do you want the titlebar buttons to have the new style appearance?"
echo -n "<y/n> [n] "
read foo

if [ "$foo" = "Y" -o "$foo" = "y" ]; then
	OPTIONS="$OPTIONS --enable-newstyle"
fi

####################### Superfluous stuff
echo
echo "Do you want silly and superfluous stuff (more animations and others)?"
echo "Only for people with fast machines "
echo -n "<y/n> [n] "
read foo

if [ "$foo" = "Y" -o "$foo" = "y" ]; then
	OPTIONS="$OPTIONS --enable-superfluous"
fi

######################## NLS
echo
echo "Do you want National Language Support?"
echo -n "<y/n> [n] "
read NLS

if [ "$NLS" = "y" -o "$NLS" = "Y" ]; then
	NLS="Y"
	echo "The supported locales are:"
	ling=` (cd po; /bin/ls *.po) `
	ALL_LINGUAS=""
	for l in $ling; do
		lname=`(cd po; grep Language-Team $l|cut -f 2 -d: |cut -f 2 -d\ )`
		lname=`echo $lname`
		lcode=`basename $l .po`
		ALL_LINGUAS="$ALL_LINGUAS $lcode"
		echo "$lcode $lname"
	done
	echo "Type in the locales you want  [$ALL_LINGUAS]"
	read foo
	if test "x$foo" = "x"; then
		LINGUAS=$ALL_LINGUAS
	else
		LINGUAS="$foo"
	fi
	echo "Selected locales are: $LINGUAS"

	MB=""
	for i in $LINGUAS; do
		if [ "$MB" = "" -a "$i" = "ja" -o "$i" = "kr" ]; then
			echo
			echo "A language you selected needs multi-byte character support"
			echo "Do you want to enable it?"
			echo -n "<y/n> [n] "
			read MB
			if [ "$MB" = "y" -o "$MB" = "Y" ]; then
				OPTIONS="$OPTIONS --enable-kanji"
			fi
		fi
	done
	echo
	echo "Where do you want to put the message files? [$NLSDIR]"
	read foo
	if test "x$foo" != "x"; then
		NLSDIR=$foo
	fi
fi
##################### Installation path

done=0
while [ $done = 0 ]; do
    echo
    echo "Where do you want to install WindowMaker? [$PREFIX]"
    echo "(The default path will install WindowMaker in "
    echo "$PREFIX/bin, $PREFIX/lib etc.)"
    echo -n "? "
    read foo

	if test "x$foo" != "x"; then
	    if [ "$foo" = "y" -o "$foo" = "n" ]; then
	    echo
	    echo "Hmm... I don't think you really want to install WindowMaker into \"$foo\""
	    echo
	else
	    done=1	
	    PREFIX=$foo
	fi
    else
    	done=1
    fi
done

OPTIONS="$OPTIONS --prefix=$PREFIX"


######################  Build libPropList

if [ ! -d libPropList ]; then
	gunzip -c libPropList.tar.gz | tar xf -
fi

if [ ! -f libPropList/libPropList.a ]; then
	echo "-----------------------"
	echo "Building libPropList..."
	echo "-----------------------"
	cd libPropList
	./configure
	make
	cd ..
fi

if [ ! -f libPropList/libPropList.a ]; then
	echo "Build of libPropList was not successfull. "
	exit
fi


#####################  Configure
echo "--------------------------"
echo "Configuring WindowMaker..."
echo "--------------------------"
if [ `uname -s` = "SCO_SV" ]; then
	echo "CFLAGS=\"$CFLAGS -belf -DANSICPP\" ./configure $OPTIONS"
	CFLAGS="$CFLAGS -belf -DANSICPP" ./configure $OPTIONS
else
	echo "CFLAGS=\"$CFLAGS $GCCFLAGS\" ./configure $OPTIONS"
	CFLAGS="$CFLAGS $GCCFLAGS" ./configure $OPTIONS
fi


#################### Compile
echo "------------------------"
echo "Compiling WindowMaker..."
echo "------------------------"
(cd src; make clean)
make

echo "-------------------------"
echo "Installing WindowMaker..."
echo "-------------------------"

make install

echo 
echo "Installation Finished!"
echo
echo "Now, each user that wishes to use WindowMaker must run the wmaker.inst"
echo "script that was just installed."


if test "$NLS" = "Y"; then
	echo "Don't forget to set the LANG environment variable to your locale"
fi