diff options
author | Robby Workman <rworkman@slackbuilds.org> | 2011-01-29 23:19:14 -0600 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2011-01-30 09:15:31 -0600 |
commit | fd3959b6dd723aa56550f0fefeb9a59848cdec3d (patch) | |
tree | 1041875ca2d232d2ad532116c08f1d799de7720b /misc/xapian-omega | |
parent | 1351898b8fef415a3e11ddb1b7f68459b526646c (diff) |
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')
-rw-r--r-- | misc/xapian-omega/README | 4 | ||||
-rw-r--r-- | misc/xapian-omega/doinst.sh | 2 | ||||
-rw-r--r-- | misc/xapian-omega/use_xapian-omega.conf_for_configfile.patch | 12 | ||||
-rw-r--r-- | misc/xapian-omega/xapian-omega.SlackBuild | 48 | ||||
-rw-r--r-- | misc/xapian-omega/xapian-omega.conf | 11 |
5 files changed, 49 insertions, 28 deletions
diff --git a/misc/xapian-omega/README b/misc/xapian-omega/README index 4ca89f3a85257..f69d94d64a329 100644 --- a/misc/xapian-omega/README +++ b/misc/xapian-omega/README @@ -2,3 +2,7 @@ Omega is an application built on Xapian, consisting of indexers and a CGI search frontend. This requires xapian-core. + +After installing xapian-omega, you will need to: +1. See /var/lib/xapian-omega/templates/README +2. Set up /usr/lib(64)/xapian-omega/bin/omega as an httpd cgi executable. diff --git a/misc/xapian-omega/doinst.sh b/misc/xapian-omega/doinst.sh index 7ece5d2656aa6..2e8a0877a6a32 100644 --- a/misc/xapian-omega/doinst.sh +++ b/misc/xapian-omega/doinst.sh @@ -10,5 +10,5 @@ config() { fi # Otherwise, we leave the .new copy for the admin to consider... } -config etc/omega.conf.new +config etc/xapian-omega.conf.new diff --git a/misc/xapian-omega/use_xapian-omega.conf_for_configfile.patch b/misc/xapian-omega/use_xapian-omega.conf_for_configfile.patch new file mode 100644 index 0000000000000..d6b01f316ad14 --- /dev/null +++ b/misc/xapian-omega/use_xapian-omega.conf_for_configfile.patch @@ -0,0 +1,12 @@ +diff -Nur xapian-omega-1.2.4.orig//Makefile.in xapian-omega-1.2.4/Makefile.in +--- xapian-omega-1.2.4.orig//Makefile.in 2010-12-19 06:54:47.000000000 -0600 ++++ xapian-omega-1.2.4/Makefile.in 2011-01-16 14:19:55.516062731 -0600 +@@ -411,7 +411,7 @@ + xapian-omega.spec + + AM_CPPFLAGS = \ +- -DCONFIGFILE_SYSTEM=\"$(sysconfdir)/omega.conf\" \ ++ -DCONFIGFILE_SYSTEM=\"$(sysconfdir)/xapian-omega.conf\" \ + -DPKGLIBBINDIR=\"$(pkglibbindir)\" + + pkglibbindir = $(pkglibdir)/bin diff --git a/misc/xapian-omega/xapian-omega.SlackBuild b/misc/xapian-omega/xapian-omega.SlackBuild index 5f4ea6516329c..3893f251c51e3 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 diff --git a/misc/xapian-omega/xapian-omega.conf b/misc/xapian-omega/xapian-omega.conf new file mode 100644 index 0000000000000..d798bda556d92 --- /dev/null +++ b/misc/xapian-omega/xapian-omega.conf @@ -0,0 +1,11 @@ +# Directory containing Xapian databases: +database_dir /var/lib/xapian-omega/data + +# Directory containing OmegaScript templates: +template_dir /var/lib/xapian-omega/templates + +# Directory to write Omega logs to: +log_dir /var/log/xapian-omega + +# Directory containing any cdb files for the $lookup OmegaScript command: +cdb_dir /var/lib/xapian-omega/cdb |