Commit a8019e96 authored by Carlo Landmeter's avatar Carlo Landmeter
Browse files

eggdrop: new aport

parent 676e3d34
# Contributor: Carlo Landmeter <clandmeter at gmail>
pkgname=eggdrop
pkgver=1.6.19
pkgrel=0
pkgdesc="World's most popular Open Source IRC bot"
url="http://www.eggheads.org/"
license='GPL-2'
depends="tcl"
makedepends="tcl-dev"
source="ftp://ftp.eggheads.org/pub/eggdrop/GNU/1.6/${pkgname}${pkgver}.tar.bz2
eggdrop-installer"
build() {
cd "$srcdir/${pkgname}${pkgver}"
./configure --prefix=/usr
make config || return 1
make -j1 || return 1
mkdir -p $pkgdir/opt/eggdrop
make -j1 DEST="$pkgdir/opt/eggdrop" install
install -Dm755 "$srcdir"/eggdrop-installer "$pkgdir"/usr/bin/eggdrop-installer
msg "Please run /usr/bin/eggdrop-installer to install your eggdrop bot."
}
md5sums="b706bbe4fdd05964e0ea0cd920f28539 eggdrop1.6.19.tar.bz2
d5214dc16c07c55edff22f495c9c367b eggdrop-installer"
#!/bin/sh
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/www/viewcvs.gentoo.org/raw_cvs/gentoo-x86/net-irc/eggdrop/files/eggdrop-installer,v 1.10 2007/03/14 17:52:24 drac Exp $
source /sbin/functions.sh || {
echo "${0}: Could not source /etc/init.d/functions.sh!"
exit 1
}
# Checks to see if user is trying to install eggdrop as root.
root_check() {
if [ "${HOME}" = "/root" ] || [ "$(whoami)" = "root" ]
then
ewarn "You should not be installing eggdrop as root."
ewarn
ewarn "Installing eggdrop as root leaves your computer vulnerable"
ewarn "to attack from other irc clients. Please use the eggdrop-installer"
ewarn "script as the user who you wish to run eggdrop with"
exit 1
fi
}
# Usage information
usage() {
cat <<USAGE_END
Usage: eggdrop-installer <bot-name>
Install eggdrop for a specific user, creating the directories and files
needed for eggdrop to run securely and safely.
USAGE_END
exit 1
}
# Install eggdrop
install_eggdrop() {
einfo "Installing Eggdrop"
einfo
root_check
if [ -d "${bot_dir}" ]
then
einfo "Already found a bot home directory for ${bot_name}"
exit 1
fi
einfo "Creating directories for your eggdrop..."
for dir in logs filesys/incoming text tmp scripts var
do
mkdir -p "${bot_dir}/${dir}"
done
einfo "Creating symlinks to required files for your bot to run..."
for file in help language modules eggdrop
do
ln -s "/opt/eggdrop/${file}" "${bot_dir}/${file}"
done
einfo "Copying motd, banner, scripts and config file..."
cp /opt/eggdrop/text/* "${bot_dir}/text"
cp /opt/eggdrop/scripts/* "${bot_dir}/scripts"
cp /opt/eggdrop/eggdrop.conf "${bot_dir}/eggdrop.conf"
einfo "Finished..."
einfo
einfo "Please edit your ${bot_dir}/eggdrop.conf!"
einfo
einfo "The bot needs to be run from the ${bot_dir} directory."
einfo "Run 'cd ${bot_dir} && ./eggdrop -m eggdrop.conf'"
einfo "to create the user file and then remove the -m command line option"
einfo "to start your eggdrop bot."
einfo
einfo "If you need any help please refer to the man page, or"
einfo "eggdrop website at http://www.egghelp.org/"
}
if [ -z "${1}" ]
then
usage
else
bot_name="${1}"
bot_dir="${HOME}/.eggdrop/${bot_name}"
install_eggdrop
fi
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment