summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--network/irssi-python/README28
-rw-r--r--network/irssi-python/irssi-python.SlackBuild126
-rw-r--r--network/irssi-python/irssi-python.info12
-rw-r--r--network/irssi-python/slack-desc19
4 files changed, 185 insertions, 0 deletions
diff --git a/network/irssi-python/README b/network/irssi-python/README
new file mode 100644
index 0000000000..221c1f7730
--- /dev/null
+++ b/network/irssi-python/README
@@ -0,0 +1,28 @@
+irssi-python (Python 2.x scripting support for irssi)
+
+irssi-python embeds Python into an Irssi module, providing most of the
+functionality of the Perl wrapper to Python scripts using a similar
+interface.
+
+After the package is installed, you can test it from within irssi
+by running "/load python". If this works OK, you can configure irssi
+to always load the module with a command like:
+
+$ echo 'load python' >> ~/.irssi/startup
+
+Beware of upgrades: if Slackware's irssi or python packages are ever
+upgraded, you'll almost certainly have to rebuild & reinstall this.
+Symptoms may include irssi ABI version mismatch errors or segfaults.
+
+If you get a warning about an irssi version mismatch when building
+irssi-python, first update your irssi package to the latest one in
+patches/:
+
+# slackpkg update
+# slackpkg upgrade irssi
+
+If you still get the warning, set the environment variable IRSSI_VER
+to the correct irssi version. You'll also have to have the irssi source
+tarball in the SlackBuild directory. It should be available from:
+
+http://ftp.slackware.com/pub/slackware/slackware-14.2/patches/source/irssi/
diff --git a/network/irssi-python/irssi-python.SlackBuild b/network/irssi-python/irssi-python.SlackBuild
new file mode 100644
index 0000000000..890a129025
--- /dev/null
+++ b/network/irssi-python/irssi-python.SlackBuild
@@ -0,0 +1,126 @@
+#!/bin/sh
+
+# Slackware build script for irssi-python
+
+# Written by B. Watson (yalhcru@gmail.com)
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+# A note about the download URL: I'm stuck using the github
+# auto-generated one, even though upstream created a static release
+# tarball. Unfortunately, the release tarball is un-buildable because it's
+# missing various files. Also it's missing the entire doc/ directory.
+
+PRGNAM=irssi-python
+VERSION=${VERSION:-test4}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+# Unfortunately we have to pick an irssi version to be the default,
+# because the DOWNLOAD links are static (can't have $VERSION or such in
+# them). 1.0.7 is the latest in patches/ at the time of this writing.
+IRSSI_VER="${IRSSI_VER:-1.0.7}"
+
+# Alert the user (but don't stop the build) if $IRSSI_VER doesn't match
+# the installed version of irssi.
+SYS_IRSSI="$( irssi --version | cut -d' ' -f2 )"
+if [ "$IRSSI_VER" != "$SYS_IRSSI" ]; then
+ cat <<EOF
+***
+*** WARNING: building for irssi $IRSSI_VER, but installed version is $SYS_IRSSI!
+*** Continuing build in 5 seconds, or press ^C to abort.
+***
+EOF
+ sleep 5
+fi
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM
+mkdir -p $PRGNAM
+cd $PRGNAM
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+tar xvf $CWD/irssi-$IRSSI_VER.tar.xz
+chown -R root:root .
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
+
+# According to its INSTALL doc, irssi-python is supposed to need
+# "the configured Irssi sources". But test4 builds fine without
+# running ./configure in the irssi source dir. Leaving this here,
+# commented out, for reference.
+## cd irssi-$IRSSI_VER
+## CFLAGS="$SLKCFLAGS" \
+## ./configure \
+## --prefix=/usr \
+## --libdir=/usr/lib${LIBDIRSUFFIX} \
+## --mandir=/usr/man \
+## --sysconfdir=/etc \
+## --docdir=/usr/doc/irssi-$VERSION \
+## --enable-ipv6 \
+## --with-textui \
+## --with-proxy \
+## --with-perl-lib=vendor \
+## --build=$ARCH-slackware-linux
+## cd $TMP/$PRGNAM
+
+cd $PRGNAM-$VERSION
+
+autoreconf -ivf -I.
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --with-irssi=$TMP/$PRGNAM/irssi-$IRSSI_VER \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --build=$ARCH-slackware-linux
+
+make -C src constants
+make
+make install-strip DESTDIR=$PKG
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a AUTHORS COPYING ChangeLog NEWS README TODO classes.txt docs/*html \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+sed "s/@IRSSI_VER@/$IRSSI_VER/" $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/network/irssi-python/irssi-python.info b/network/irssi-python/irssi-python.info
new file mode 100644
index 0000000000..fea8699379
--- /dev/null
+++ b/network/irssi-python/irssi-python.info
@@ -0,0 +1,12 @@
+PRGNAM="irssi-python"
+VERSION="test4"
+HOMEPAGE="https://github.com/irssi-import/irssi-python"
+DOWNLOAD="https://github.com/irssi-import/irssi-python/archive/test4/irssi-python-test4.tar.gz \
+ http://ftp.slackware.com/pub/slackware/slackware-14.2/patches/source/irssi/irssi-1.0.7.tar.xz"
+MD5SUM="efd8c4b284cb2b2b3313e9109cbb324a \
+ 6ebf07a03b58f7af1296cd8fdbb3619f"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="B. Watson"
+EMAIL="yalhcru@gmail.com"
diff --git a/network/irssi-python/slack-desc b/network/irssi-python/slack-desc
new file mode 100644
index 0000000000..a3607849ee
--- /dev/null
+++ b/network/irssi-python/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+irssi-python: irssi-python (Python2 scripting support for irssi)
+irssi-python:
+irssi-python: irssi-python embeds Python into an Irssi module, providing most
+irssi-python: of the functionality of the Perl wrapper to Python scripts using a
+irssi-python: similar interface.
+irssi-python: After the package is installed, you can test it from within irssi
+irssi-python: by running "/load python". If this works OK, you can configure irssi
+irssi-python: to always load the module with a command like:
+irssi-python: $ echo 'load python' >> ~/.irssi/startup
+irssi-python:
+irssi-python: This package was built for irssi-@IRSSI_VER@.