Current File : /home/inlingua/public_html/decay_sym/root/var/softaculous/apps/mailx/build/make.sh
#!/bin/bash
source /var/softaculous/apps/build/common.sh

#Version
mailx=heirloom-mailx-12.5
heirloom_mailx=heirloom-mailx_12.5.orig


is_file $AMPPS_PATH"/mailx/bin/mailx"
if [ $? == 0 ]
then
	banner "Installing mailx"
	cd $SRC_PATH
	remove_dir $mailx
	is_file $mailx.tar.gz
	if [ $? == 0 ]
	then
		banner $mailx".tar.gz Downloading"
		wget --no-check-certificate -O $SRC_PATH/$mailx.tar.gz https://anduin.linuxfromscratch.org/BLFS/mailx/$heirloom_mailx.tar.gz>> $LOG 2>&1
	fi
	tar -zxf $mailx.tar.gz
	cd $mailx
	
	wget --no-check-certificate https://www.linuxfromscratch.org/patches/blfs/svn/heirloom-mailx-12.5-fixes-1.patch

	patch -Np1 -i $SRC_PATH/$mailx/heirloom-mailx-12.5-fixes-1.patch
	
	make PREFIX=/ BINDIR=/bin/ MANDIR=/share DESTDIR=/usr/local/apps/mailx/ UCBINSTALL=/usr/bin/install
	make PREFIX=/ BINDIR=/bin/ MANDIR=/share DESTDIR=/usr/local/apps/mailx/ UCBINSTALL=/usr/bin/install install

fi
is_file $AMPPS_PATH"/mailx/bin/mailx"
if [ $? == 0 ]
then
	banner 'Mailx could not be installed due to some reason'
	exit 1
fi