--- admin/PlamoBuild-template-20170415 2017-04-15 12:25:32.000000000 +0900 +++ plamo/01_minimum/network.txz/cyrus_sasl/PlamoBuild.cyrus_sasl-2.1.23 2017-06-14 06:29:43.000000000 +0900 @@ -1,18 +1,21 @@ #!/bin/sh ###################################################################### -url="" +url="ftp://ftp.cyrusimap.org/cyrus-sasl/cyrus-sasl-2.1.23.tar.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/network.txz/cyrus_sasl/cyrus-sasl-blfs.patch.gz + ftp://plamo.linet.gr.jp/pub/Plamo-src/plamo/01_minimum/network.txz/cyrus_sasl/cyrus-sasl-64bit-plugindir.patch.gz" verify= digest= commitid= -pkgbase= -vers= +pkgbase=cyrus_sasl +vers=2.1.23 arch=`uname -m` -build=P1 -src=$pkgbase-$vers -patchfiles="" -OPT_CONFIG="" -DOCS="README" +build=P5 +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" template=20170415 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -41,7 +44,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 @@ -64,16 +68,72 @@ 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 setup_docdir convert_links - 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 cleanup