Debian Patch
Norman Jordan
njordan at shaw.ca
Wed Apr 30 11:50:09 UTC 2003
Here is a patch for that applies to using Gideon on Debian systems.
These are the changes that I made:
* Created a new package gideon-plugins
* Fixed up the build dependencies
* Corrected path to htsearch
* Corrected configure options in admin/debianrules
* Now creates a global documentation index on installation
* Added a weekly cron job to update the global documentation index
* Modified to support a global documentation index if there is one
* Added support for building with java support (off by default)
Thanks.
--
Norman Jordan <njordan at shaw.ca>
-------------- next part --------------
diff -rNu kdevelop/admin/debianrules gideon-2.999/admin/debianrules
--- kdevelop/admin/debianrules 2003-02-09 20:47:12.000000000 -0800
+++ gideon-2.999/admin/debianrules 2003-04-29 17:47:59.000000000 -0700
@@ -87,7 +87,7 @@
print STDOUT "export INSTALL_DATA=install -p -c -m 644\n";
print STDOUT "configkde=$enable_debug $enable_final --disable-rpath --prefix=\$(kde_prefix) --libexecdir=\$(kde_bindir) --sysconfdir=\$(sysconfdir) --libdir=\$(kde_libdir) --includedir=\$(kde_includedir) --with-qt-includes=/usr/include/qt3 --mandir=\$(mandir) --infodir=\$(infodir)\n";
- print STDOUT "configkdevelop=$enable_debug $enable_final --disable-rpath --enable-docbase --enable-kdoc2 --libdir=\$(kde_libdir) --includedir=\$(kde_includedir) --with-qt-includes=/usr/include/qt3 --mandir=\$(mandir) --with-kdelibsdoc-dir=/usr/share/doc/kdelibs3-doc/html\n";
+ print STDOUT "configkdevelop=$enable_debug $enable_final --disable-rpath --enable-docbase --enable-kdoc2 --libdir=\$(kde_libdir) --includedir=\$(kde_includedir) --with-qt-includes=/usr/include/qt3 --mandir=\$(mandir) --with-kdelibsdoxy-dir=/usr/share/doc/kde/HTML/en/kdelibs-apidocs\n";
print STDOUT "configkdepim=$enable_debug $enable_final --disable-rpath --with-extra-includes=/usr/include/libpisock --enable-shared --prefix=\$(kde_prefix) --libexecdir=\$(kde_bindir) --with-qt-includes=/usr/include/qt3 --mandir=\$(mandir) --infodir=\$(infodir)\n";
exit
diff -rNu kdevelop/parts/doctreeview/docsearchdlg.cpp gideon-2.999/parts/doctreeview/docsearchdlg.cpp
--- kdevelop/parts/doctreeview/docsearchdlg.cpp 2003-03-24 13:34:52.000000000 -0800
+++ gideon-2.999/parts/doctreeview/docsearchdlg.cpp 2003-04-28 11:07:01.000000000 -0700
@@ -15,6 +15,7 @@
#include <qcombobox.h>
#include <qfile.h>
+#include <qdir.h>
#include <qhbox.h>
#include <qlayout.h>
#include <qlabel.h>
@@ -102,11 +103,30 @@
config.setGroup("htdig");
QString exe = config.readEntry("htsearch", kapp->dirs()->findExe("htsearch"));
if (exe.isEmpty()) {
- kdDebug() << "Can not find htsearch" << endl;
- return false;
+ // Check for htsearch in /usr/lib/cgi-bin (for Debian systems)
+ exe = "/usr/lib/cgi-bin/htsearch";
+ QFile f(exe);
+ if (!f.exists()) {
+ kdDebug() << "Can not find htsearch" << endl;
+ return false;
+ }
}
QString indexdir = kapp->dirs()->saveLocation("data", "kdevdoctreeview/helpindex");
+ QDir d;
+ if(indexdir.isEmpty() || !QFile::exists(indexdir + "/htdig.conf")) {
+ if(QFile::exists("/var/lib/gideon/helpindex/htdig.conf")) {
+ indexdir = "/var/lib/gideon/helpindex";
+ } else {
+ kdDebug() << "Can not find the htdig configuration file" << endl;
+ return false;
+ }
+ }
+
+ QString savedir = kapp->dirs()->saveLocation("data", "kdevdoctreeview/helpindex");
+ if(!d.exists(savedir)) {
+ d.mkdir(savedir);
+ }
QString query = QString("words=%1;method=%2;matchesperpage=%3;format=%4;sort=%5")
.arg(searchterm_edit->text())
@@ -155,7 +175,7 @@
searchResult = searchResult.replace(QRegExp("Content-type: text/html"), "");
// dump the search result
- QFile f(indexdir + "/results.html");
+ QFile f(savedir + "/results.html");
if (f.open(IO_WriteOnly)) {
QTextStream ts(&f);
ts << searchResult << endl;
diff -rNu kdevelop/debian/changelog gideon-2.999/debian/changelog
--- kdevelop/debian/changelog 2003-03-02 03:49:53.000000000 -0800
+++ gideon-2.999/debian/changelog 2003-04-29 17:43:47.000000000 -0700
@@ -1,3 +1,16 @@
+gideon (1:2.999-0cvs20030429) unstable; urgency=low
+
+ * Created a new package gideon-plugins
+ * Fixed up the build dependencies
+ * Corrected path to htsearch
+ * Corrected configure options in admin/debianrules
+ * Now creates a global documentation index on installation
+ * Added a weekly cron job to update the global documentation index
+ * Modified to support a global documentation index if there is one
+ * Added support for building with java support (off by default)
+
+ -- Norman Jordan <njordan at debian.org> Tue, 29 Apr 2003 17:42:39 -0700
+
gideon (1:2.999+cvs20030301-0woody1) unstable; urgency=low
* Woody rebuild on KDE_3_1_BRANCH
diff -rNu kdevelop/debian/control gideon-2.999/debian/control
--- kdevelop/debian/control 2003-03-02 03:49:54.000000000 -0800
+++ gideon-2.999/debian/control 2003-04-29 17:42:25.000000000 -0700
@@ -1,13 +1,13 @@
Source: gideon
-Section: devel
+Section: kde
Priority: optional
-Maintainer: Eray Ozkural (exa) <erayo at cs.bilkent.edu.tr>
-Build-Depends: debhelper (>> 4.0.0), kdelibs4-dev, gettext, autoconf, automake | automake1.6, kdelibs4-doc | kdelibs-doc, qt-doc | qt3-doc, flex
+Maintainer: Norman Jordan <njordan at debian.org>
+Build-Depends: debhelper (>> 4.0.0), kdelibs4-dev, gettext, autoconf, automake1.6, kdelibs4-doc | kdelibs-doc, qt-doc | qt3-doc, flex, libdb4.1-dev | libdb4.0-dev | libdb3-dev
Standards-Version: 3.5.6.0
Package: gideon
Architecture: any
-Depends: ${shlibs:Depends}, autoconf, automake | automake1.6, kdebase-bin, gideon-data
+Depends: ${shlibs:Depends}, autoconf, automake | automake1.6, kdebase-bin, gideon-data, gideon-plugins
Recommends: make, gideon-doc
Suggests: libqt3-mt-dev, qt3-doc, kdbg, kdelibs-dev, kdebase, kdelibs4-doc, htdig, sgmltools, gettext, a2ps, enscript, gv, qt3-tools, glimpse, ark, kpaint, kbabel, kiconedit, gdb, kdesdk-scripts, graphviz, stl-manual
Description: An IDE for Unix/X11 - development version
@@ -20,6 +20,7 @@
for terminal programs and GUI programs using Qt, KDE or GNOME.
Package: gideon-doc
+Section: doc
Architecture: all
Suggests: qt-doc, python2.2-doc, glib-reference, gtk-reference, gnome-dev-doc
Description: An IDE for Unix/X11 - documentation
@@ -62,3 +63,17 @@
for terminal programs and GUI programs using Qt, KDE or GNOME.
.
This package contains development files for KDevelop.
+
+Package: gideon-plugins
+Architecture: any
+Depends: ${shlibs:Depends}, gideon (= ${Source-Version})
+Description: An IDE for Unix/X11 - development files
+ KDevelop is an easy to use Integrated Development Environment
+ for developing C/C++ applications under X11. It features
+ project management, an advanced editor, a class browser
+ and an integrated debugger.
+ .
+ The application wizard can generate fully functional projects
+ for terminal programs and GUI programs using Qt, KDE or GNOME.
+ .
+ This package contains the plugins for KDevelop.
diff -rNu kdevelop/debian/cron.weekly gideon-2.999/debian/cron.weekly
--- kdevelop/debian/cron.weekly 1969-12-31 16:00:00.000000000 -0800
+++ gideon-2.999/debian/cron.weekly 2003-04-29 17:42:25.000000000 -0700
@@ -0,0 +1,4 @@
+#!/bin/sh
+# Used to update the documentation index for KDevelop
+
+test -f "/usr/lib/gideon/update_doc_index.sh" && "/usr/lib/gideon/update_doc_index.sh" > /dev/null 2>&1
diff -rNu kdevelop/debian/debiandirs gideon-2.999/debian/debiandirs
--- kdevelop/debian/debiandirs 2003-03-02 03:49:54.000000000 -0800
+++ gideon-2.999/debian/debiandirs 2003-04-29 17:53:21.000000000 -0700
@@ -28,5 +28,5 @@
export ARTSCCONFIG=/usr/bin/artsc-config
export INSTALL_DATA=install -p -c -m 644
configkde=--disable-debug --enable-final --disable-rpath --prefix=$(kde_prefix) --libexecdir=$(kde_bindir) --sysconfdir=$(sysconfdir) --libdir=$(kde_libdir) --includedir=$(kde_includedir) --with-qt-includes=/usr/include/qt3 --mandir=$(mandir) --infodir=$(infodir)
-configkdevelop=--disable-debug --enable-final --disable-rpath --enable-docbase --enable-kdoc2 --libdir=$(kde_libdir) --includedir=$(kde_includedir) --with-qt-includes=/usr/include/qt3 --mandir=$(mandir) --with-kdelibsdoc-dir=/usr/share/doc/kde/HTML/en/kdelibs-apidocs
+configkdevelop=--disable-debug --enable-final --disable-rpath --enable-docbase --enable-kdoc2 --libdir=$(kde_libdir) --includedir=$(kde_includedir) --with-qt-includes=/usr/include/qt3 --mandir=$(mandir) --with-kdelibsdoxy-dir=/usr/share/doc/kde/HTML/en/kdelibs-apidocs
configkdepim=--disable-debug --enable-final --disable-rpath --with-extra-includes=/usr/include/libpisock --enable-shared --prefix=$(kde_prefix) --libexecdir=$(kde_bindir) --with-qt-includes=/usr/include/qt3 --mandir=$(mandir) --infodir=$(infodir)
diff -rNu kdevelop/debian/gideon-data.install gideon-2.999/debian/gideon-data.install
--- kdevelop/debian/gideon-data.install 2002-09-25 04:16:12.000000000 -0700
+++ gideon-2.999/debian/gideon-data.install 2003-04-29 17:42:25.000000000 -0700
@@ -2,5 +2,3 @@
debian/tmp/usr/share/apps
debian/tmp/usr/share/icons
debian/tmp/usr/share/mimelnk
-debian/tmp/usr/share/services
-debian/tmp/usr/share/servicetypes
diff -rNu kdevelop/debian/gideon-plugins.install gideon-2.999/debian/gideon-plugins.install
--- kdevelop/debian/gideon-plugins.install 1969-12-31 16:00:00.000000000 -0800
+++ gideon-2.999/debian/gideon-plugins.install 2003-04-29 17:42:25.000000000 -0700
@@ -0,0 +1,3 @@
+debian/tmp/usr/share/services
+debian/tmp/usr/share/servicetypes
+debian/tmp/usr/lib/kde3/*
diff -rNu kdevelop/debian/gideon.install gideon-2.999/debian/gideon.install
--- kdevelop/debian/gideon.install 2003-03-02 03:49:54.000000000 -0800
+++ gideon-2.999/debian/gideon.install 2003-04-29 17:42:25.000000000 -0700
@@ -2,4 +2,6 @@
debian/tmp/usr/bin/*
debian/tmp/usr/lib/libkdevelop.so.*
debian/tmp/usr/lib/libkdevelopqextmdi.so.*
-debian/tmp/usr/lib/kde3/*
+debian/tmp/usr/lib/libkdevcatalog.so.*
+debian/tmp/usr/lib/libkdevcppparser.so.*
+debian/tmp/usr/lib/gideon
diff -rNu kdevelop/debian/gideon.postinst gideon-2.999/debian/gideon.postinst
--- kdevelop/debian/gideon.postinst 1969-12-31 16:00:00.000000000 -0800
+++ gideon-2.999/debian/gideon.postinst 2003-04-29 17:42:25.000000000 -0700
@@ -0,0 +1,5 @@
+#!/bin/sh
+set -e
+
+test -f "/usr/lib/gideon/update_doc_index.sh" && "/usr/lib/gideon/update_doc_index.sh" > /dev/null 2>&1 &
+
diff -rNu kdevelop/debian/gideon.postrm gideon-2.999/debian/gideon.postrm
--- kdevelop/debian/gideon.postrm 1969-12-31 16:00:00.000000000 -0800
+++ gideon-2.999/debian/gideon.postrm 2003-04-29 17:42:25.000000000 -0700
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+# postrm - finish removal of the 'gideon'-package
+
+GLOBAL_KDEVDOCTREEVIEW_DIR="/var/lib/gideon";
+GLOBAL_HTDIG_DIR="$GLOBAL_KDEVDOCTREEVIEW_DIR/helpindex"
+
+if [ "$1" = "purge" ]; then
+ rm -rf "$GLOBAL_HTDIG_DIR"
+ rm -rf "$GLOBAL_KDEVDOCTREEVIEW_DIR"
+fi
diff -rNu kdevelop/debian/rules gideon-2.999/debian/rules
--- kdevelop/debian/rules 2003-03-02 03:49:54.000000000 -0800
+++ gideon-2.999/debian/rules 2003-04-29 17:42:25.000000000 -0700
@@ -23,6 +23,12 @@
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
endif
+ifneq (,$(findstring withjava,$(DEB_BUILD_OPTIONS)))
+ JAVA_FLAGS=--enable-javasupport
+endif
+ifneq (,$(JAVA_HOME))
+ JAVA_FLAGS+= --with-java=$(JAVA_HOME)
+endif
ifeq ($(DEB_BUILD_GNU_TYPE),alpha-linux)
export CFLAGS +=-O0 -mieee
@@ -63,7 +69,7 @@
# make build directory
- ./configure $(configkdevelop) --disable-final
+ ./configure $(configkdevelop) $(JAVA_FLAGS) --disable-final
touch configure-stamp
@@ -99,14 +105,14 @@
# Remove build tree
# if Makefile exists run distclean
- #if test -f Makefile; then \
- # $(MAKE) distclean; \
- #fi
-
- if test -d CVS; then \
- $(MAKE) -f admin/Makefile.common cvs-clean ;\
+ if test -f Makefile; then \
+ $(MAKE) distclean; \
fi
+# if test -d CVS; then \
+# $(MAKE) -f admin/Makefile.common cvs-clean ;\
+# fi
+
dh_clean
install: DH_OPTIONS=
@@ -118,6 +124,9 @@
$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
+ -install -d $(CURDIR)/debian/tmp/usr/lib/gideon
+ -install debian/update_doc_index.sh $(CURDIR)/debian/tmp/usr/lib/gideon
+
dh_install --list-missing
# This single target is used to build all the packages, all at once, or
@@ -137,9 +146,9 @@
# dh_installpam
dh_installmime
dh_installinit
-# dh_installcron
+ dh_installcron
# dh_installinfo
- dh_undocumented
+# dh_undocumented
dh_installman
dh_strip
dh_link
diff -rNu kdevelop/debian/update_doc_index.sh gideon-2.999/debian/update_doc_index.sh
--- kdevelop/debian/update_doc_index.sh 1969-12-31 16:00:00.000000000 -0800
+++ gideon-2.999/debian/update_doc_index.sh 2003-04-29 17:42:25.000000000 -0700
@@ -0,0 +1,118 @@
+#!/bin/sh
+
+set -e
+
+if [ ! -x /usr/bin/htdig -o ! -x /usr/bin/htmerge ]; then
+ exit 0
+fi
+
+QTDOC_PACKAGE="qt3-doc"
+QTDOC_DIR="/usr/share/qt3/doc/html"
+KDELIBSDOC_PACKAGE="kdelibs4-doc"
+KDELIBSDOC_DIR="/usr/share/doc/kde/HTML/en/kdelibs-apidocs"
+KDEVELOPDOC_PACKAGE="gideon-doc"
+KDEVELOPDOC_DIR="/usr/share/doc/kde/HTML/en/kdevelop"
+
+# Checks if a package is installed
+check_package_status() {
+ local package=${1}
+
+ if dpkg --status $package 2> /dev/null | grep '^Status: .* installed$' > /dev/null; then
+ echo "yes"
+ else
+ echo "no"
+ fi
+}
+
+GLOBAL_KDEVDOCTREEVIEW_DIR="/var/lib/gideon"
+GLOBAL_HTDIG_DIR="$GLOBAL_KDEVDOCTREEVIEW_DIR/helpindex"
+HTDIG_DATA_DIR="/usr/share/apps/kdevdoctreeview"
+
+get_indexed_versions() {
+ if [ -e "$GLOBAL_HTDIG_DIR/package_versions" ]; then
+ . "$GLOBAL_HTDIG_DIR/package_versions"
+ else
+ QTDOC_VERSION="0.0"
+ KDEDOC_VERSION="0.0"
+ KDEVELOPDOC_VERSION="0.0"
+ fi
+}
+
+doc_dirs=""
+
+get_indexed_versions
+
+status=`check_package_status "$QTDOC_PACKAGE"`
+version=`dpkg --status $QTDOC_PACKAGE 2> /dev/null | grep '^Version: ' | cut -d ' ' -f 2`
+if [ $status == "yes" ] && dpkg --compare-versions $version gt $QTDOC_VERSION; then
+ doc_dirs="$doc_dirs $QTDOC_DIR"
+ QTDOC_VERSION="$version"
+fi
+
+status=`check_package_status "$KDELIBSDOC_PACKAGE"`
+version=`dpkg --status $KDELIBSDOC_PACKAGE 2> /dev/null | grep '^Version: ' | cut -d ' ' -f 2`
+if [ $status == "yes" ] && dpkg --compare-versions $version gt $KDEDOC_VERSION; then
+ doc_dirs="$doc_dirs $KDELIBSDOC_DIR"
+ KDEDOC_VERSION="$version"
+fi
+
+status=`check_package_status "$KDEVELOPDOC_PACKAGE"`
+version=`dpkg --status $KDEVELOPDOC_PACKAGE 2> /dev/null | grep '^Version: ' | cut -d ' ' -f 2`
+if [ $status == "yes" ] && dpkg --compare-versions $version gt $KDEVELOPDOC_VERSION; then
+ doc_dirs="$doc_dirs $KDEVELOPDOC_DIR"
+ KDEVELOPDOC_VERSION="$version"
+fi
+
+if [ "$doc_dirs" == "" ]; then
+ exit 0
+fi
+
+# Create the directory global htdig directory if necessary
+if [ ! -d "$GLOBAL_KDEVDOCTREEVIEW_DIR" ]; then
+ mkdir "$GLOBAL_KDEVDOCTREEVIEW_DIR"
+fi
+
+if [ ! -d "$GLOBAL_HTDIG_DIR" ]; then
+ mkdir "$GLOBAL_HTDIG_DIR"
+ initial="-i"
+else
+ if [ ! -e "$GLOBAL_HTDIG_DIR/db.docdb" ]; then
+ initial="-i"
+ else
+ initial=""
+
+ fi
+fi
+
+# Create the htdig config file if necessary
+if [ ! -e "$GLOBAL_HTDIG_DIR/htdig.conf" ]; then
+ echo "database_dir: $GLOBAL_HTDIG_DIR" >"$GLOBAL_HTDIG_DIR/htdig.conf"
+ echo "local_urls: file://localhost=" >>"$GLOBAL_HTDIG_DIR/htdig.conf"
+ echo "local_urls_only: true" >>"$GLOBAL_HTDIG_DIR/htdig.conf"
+ echo "maximum_pages: 1" >>"$GLOBAL_HTDIG_DIR/htdig.conf"
+ echo "image_url_prefix: $HTDIG_DATA_DIR/pics/" >>"$GLOBAL_HTDIG_DIR/htdig.conf"
+ echo "star_image: $HTDIG_DATA_DIR/pics/star.png" >>"$GLOBAL_HTDIG_DIR/htdig.conf"
+ echo "star_blank: $HTDIG_DATA_DIR/pics/star_blank.png" >>"$GLOBAL_HTDIG_DIR/htdig.conf"
+ echo "compression_level: 6" >>"$GLOBAL_HTDIG_DIR/htdig.conf"
+ echo "max_hop_count: 0" >>"$GLOBAL_HTDIG_DIR/htdig.conf"
+ echo "search_results_wrapper: $HTDIG_DATA_DIR/en/wrapper.html" >>"$GLOBAL_HTDIG_DIR/htdig.conf"
+ echo "nothing_found_file: $HTDIG_DATA_DIR/en/nomatch.html" >>"$GLOBAL_HTDIG_DIR/htdig.conf"
+ echo "syntax_error_file: $HTDIG_DATA_DIR/en/syntax.html" >>"$GLOBAL_HTDIG_DIR/htdig.conf"
+ echo "bad_word_list: $HTDIG_DATA_DIR/en/bad_words" >>"$GLOBAL_HTDIG_DIR/htdig.conf"
+fi
+
+# Create the list of files to index
+if [ -w "$GLOBAL_HTDIG_DIR/files" -o ! -e "$GLOBAL_HTDIG_DIR/files" ]; then
+ find $QTDOC_DIR $KDELIBSDOC_DIR $KDEVELOPDOC_DIR -name "*.html" | \
+ awk 'OFS=""; {print "file://localhost", $0}' > "$GLOBAL_HTDIG_DIR/files"
+fi
+
+# Index the files
+/usr/bin/htdig $initial -s -c "$GLOBAL_HTDIG_DIR/htdig.conf" "$GLOBAL_HTDIG_DIR/files" > /dev/null 2>&1
+/usr/bin/htmerge -s -c "$GLOBAL_HTDIG_DIR/htdig.conf" > /dev/null 2>&1
+
+# Mark the current package versions as indexed
+echo "QTDOC_VERSION=\"$QTDOC_VERSION\"" > "$GLOBAL_HTDIG_DIR/package_versions"
+echo "KDEDOC_VERSION=\"$KDEDOC_VERSION\"" >> "$GLOBAL_HTDIG_DIR/package_versions"
+echo "KDEVELOPDOC_VERSION=\"$KDEVELOPDOC_VERSION\"" >> "$GLOBAL_HTDIG_DIR/package_versions"
+chmod 0764 "$GLOBAL_HTDIG_DIR/package_versions"
More information about the KDevelop-devel
mailing list