Add 'eggdrop/' from commit '2b21f843e485b88cf55ba09ee41e05d75e592e18'
git-subtree-dir: eggdrop git-subtree-mainline:45e68051be
git-subtree-split:2b21f843e4
This commit is contained in:
23
eggdrop/.SRCINFO
Normal file
23
eggdrop/.SRCINFO
Normal file
@@ -0,0 +1,23 @@
|
||||
pkgbase = eggdrop
|
||||
pkgdesc = The world's most popular Open Source IRC bot.
|
||||
pkgver = 1.8.4
|
||||
pkgrel = 1
|
||||
url = http://www.eggheads.org/
|
||||
arch = i686
|
||||
arch = x86_64
|
||||
license = GPL2
|
||||
depends = tcl
|
||||
depends = openssl
|
||||
backup = etc/eggdrop.conf
|
||||
source = http://ftp.eggheads.org/pub/eggdrop/source/1.8/eggdrop-1.8.4.tar.gz
|
||||
source = http://ftp.eggheads.org/pub/eggdrop/source/1.8/eggdrop-1.8.4.tar.gz.asc
|
||||
source = dlopen.c
|
||||
source = utf8.patch
|
||||
validpgpkeys = E01C240484DE7DBE190FE141E7667DE1D1A39AFF
|
||||
sha512sums = d08af09dc83045bf89eae957e7817591f16456f83ba3efe6b361fd421a3d4068348543275c26b27b006f09f06344c04cdf58ee4231f1aee0e7537ec39bc24b49
|
||||
sha512sums = SKIP
|
||||
sha512sums = e1d254a6adae76198f7e20729aaff5d01a0947cb07faed560574886c1ce3794242204ec0c2f5905584240b243bf36103fffbb06f4154c022228c1b701a070e5c
|
||||
sha512sums = 7966d4d42994e44a0e571b89f1c66cb41f672d75e6ced7051d1ece23d8c209059c3565b41de950bf9c907701ce7a5e33a215b637587075ed300a002a58eda503
|
||||
|
||||
pkgname = eggdrop
|
||||
|
101
eggdrop/PKGBUILD
Normal file
101
eggdrop/PKGBUILD
Normal file
@@ -0,0 +1,101 @@
|
||||
# Maintainer: Giovanni Harting <539@idlegandalf.com>
|
||||
# Contributor: kreon <kreon@jnode.in>
|
||||
# Contributor: Boohbah <boohbah at gmail.com>
|
||||
# Contributor: Daniel J Griffiths <ghost1227 at archlinux.us>
|
||||
# Contributor: Mantas Mikulėnas <grawity at gmail.com>
|
||||
|
||||
pkgname=eggdrop
|
||||
pkgver=1.8.4
|
||||
pkgrel=1
|
||||
pkgdesc="The world's most popular Open Source IRC bot."
|
||||
arch=('i686' 'x86_64')
|
||||
url="http://www.eggheads.org/"
|
||||
license=('GPL2')
|
||||
depends=('tcl' 'openssl')
|
||||
source=("http://ftp.eggheads.org/pub/$pkgname/source/1.8/$pkgname-$pkgver.tar.gz"
|
||||
"http://ftp.eggheads.org/pub/$pkgname/source/1.8/$pkgname-$pkgver.tar.gz.asc"
|
||||
'dlopen.c' 'utf8.patch')
|
||||
backup=("etc/$pkgname.conf")
|
||||
#options=('!makeflags')
|
||||
sha512sums=('d08af09dc83045bf89eae957e7817591f16456f83ba3efe6b361fd421a3d4068348543275c26b27b006f09f06344c04cdf58ee4231f1aee0e7537ec39bc24b49'
|
||||
'SKIP'
|
||||
'e1d254a6adae76198f7e20729aaff5d01a0947cb07faed560574886c1ce3794242204ec0c2f5905584240b243bf36103fffbb06f4154c022228c1b701a070e5c'
|
||||
'7966d4d42994e44a0e571b89f1c66cb41f672d75e6ced7051d1ece23d8c209059c3565b41de950bf9c907701ce7a5e33a215b637587075ed300a002a58eda503')
|
||||
validpgpkeys=('E01C240484DE7DBE190FE141E7667DE1D1A39AFF')
|
||||
|
||||
# Want multiple *unique* installations? Change the pkgname, it will just work.
|
||||
_sharedir="/usr/share"
|
||||
_modulesdir="/usr/lib/$pkgname"
|
||||
_scriptsdir="$_sharedir/$pkgname/scripts"
|
||||
_helpdir="$_sharedir/$pkgname/help"
|
||||
_bin="/usr/bin/$pkgname"
|
||||
_mandir="$_sharedir/man/man1"
|
||||
readonly -a _sharedir _modulesdir _scriptsdir _helpdir _bin _mandir
|
||||
|
||||
build() {
|
||||
cd "$srcdir/$pkgname-$pkgver"
|
||||
|
||||
# UNCOMMENT IF YOU NEED UTF-8 SUPPORT
|
||||
#patch -p1 < "$srcdir/utf8.patch"
|
||||
|
||||
# Don't complain about language files on startup.
|
||||
sed -i "s|\"./language\"|\"$_sharedir/$pkgname/language\"|g" src/eggdrop.h
|
||||
|
||||
./configure
|
||||
make config
|
||||
make
|
||||
}
|
||||
|
||||
check() {
|
||||
cd "$srcdir/$pkgname-$pkgver"
|
||||
|
||||
# If this fails, theres a rather good chance something is broken.
|
||||
|
||||
gcc -O2 "$srcdir/dlopen.c" -o dlopen -ldl
|
||||
|
||||
for module in *.so ; do
|
||||
if ! env LD_PRELOAD='' ./dlopen "${module}" ; then
|
||||
error "Sanity check failed: "${module}" cannot be loaded. Proceeding anyway.."
|
||||
fi
|
||||
done
|
||||
|
||||
rm dlopen
|
||||
}
|
||||
|
||||
package() {
|
||||
readonly eggtmp="$pkgdir/tmp"
|
||||
mkdir -p -m 0755 "$eggtmp"
|
||||
|
||||
# This is ugly..
|
||||
|
||||
cd "$srcdir/$pkgname-$pkgver"
|
||||
make install DEST="$eggtmp"
|
||||
|
||||
find "$eggtmp" -name 'CONTENTS' -exec rm {} +
|
||||
|
||||
mkdir -p -m 0755 "$pkgdir/etc" \
|
||||
"$pkgdir/usr/"{bin,lib} \
|
||||
"$pkgdir/$_sharedir/"{$pkgname,doc,man/man1}
|
||||
|
||||
mv "$eggtmp/modules-$pkgver" "$pkgdir/$_modulesdir"
|
||||
mv "$eggtmp/eggdrop-$pkgver" "$pkgdir/$_bin"
|
||||
mv "$eggtmp/doc/man1/$pkgname.1" "$pkgdir/$_mandir/$pkgname.1"
|
||||
rm -r "$eggtmp/doc/man1"
|
||||
mv "$eggtmp/doc" "$pkgdir/$_sharedir/doc/$pkgname"
|
||||
|
||||
for d in language scripts help text; do
|
||||
mv "$eggtmp/${d}" "$pkgdir/$_sharedir/$pkgname"
|
||||
done
|
||||
|
||||
sed -e '2d' \
|
||||
-e "1s@^.*@#!$_bin@" \
|
||||
-e "s@scripts/@$_scriptsdir/@g" \
|
||||
-e "s@help/@$_helpdir@g" \
|
||||
-e "s@modules/@$_modulesdir/@g" \
|
||||
eggdrop.conf > "$pkgdir/etc/$pkgname.conf"
|
||||
|
||||
rm -r "$eggtmp"
|
||||
find "$pkgdir/$_sharedir" -type f -exec chmod 0444 {} +
|
||||
}
|
||||
|
||||
# vim:set ts=2 sw=2 et:
|
28
eggdrop/dlopen.c
Normal file
28
eggdrop/dlopen.c
Normal file
@@ -0,0 +1,28 @@
|
||||
#include <dlfcn.h>
|
||||
#include <stdio.h>
|
||||
#include <limits.h>
|
||||
#include <sys/stat.h>
|
||||
/* Simple program to see if dlopen() would succeed. */
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int i;
|
||||
struct stat st;
|
||||
char buf[PATH_MAX];
|
||||
for (i = 1; i < argc; i++) {
|
||||
if (dlopen(argv[i], RTLD_NOW)) {
|
||||
fprintf(stdout, "dlopen() of \"%s\" succeeded.\n",
|
||||
argv[i]);
|
||||
} else {
|
||||
snprintf(buf, sizeof(buf), "./%s", argv[i]);
|
||||
if ((stat(buf, &st) == 0) && dlopen(buf, RTLD_NOW)) {
|
||||
fprintf(stdout, "dlopen() of \"./%s\" "
|
||||
"succeeded.\n", argv[i]);
|
||||
} else {
|
||||
fprintf(stdout, "dlopen() of \"%s\" failed: "
|
||||
"%s\n", argv[i], dlerror());
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
12
eggdrop/utf8.patch
Normal file
12
eggdrop/utf8.patch
Normal file
@@ -0,0 +1,12 @@
|
||||
diff -Nura e2/src/tcl.c e1/src/tcl.c
|
||||
--- e2/src/tcl.c 2011-09-10 01:37:53.000000000 +0400
|
||||
+++ e1/src/tcl.c 2016-10-08 01:25:00.830082096 +0300
|
||||
@@ -863,7 +863,7 @@
|
||||
}
|
||||
|
||||
if (encoding == NULL) {
|
||||
- encoding = "iso8859-1";
|
||||
+ encoding = "utf-8";
|
||||
}
|
||||
|
||||
Tcl_SetSystemEncoding(NULL, encoding);
|
Reference in New Issue
Block a user