Commit a261cb29 authored by Natanael Copa's avatar Natanael Copa

main/eggdrop: upgrade to 1.6.21 and cleanup

We dont want install anything in /opt
parent c3646dc3
# Maintainer: Carlo Landmeter <clandmeter@gmail.com>
pkgname=eggdrop
pkgver=1.6.20
pkgver=1.6.21
pkgrel=0
pkgdesc="World's most popular Open Source IRC bot"
url="http://www.eggheads.org/"
......@@ -8,61 +8,110 @@ arch="all"
license='GPL-2'
depends="tcl"
makedepends="tcl-dev !bind-libs"
install="$pkgname.post-install"
subpackages="$pkgname-logs2html $pkgname-gseen"
install=
subpackages="$pkgname-doc $pkgname-logs2html $pkgname-gseen"
source="ftp://ftp.eggheads.org/pub/eggdrop/GNU/1.6/${pkgname}${pkgver}.tar.bz2
eggdrop-installer
gseen.mod.patch
logs2html.mod.patch"
eggdrop-langdir.patch
gseen.mod.patch
logs2html.mod.patch"
build() {
cd "$srcdir/${pkgname}${pkgver}"
for i in "$srcdir"/*.patch; do
msg "Applying ${i}"
patch -p0 -i $i || return 1
_builddir="$srcdir/${pkgname}${pkgver}"
prepare() {
cd "$_builddir"
for i in $source; do
case $i in
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
esac
done
}
build() {
cd "$_builddir"
./configure --prefix=/usr
make config || return 1
make || return 1
mkdir -p $pkgdir/opt/eggdrop
make -j1 DEST="$pkgdir/opt/eggdrop" install
install -Dm755 "$srcdir"/eggdrop-installer "$pkgdir"/usr/bin/eggdrop-installer || return 1
make -j1 || return 1
}
package() {
cd "$_builddir"
make -j1 INSTALL="install -p" DEST="$pkgdir"/usr/share/eggdrop install \
|| return 1
rm -rf "$pkgdir"/usr/share/eggdrop/README \
"$pkgdir"/usr/share/eggdrop/doc \
"$pkgdir"/usr/share/eggdrop/eggdrop* \
"$pkgdir"/usr/share/eggdrop/filesys \
"$pkgdir"/usr/share/eggdrop/logs \
"$pkgdir"/usr/share/eggdrop/modules \
"$pkgdir"/usr/share/eggdrop/scripts/CONTENTS \
|| return 1
install -D -m 755 eggdrop "$pkgdir"/usr/bin/eggdrop || return 1
install -D -m 644 doc/man1/eggdrop.1 \
"$pkgdir"/usr/share/man/man1/eggdrop.1 || return 1
#move modules to /usr/lib
mkdir "$pkgdir"/usr/lib
mv "$pkgdir"/usr/share/eggdrop/modules-* \
"$pkgdir"/usr/lib/eggdrop || return 1
# Fix paths of example eggdrop.conf
sed -i -e '2d' -e '1s@^.*@#!/usr/bin/eggdrop@' \
-e 's@scripts/@/usr/share/eggdrop/scripts/@g' \
-e 's@help/@/usr/share/eggdrop/help/@g' \
-e 's@modules/@/usr/lib/eggdrop/@g' \
eggdrop.conf
mkdir -p "$pkgdir"/usr/share/doc/eggdrop
cp -a \
COPYING FEATURES NEWS README doc/Changes1.6 eggdrop.conf \
doc/ABOUT doc/BANS doc/BOTNET doc/BUG-REPORT doc/FIRST-SCRIPT \
doc/MODULES doc/PARTYLINE doc/TEXT-SUBSTITUTIONS doc/TRICKS \
doc/USERS doc/WEIRD-MESSAGES doc/tcl-commands.doc doc/settings \
doc/html \
"$pkgdir"/usr/share/doc/eggdrop
}
logs2html() {
pkgdesc="logs2html module for eggdrop"
install=""
cd "$srcdir/${pkgname}${pkgver}"
cd "$_builddir"
for dirs in language help; do
mkdir -p "$subpkgdir"/opt/eggdrop/${dirs}
mv "$pkgdir"/opt/eggdrop/${dirs}/logs2html.* "$subpkgdir"/opt/eggdrop/${dirs}/ || return 1
for dir in language help; do
mkdir -p "$subpkgdir"/usr/share/eggdrop/$dir
mv "$pkgdir"/usr/share/eggdrop/$dir/logs2html.* "$subpkgdir"/usr/share/eggdrop/$dir/ || return 1
done
mkdir -p "$subpkgdir"/opt/eggdrop/modules/
mv "$pkgdir"/opt/eggdrop/modules/logs2html.so "$subpkgdir"/opt/eggdrop/modules/ || return 1
mkdir -p "$subpkgdir"/opt/eggdrop/log2html
mkdir -p "$subpkgdir"/usr/lib/eggdrop
mv "$pkgdir"/usr/lib/eggdrop/logs2html.so \
"$subpkgdir"/usr/lib/eggdrop/ || return 1
mkdir -p "$subpkgdir"/usr/share/eggdrop/log2html
for files in logs2html.conf top100.tpl user.css readme.txt chan.list; do
cp src/mod/logs2html.mod/${files} "$subpkgdir"/opt/eggdrop/log2html/ || return 1
cp src/mod/logs2html.mod/${files} "$subpkgdir"/usr/share/eggdrop/log2html/ || return 1
done
}
gseen() {
pkgdesc="gseen module for eggdrop"
install=""
cd "$srcdir/${pkgname}${pkgver}"
mkdir -p "$subpkgdir"/opt/eggdrop/language
mv "$pkgdir"/opt/eggdrop/language/gseen.* "$subpkgdir"/opt/eggdrop/language/ || return 1
mkdir -p "$subpkgdir"/opt/eggdrop/modules/
mv "$pkgdir"/opt/eggdrop/modules/gseen.so "$subpkgdir"/opt/eggdrop/modules/ || return 1
mkdir -p "$subpkgdir"/opt/eggdrop/gseen
cp src/mod/gseen.mod/gseen.conf "$subpkgdir"/opt/eggdrop/gseen/ || return 1
cp src/mod/gseen.mod/README "$subpkgdir"/opt/eggdrop/gseen/ || return 1
cd "$_builddir"
mkdir -p "$subpkgdir"/usr/share/eggdrop/language
mv "$pkgdir"/usr/share/eggdrop/language/gseen.* \
"$subpkgdir"/usr/share/eggdrop/language/ || return 1
mkdir -p "$subpkgdir"/usr/lib/eggdrop
mv "$pkgdir"/usr/lib/eggdrop/gseen.so \
"$subpkgdir"/usr/lib/eggdrop/ || return 1
mkdir -p "$subpkgdir"/usr/share/eggdrop/gseen
cp src/mod/gseen.mod/gseen.conf "$subpkgdir"/usr/share/eggdrop/gseen/ \
|| return 1
cp src/mod/gseen.mod/README "$subpkgdir"/usr/share/eggdrop/gseen/ \
|| return 1
}
md5sums="f6887c045dba11fa2755a6a9e40380a3 eggdrop1.6.20.tar.bz2
d5214dc16c07c55edff22f495c9c367b eggdrop-installer
37b82f60413913758cd4161dbc2e7849 gseen.mod.patch
490ffd522d5058413c96b8325d19b838 logs2html.mod.patch"
md5sums="5663b2daecc790e6e9237e1d5a2caa50 eggdrop1.6.21.tar.bz2
fdc2a01f611f14a8132225c8294f5039 eggdrop-langdir.patch
853a8526472ee964a8c94046cb9ae8b8 gseen.mod.patch
8b12435d0944b47898758d74bb227778 logs2html.mod.patch"
#!/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
Patch by Robert Scheck <robert@fedoraproject.org> for eggdrop >= 1.6.17,
which replaces the hardcoded language directory path to avoid the use of
EGG_LANGDIR environment variable per default (#194481 #c6-c9).
--- eggdrop1.6.17/src/eggdrop.h 2004-07-25 13:17:34.000000000 +0200
+++ eggdrop1.6.17/src/eggdrop.h.langdir 2006-06-18 01:19:23.000000000 +0200
@@ -75,7 +75,7 @@
/* Language stuff */
-#define LANGDIR "./language" /* language file directory */
+#define LANGDIR "/usr/share/eggdrop/language" /* language file directory */
#define BASELANG "english" /* language which always gets loaded before
all other languages. You do not want to
change this. */
This diff is collapsed.
This diff is collapsed.
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