--- admin/PlamoBuild.template.common.without_comment 2016-06-15 20:51:13.000000000 +0900 +++ plamo/01_minimum/network.txz/old/cyrus_sasl-20160806/PlamoBuild.cyrus_sasl-2.1.23 2016-08-06 16:57:10.000000000 +0900 @@ -1,15 +1,18 @@ #!/bin/sh ###################################################################### -url="" -pkgbase= -vers= +url="ftp://ftp.cyrusimap.org/cyrus-sasl/cyrus-sasl-2.1.23.tar.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/network.txz/cyrus_sasl/cyrus-sasl-blfs.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src.new/plamo/01_minimum/network.txz/cyrus_sasl/cyrus-sasl-64bit-plugindir.patch.gz" +pkgbase=cyrus_sasl +vers=2.1.23 arch=`uname -m` -build=P1 -src=$pkgbase-$vers -patchfiles="" -OPT_CONFIG="" -DOCS="README" +build=P4 +src=cyrus-sasl-$vers +patchfiles="cyrus-sasl-blfs.patch.gz cyrus-sasl-64bit-plugindir.patch.gz" +OPT_CONFIG="--with-dbpath=/var/lib/sasl/sasldb2 + --with-saslauthd=/var/run/saslauthd" +DOCS="README AUTHORS COPYING ChangeLog INSTALL NEWS" ###################################################################### fscheck() { @@ -244,7 +247,8 @@ if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ - --mandir='${prefix}'/share/man ${OPT_CONFIG[$i]} + --mandir='${prefix}'/share/man ${OPT_CONFIG[$i]} \ + --with-plugindir=/usr/$libdir/sasl2 fi done fi @@ -272,11 +276,58 @@ make install DESTDIR=$P fi done + install -d $P/etc/sasl2 + cat <<- "EOF" > $P/etc/sasl2/smtpd.conf + pwcheck_method: saslauthd + mech_list: plain login + EOF + install -d $P/etc/rc.d/init.d + cat <<- "EOF" > $P/etc/rc.d/init.d/saslauthd + #!/bin/sh + + start() { + if [ -x /usr/sbin/saslauthd ] ; then + echo $"Starting saslauthd..." + saslauthd -a shadow + fi + } + + stop() { + if [ -f /var/run/saslauthd/saslauthd.pid ] ; then + echo $"Stopping saslauthd..." + kill `cat /var/run/saslauthd/saslauthd.pid` + rm -f /var/run/saslauthd/saslauthd.pid + fi + } + + case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + stop + sleep 3 + start + ;; + *) + echo $"Usage: $0 {start|stop|restart}" + exit 1 + ;; + esac + exit 0 + EOF + chmod 755 $P/etc/rc.d/init.d/saslauthd + install -d -m 700 $P/var/lib/sasl + install -d -g postfix $P/var/run/saslauthd touch $W/i.et cd $W find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress + strip_libdir $P/usr/$libdir/sasl2 for i in `seq 0 $((${#DOCS[@]} - 1))` ; do for j in ${DOCS[$i]} ; do for k in ${S[$i]}/$j ; do @@ -295,9 +346,18 @@ ( cd $docdir ; find ${src[$i]} -type d -exec touch -r $W/{} {} \; ) done convert - tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` - tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/man1 | tail -n+2` + touch -t `date '+%m%d0900'` $P/usr/$libdir/sasl2 + tar cvpf $pkg.tar -C $P `cd $P ; find usr/sbin | tail -n+2` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/$libdir -maxdepth 1 | tail -n+2` + tar rvpf $pkg.tar -C $P usr/include/sasl + tar rvpf $pkg.tar -C $P etc/sasl2 + tar rvpf $pkg.tar -C $P etc/rc.d/init.d/saslauthd + tar rvpf $pkg.tar -C $P var/lib/sasl + tar rvpf $pkg.tar -C $P var/run/saslauthd + 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/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 read -p "Do you want to keep work files? [y/N] " ans