summaryrefslogtreecommitdiff
path: root/misc/xapian-omega/xapian-omega.SlackBuild
diff options
context:
space:
mode:
authorRobby Workman <rworkman@slackbuilds.org>2011-01-29 23:19:14 -0600
committerRobby Workman <rworkman@slackbuilds.org>2011-01-30 09:15:31 -0600
commitfd3959b6dd723aa56550f0fefeb9a59848cdec3d (patch)
tree1041875ca2d232d2ad532116c08f1d799de7720b /misc/xapian-omega/xapian-omega.SlackBuild
parent1351898b8fef415a3e11ddb1b7f68459b526646c (diff)
downloadslackbuilds-fd3959b6dd723aa56550f0fefeb9a59848cdec3d.tar.gz
misc/xapian-omega: Fixed numerous packaging issues
Thanks to Charles (maintainer) and upstream for all of the help with this. Hopefully we've got it right this time :-) Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'misc/xapian-omega/xapian-omega.SlackBuild')
-rw-r--r--misc/xapian-omega/xapian-omega.SlackBuild48
1 files changed, 21 insertions, 27 deletions
diff --git a/misc/xapian-omega/xapian-omega.SlackBuild b/misc/xapian-omega/xapian-omega.SlackBuild
index 5f4ea65163..3893f251c5 100644
--- a/misc/xapian-omega/xapian-omega.SlackBuild
+++ b/misc/xapian-omega/xapian-omega.SlackBuild
@@ -26,11 +26,9 @@
PRGNAM=xapian-omega
VERSION=${VERSION:-1.2.4}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
-HTTPD_DIR=${HTTPD_DIR:-/srv/httpd}
-
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
@@ -73,6 +71,9 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+# Use /etc/xapian-omega.conf for the config file
+patch -p1 < $CWD/use_xapian-omega.conf_for_configfile.patch
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
@@ -93,43 +94,36 @@ find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
find $PKG/usr/man -type f -exec gzip -9 {} \;
-# Install (but don't clobber) a config file
-mv $PKG/etc/omega.conf $PKG/etc/omega.conf.new
-
-# Handle the CGI stuff
-mkdir -p $PKG/var/lib/omega/templates $PKG/$HTTPD_DIR/{cgi-bin,icons/omega}
-cp -a templates/* $PKG/var/lib/omega/templates
-mv $PKG/usr/lib${LIBDIRSUFFIX}/xapian-omega/bin/omega $PKG/$HTTPD_DIR/cgi-bin
-cp -a images/* $PKG/$HTTPD_DIR/icons/omega
+# Install (but don't clobber) a config file (and use our own config file)
+rm -f $PKG/etc/omega.conf
+cat $CWD/xapian-omega.conf > $PKG/etc/xapian-omega.conf.new
# This Vim syntax file is nice to have
mkdir -p $PKG/usr/share/vim/vim72/syntax
cp -a extra/omegascript.vim $PKG/usr/share/vim/vim72/syntax
-# Create the otherwise missing directories listed in /etc/omega
-mkdir -p $PKG/var/lib/omega/{cdb,data} $PKG/var/log/omega
+# Create the otherwise missing directories listed in /etc/xapian-omega.conf
+mkdir -p $PKG/var/lib/xapian-omega/{cdb,data} $PKG/var/log/xapian-omega
+
+mkdir -p $PKG/var/lib/xapian-omega/templates
+cat << EOF > $PKG/var/lib/xapian-omega/templates/README
+Example templates are in /usr/doc/$PRGNAM-$VERSION/examples/templates/
+You will need to copy them to this directory and edit as desired.
+EOF
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
AUTHORS COPYING ChangeLog INSTALL NEWS README TODO \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+ln -s /var/lib/xapian-omega/templates/README $PKG/usr/doc/$PRGNAM-$VERSION/README.templates
-# !! TODO !! #
-# I'm leaving these next few lines commented, because, well, to be honest,
-# I don't like them. I don't see a compelling reason to change the structure
-# that upstream installs (and recommends in the .spec file shipped with the
-# source). If there's some compelling reason to change (and harmony with
-# a Debian package does not qualify), then I'll be happy to reconsider.
-# -- rworkman
-#
# Adjustments to harmonise with the Debian package created by Xapian developer Olly
-#mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/examples
-#mv $PKG/usr/bin/{dbi2omega,htdig2omega,mbox2omega} $PKG/usr/doc/$PRGNAM-$VERSION/examples
-#mv $PKG/usr/share/omega/* $PKG/usr/doc/$PRGNAM-$VERSION/examples
-# Extra example (not in Olly's Debian package)
-#mv $PKG/usr/lib${LIBDIRSUFFIX}/xapian-omega/bin/outlookmsg2html $PKG/usr/doc/$PRGNAM-$VERSION/examples
-# !! END TODO !! #
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/examples
+mv $PKG/usr/bin/{dbi2omega,htdig2omega,mbox2omega} $PKG/usr/doc/$PRGNAM-$VERSION/examples
+mv $PKG/usr/share/omega/* $PKG/usr/doc/$PRGNAM-$VERSION/examples
+cp -a templates $PKG/usr/doc/$PRGNAM-$VERSION/examples
+rmdir $PKG/usr/share/omega
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc