--- admin/PlamoBuild-template-20170713 2017-07-13 13:07:00.000000000 +0900 +++ plamo/01_minimum/network.txz/heimdal/PlamoBuild.heimdal-1.5.3 2017-10-29 17:04:30.000000000 +0900 @@ -1,19 +1,21 @@ #!/bin/sh ###################################################################### -url="" +url="http://www.h5l.org/dist/src/heimdal-1.5.3.tar.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/network.txz/heimdal/heimdal-1.5.3-texinfo_fix.patch" verify= digest= branch= commitid= -pkgbase= -vers= +pkgbase=heimdal +vers=1.5.3 arch=`uname -m` -build=P1 +build=P4 src=$pkgbase-$vers -patchfiles="" -OPT_CONFIG="" -DOCS="README" +patchfiles="heimdal-1.5.3-texinfo_fix.patch" +OPT_CONFIG="--prefix=/usr/heimdal --infodir=/usr/share/info + --mandir=/usr/share/man --with-sqlite3=/usr LIBS=-pthread" +DOCS="ChangeLog* LICENSE NEWS README TODO" template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -37,6 +39,9 @@ if [ -d ${B[$i]} ] ; then rm -rf ${B[$i]} ; fi ; cp -a ${S[$i]} ${B[$i]} done apply_patches + cd $B + cp -p krb5.conf{,.orig} + sed -i '/default_realm/s@^ *@\t@' krb5.conf for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -x configure ] ; then @@ -65,16 +70,193 @@ make install DESTDIR=$P fi done + mkdir $P/usr/heimdal/heimdal.tmp + mv $P/usr/heimdal/{{{,s}bin,libexec,$libdir,include},heimdal.tmp} + mv $P/usr/heimdal{/heimdal.tmp/{{,s}bin,libexec,$libdir,include},} + rmdir $P/usr/heimdal/heimdal.tmp + install -d $P/usr/$libdir/pkgconfig + ln -sf /usr/heimdal/$libdir/pkgconfig/heimdal-gssapi.pc \ + $P/usr/$libdir/pkgconfig + ln -sf mech.5 $mandir/man5/qop.5 + install -d $P/etc + install -m 644 krb5.conf $P/etc + install -m 644 etc/services.append $P/etc/services.append-kerberos + install -d $P/etc/profile.d + cat <<- "EOF" > $P/etc/profile.d/heimdal.sh + # add /usr/heimdal/bin to $PATH for bash + heimdal=/usr/heimdal + + if [ -n "$PATH" ] ; then + PATH=$PATH:$heimdal/bin + else + PATH=/bin:/usr/bin:$heimdal/bin + fi + if [ `id -u` = 0 ] ; then + PATH=$PATH:$heimdal/sbin + fi + export PATH + EOF + cat <<- "EOF" > $P/etc/profile.d/heimdal.csh + # add /usr/heimdal/bin to $PATH for tcsh + set heimdal = /usr/heimdal + + if ($?PATH) then + set path = ( $path $heimdal/bin ) + else + set path = ( /bin /usr/bin $heimdal/bin ) + endif + if (`id -u` == 0) then + set path = ( $path $heimdal/sbin ) + endif + EOF + install -d $P/etc/rc.d/init.d + cat <<- "EOF" > $P/etc/rc.d/init.d/heimdal + #!/bin/sh -f + # + # description: The Heimdal Kerberos5 KDC Master server and its administration + # daemons. + # processname: heimdal + # chkconfig: 2345 11 89 + # + # Creation: 1997-04-10 + # Auther: JuK + # HISTORY + # 2006-01-02 JuK port to Heimdal on Plamo Linux + # 2001-10-01 JuK port to RH7.1 + # + KDC=/usr/heimdal/libexec/kdc + kdcdaemon="heimdal (Kerberos 5 KDC)" + KADMIND=/usr/heimdal/libexec/kadmind + kdmdaemon="kadmind (Kerberos DB admin. daemon)" + KPASSWDD=/usr/heimdal/libexec/kpasswdd + kpwdaemon="kpasswdd (Kerberos password daemon)" + + kdcpid=`ps ax | grep $KDC | grep -v grep | sed -e 's/^ *//' -e 's/ .*//'` + kdmpid=`ps ax | grep $KADMIND | grep -v grep | sed -e 's/^ *//' -e 's/ .*//'` + kpwpid=`ps ax | grep $KPASSWDD | grep -v grep | sed -e 's/^ *//' -e 's/ .*//'` + + # + # start or stop kdc (KDC) + # start or stop kadmind (Kerberos DB admin. daemon) + # start or stop kpasswdd (Kerberos password daemon) + # + case $1 in + start) + if [ -f $KDC ] ; then + if [ -z "$kdcpid" ] ; then + $KDC & + echo "$0: $kdcdaemon started." + kdcpid=`ps ax | grep $KDC | grep -v grep | sed -e 's/^ *//' -e 's/ .*//'` + echo "$0: Proccess ID = $kdcpid" + else + echo "$0: $kdcdaemon is ALREADY running (PID = $kdcpid)." + fi + else + echo "$0: $KDC does NOT exist." + exit 1 + fi + if [ -f $KADMIND ] ; then + if [ -z "$kdmpid" ] ; then + $KADMIND & + echo "$0: $kdmdaemon started." + kdmpid=`ps ax | grep $KADMIND | grep -v grep | sed -e 's/^ *//' -e 's/ .*//'` + echo "$0: Proccess ID = $kdmpid" + else + echo "$0: $kdmdaemon is ALREADY running (PID = $kdmpid)." + fi + else + echo "$0: $KADMIND does NOT exist." + exit 1 + fi + if [ -f $KPASSWDD ] ; then + if [ -z "$kpwpid" ] ; then + $KPASSWDD & + echo "$0: $kpwdaemon started." + kpwpid=`ps ax | grep $KPASSWDD | grep -v grep | sed -e 's/^ *//' -e 's/ .*//'` + echo "$0: Proccess ID = $kpwpid" + else + echo "$0: $kpwdaemon is ALREADY running (PID = $kpwpid)." + fi + else + echo "$0: $KPASSWDD does NOT exist." + exit 1 + fi + ;; + stop) + if [ -f $KDC ] ; then + if [ -n "$kdcpid" ] ; then + kill $kdcpid + echo "$0: $kdcdaemon has been killed." + else + echo "$0: $kdcdaemon is NOT running." + fi + fi + if [ -f $KADMIND ] ; then + if [ -n "$kdmpid" ] ; then + kill $kdmpid + echo "$0: $kdmdaemon has been killed." + else + echo "$0: $kdmdaemon is NOT running." + fi + fi + if [ -f $KPASSWDD ] ; then + if [ -n "$kpwpid" ] ; then + kill $kpwpid + echo "$0: $kpwdaemon has been killed." + else + echo "$0: $kpwdaemon is NOT running." + fi + fi + ;; + *) + echo "usage: $0 {start|stop}" + # check kdc + if [ -n "$kdcpid" ] ; then + echo "$0: $kdcdaemon is ALREADY running (PID = $kdcpid)." + else + echo "$0: $kdcdaemon is NOT running." + fi + # check kadmind + if [ -n "$kdmpid" ] ; then + echo "$0: $kdmdaemon is ALREADY running (PID = $kdmpid)." + else + echo "$0: $kdmdaemon is NOT running." + fi + # check kpasswdd + if [ -n "$kpwpid" ] ; then + echo "$0: $kpwdaemon is ALREADY running (PID = $kpwpid)." + else + echo "$0: $kpwdaemon is NOT running." + fi + exit 1 + ;; + esac + exit 0 + EOF touch $W/i.et cd $W find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress + strip_bindir $P/usr/heimdal/bin + strip_bindir $P/usr/heimdal/sbin + strip_bindir $P/usr/heimdal/libexec/heimdal + strip_bindir $P/usr/heimdal/libexec + strip_libdir $P/usr/heimdal/$libdir setup_docdir + prune_symlink $P/usr/heimdal convert_links - tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` + touch -t `date '+%m%d0900'` \ + $P/usr/heimdal/{{,s}bin,libexec{,/heimdal},$libdir} + tar cvpf $pkg.tar -C $P usr/heimdal + tar rvpf $pkg.tar -C $P `cd $P ; find etc -type f` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/info | tail -n+2` tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/man1 | tail -n+2` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/man3 | tail -n+2` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/man5 | tail -n+2` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/man8 | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src + tar rvpf $pkg.tar -C $P install/doinst.sh touch -t `date '+%m%d0900'` $pkg.tar ; xz $pkg.tar ; touch $pkg.tar.xz mv $pkg.tar.xz $pkg.txz cleanup