# *Heavy* under construction! Use it with cautions!
#
# 030515 get latest source of slrn via CVS
# http://sourceforge.net/cvs/?group_id=7768
function mkslrn()
{
	cd /backups/Source/slrn && \
	cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ login ; \
	cvs -z3 update ; \
	cd /backups/Source/slrn/ && autopoint -f && aclocal-1.8 && autoconf && \
	autoheader && automake-1.8 --foreign --add-missing && autoconf && \
	patch -p1 < ../patches/slrn-0.9.8.0-useragent-patch ; \
	./configure --enable-setgid-code --enable-spool --enable-inews \
	--enable-force-inews --with-slrnpull --with-ssl=/usr/bin/openssl \
	--enable-largefile --enable-mime --prefix=/home/dope/dev-bin && \
	=make && mmake && =make install clean
}

# 030613 get latest source of mutt via CVS
# notice: CVS-password for mutt-server = "anonymous"
# http://www.cs.hmc.edu/~me/mutt/
function mkmutt()
{
	cd /backups/Source/mutt && \
	cvs -d :pserver:anonymous@cvs.mutt.org:/home/roessler/cvs login ; \
	cvs -z3 update ;\
	./prepare && 
	patch -p1 < ../patches/patch-1.5.6.rr.compressed ; \
	patch -p1 < ../patches/patch-1.5.6.vvv.initials ;\
	patch -p1 < ../patches/patch-1.5.6.vvv.nntp ;\
	patch -p1 < ../patches/patch-1.5.6.vvv.quote ;\
	patch -p1 < ../patches/patch-1.5.6.vvv.slang ;\
	./configure --enable-compressed --enable-buffy-size --enable-iconv \
	--enable-imap --enable-nntp --enable-pgp --enable-pop --enable-smime \
	--with-ssl=/usr/sbin/openssl --with-regex --enable-nls --with-exec-shell=/bin/sh \
	--with-nss --prefix=/home/dope/dev-bin && \
	=make && mmake && =make install clean
}

# 030614 get latest source of vim via CVS
# http://vim.sourceforge.net/cvsdocs/
function mkvim()
{
	cd /backups/Source/vim && \
	cvs -z3 -d:pserver:anonymous@cvs.sf.net:/cvsroot/vim checkout vim ;\
	./configure --without-x --with-compiledby='Christan Schneider <strcat@gmx.net>' \
	--with-features=huge --prefix=/home/dope/dev-bin && =make && mmake && =make install clean
}

# 030830 get latest source of dietlibc
alias getdietlibc="cd /backups/Source/dietlibc/ && (rmdir dietlibc-cvs-`date +%y%m%d` | mkdir dietlibc-cvs-`date +%y%m%d`) && \
                   cd dietlibc-cvs-`date +%y%m%d` && \
                   cvs -d :pserver:cvs@cvs.fefe.de:/cvs -z9 co dietlibc"

alias zsh-confmake="./configure --enable-pcre --enable-cap --enable-maildir-support \
		    --enable-max-jobtable-size=256 --enable-function-subdirs \
		    --with-curses-terminfo --enable-dynamic --enable-locale && \
		    make && mmake ; sudo make install clean"

# OpenBSD Specific Functions
if [ "${OS}" = openbsd ]; then
	function mkernel()
	{
                config $1;
                cd ../compile/$1;
                make dep && make;
        }

        function src-compile()
        {
                cd /usr/src
                rm -rf /usr/obj
                make obj &&
                make build &&
                mergemaster
        }
fi
