Revision | ab7c09db833f1266395dbec5deeef815bba34c5d (tree) |
---|---|
Time | 2012-02-26 22:10:28 |
Author | matsuand <matsuand@user...> |
Commiter | matsuand |
Added heimdal.sh.
@@ -0,0 +1,136 @@ | ||
1 | +#!/bin/sh | |
2 | + | |
3 | +. ./_blfsset.sh | |
4 | + | |
5 | +VER=1.5.2 | |
6 | +TARGET=heimdal-$VER | |
7 | +TARGETBALL=$TARGET.tar.gz | |
8 | +TARGETDIR=$TARGET | |
9 | + | |
10 | +echo Check Required... | |
11 | +./_checkRequired.sh db || exit 1 | |
12 | +if test "$1" == "check"; then | |
13 | + exit 0 | |
14 | +fi | |
15 | + | |
16 | +echo Check Options... | |
17 | +. ./_checkOptions.sh openldap sqlite | |
18 | + | |
19 | +if [ ${OPTION_openldap} -eq "1" ]; then | |
20 | + export ENABLEOPENLDAP="--with-openldap=/usr --enable-hdb-openldap-module " | |
21 | +else | |
22 | + export ENABLEOPENLDAP="" | |
23 | +fi | |
24 | + | |
25 | +if [ ${OPTION_openldap} -eq "1" ]; then | |
26 | + export WITHSQLITE="--with-sqlite3=/usr " | |
27 | +else | |
28 | + export WITHSQLITE="" | |
29 | +fi | |
30 | + | |
31 | +cd $SRC | |
32 | + | |
33 | +echo $TARGET | |
34 | + | |
35 | +echo \ \ Removing old directory... | |
36 | +rm -fr $TARGETDIR | |
37 | + | |
38 | +echo \ \ Extracting... | |
39 | +if ! test -f $DLD/$TARGETBALL; then | |
40 | + echo \ \ Tarball not found: $TARGETBALL && exit 1 | |
41 | +else | |
42 | + tar xf $DLD/$TARGETBALL | |
43 | +fi | |
44 | + | |
45 | +cd $TARGETDIR | |
46 | + | |
47 | +#echo \ \ Patching... | |
48 | +#patch -Np1 -i $DLD/heimdal-$VER-otp_fixes-1.patch \ | |
49 | +# 1> $LOG/$TARGET.0_patch.log 2>&1 || exit 1 | |
50 | + | |
51 | +sed -i 's|/var/heimdal|/var/lib/heimdal|' \ | |
52 | + `grep -lr "/var/heimdal" doc kadmin kdc lib` | |
53 | + | |
54 | +echo \ \ Configuring... | |
55 | +./configure --prefix=/usr \ | |
56 | + --sysconfdir=/etc/heimdal \ | |
57 | + --libexecdir=/usr/sbin \ | |
58 | + --localstatedir=/var/lib/heimdal \ | |
59 | + --datadir=/var/lib/heimdal \ | |
60 | + --with-hdbdir=/var/lib/heimdal \ | |
61 | + --with-readline=/usr \ | |
62 | + --enable-kcm \ | |
63 | + $ENABLEOPENLDAP $WITHSQLITE \ | |
64 | + 1> $LOG/$TARGET.1_conf.log 2>&1 || exit 1 | |
65 | + | |
66 | +echo \ \ Making... | |
67 | +make \ | |
68 | + 1> $LOG/$TARGET.2_make.log 2>&1 || exit 1 | |
69 | + | |
70 | +echo \ \ Making doc html... | |
71 | +install -v -m755 -d doc/html | |
72 | +mv -v doc/heimdal.html doc/html/heimdal | |
73 | +mv -v doc/hx509.html doc/html/hx509 | |
74 | +makeinfo --html --no-split -o doc/heimdal.html doc/heimdal.texi | |
75 | +makeinfo --html --no-split -o doc/hx509.html doc/hx509.texi | |
76 | +makeinfo --plaintext -o doc/heimdal.txt doc/heimdal.texi | |
77 | +makeinfo --plaintext -o doc/hx509.txt doc/hx509.texi | |
78 | + | |
79 | +echo \ \ Installing... | |
80 | +paco -p $TARGET 'make install' \ | |
81 | + 1> $LOG/$TARGET.3_install.log 2>&1 || exit 1 | |
82 | + | |
83 | +install -v -m755 -d /usr/share/doc/heimdal-$VER | |
84 | + | |
85 | +paco -p+ $TARGET "\ | |
86 | +install -v -m644 doc/{heimdal,hx509}.{html,txt} \ | |
87 | + doc/{init-creds,layman.asc} \ | |
88 | + /usr/share/doc/heimdal-$VER" \ | |
89 | + 1>> $LOG/$TARGET.3_install.log 2>&1 || exit 1 | |
90 | + | |
91 | +paco -p+ $TARGET "\ | |
92 | +cp -v -R doc/html \ | |
93 | + destdir/usr/share/doc/heimdal-$VER" \ | |
94 | + 1>> $LOG/$TARGET.3_install.log 2>&1 || exit 1 | |
95 | + | |
96 | +paco -p+ $TARGET "\ | |
97 | +mv -v /bin/login /bin/login.SHADOW && | |
98 | +mv -v /bin/su /bin/su.SHADOW && | |
99 | +mv -v /usr/bin/{login,su} /bin && | |
100 | +ln -v -sf ../../bin/login /usr/bin" \ | |
101 | + 1>> $LOG/$TARGET.3_install.log 2>&1 || exit 1 | |
102 | + | |
103 | +for LINK in \ | |
104 | + lib{otp,kafs,krb5,hx509,sqlite3,asn1,roken,crypto,wind}; do | |
105 | + paco -p+ $TARGET "\ | |
106 | + mv -v /usr/lib/${LINK}.so.* /lib" | |
107 | + paco -p+ $TARGET "\ | |
108 | + ln -v -sf ../../lib/$(readlink /usr/lib/${LINK}.so) \ | |
109 | + /usr/lib/${LINK}.so" | |
110 | +done | |
111 | + | |
112 | +paco -p+ $TARGET "\ | |
113 | +mv -v /usr/lib/$(readlink /usr/lib/libdb.so) \ | |
114 | + /usr/lib/libdb-?.so \ | |
115 | + /lib" | |
116 | + | |
117 | +paco -p+ $TARGET "\ | |
118 | +ln -v -sf ../../lib/$(readlink /usr/lib/libdb.so) \ | |
119 | + /usr/lib/libdb.so" | |
120 | + | |
121 | +ldconfig | |
122 | + | |
123 | +paco -p+ $TARGET "\ | |
124 | +sed -e 's|/usr/pkg|/usr|' \ | |
125 | + -e 's|/usr/lib/cracklib_dict|/lib/cracklib/pw_dict|' \ | |
126 | + -e 's|/var/heimdal|/var/lib/heimdal|' \ | |
127 | + lib/kadm5/check-cracklib.pl \ | |
128 | + > /bin/krb5-check-cracklib.pl" | |
129 | + | |
130 | +chmod -v 755 /bin/krb5-check-cracklib.pl | |
131 | + | |
132 | +echo -n \ \ Pacoing:\ && paco -a1 | grep $TARGET || echo none | |
133 | + | |
134 | +echo \ \ Removing directory... | |
135 | +cd .. && rm -fr $TARGETDIR | |
136 | + |