idutils stable port information

# Initial Data
Package: idutils
Version: 4.2
Revision: 1
Description: Utilities for manipulating ID databases
License: GPL
Maintainer: John Ridgway

# Dependencies
Depends: emacsen, libiconv, libgettext3-shlibs
BuildDepends: fink (>= 0.25), libgettext3-dev
# Provides:
# Conflicts:
# BuildConflicts:
# Replaces:
# Recommends:
# Suggests:
# Enhances:
# Pre-Depends: Only use after discussion on developer list
# Essential: false or true
# BuildDependsOnly: false or true

# Unpack
Source: gnu
Source-MD5: 4bbd2cb0d566ab29e41088cc028ad710

# Patch Phase
# UpdateConfigGuess: false or true
# UpdateConfigGuessInDirs:
# UpdateLibtool: false or true
# UpdateLibtoolInDirs:
# UpdatePoMakefile: false or true
PatchFile: idutils.patch
PatchFile-MD5: 120b336090bb55e92356513e2f3e8a90
PatchScript: <<
sed 's|@PREFIX@|%p|g' < %{PatchFile} | patch -p1
<<

# Compile Phase
# ConfigureParams will automatically include --prefix=%p at start
ConfigureParams: --infodir=%p/share/info --mandir=%p/share/man

# Install Phase
InstallScript: <<
make install prefix=%i
rm %i/share/emacs/site-lisp/idutils.elc
mv %i/bin/gid %i/bin/grepid
install -m 755 -d %i/etc/emacs/site-start.d
install -m 644 fink/50%n.el %i/etc/emacs/site-start.d/50%n.el

install -m 755 -d %i/lib/emacsen-common/packages/{install,remove}
install -m 755 fink/%n-install %i/lib/emacsen-common/packages/install/%n
install -m 755 fink/%n-remove %i/lib/emacsen-common/packages/remove/%n
<<
DocFiles: ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL NEWS README THANKS TODO
# Shlibs:
# RuntimeVars:

# Build Phase
# PreInstScript:
PostInstScript: %p/lib/emacsen-common/emacs-package-install %n
PreRmScript: %p/lib/emacsen-common/emacs-package-remove %n
# PostRmScript:
# ConfFiles:
# InfoDocs:
# DaemonicFile:
# DaemonicName:

# Additional Data
Homepage: http://www.gnu.org/software/idutils/
DescDetail: <<

An 'ID database' is a binary file containing a list of file names, a
list of tokens, and a sparse matrix indicating which tokens appear
in which files.

With this database and some tools to query it, many text-searching
tasks become simpler and faster. For example, you can list all
files that reference a particular `#include' file throughout a huge
source hierarchy, search for all the memos containing references to
a project, or automatically invoke an editor on all files containing
references to some function or variable. Anyone with a large
software project to maintain, or a large set of text files to
organize, can benefit from the ID utilities.

Although the name `ID' is short for `identifier', the ID utilities
handle more than just identifiers; they also treat other kinds of
tokens, most notably numeric constants, and the contents of certain
character strings.
<<
# DescUsage: <<
#
# <<
# DescPackaging: <<
#
# <<
DescPort: <<
This port renames gid to grepid to avoid interfering with the GNU coreutils
package.
<<

idutils stable port .patch

diff -Naur --exclude='*~' idutils/fink/50idutils.el idutils.fink/fink/50idutils.el
--- idutils/fink/50idutils.el 1969-12-31 18:00:00.000000000 -0600
+++ idutils.fink/fink/50idutils.el 2007-12-26 21:11:37.000000000 -0600
@@ -0,0 +1,1 @@
+(autoload 'gid "idutils")
diff -Naur --exclude='*~' idutils/fink/idutils-install idutils.fink/fink/idutils-install
--- idutils/fink/idutils-install 1969-12-31 18:00:00.000000000 -0600
+++ idutils.fink/fink/idutils-install 2007-12-15 15:04:19.000000000 -0600
@@ -0,0 +1,28 @@
+#!/bin/bash -e
+#
+# install file for the fink idutils emacs package.
+
+set -o posix
+
+FLAVOR=${1}
+
+echo >&2 "install/idutils: Handling install of emacsen flavor ${FLAVOR}"
+
+if [ ${FLAVOR} == emacs ]
+then
+ # Nothing to do, say nothing
+ exit 0
+fi
+
+echo >&2 -n "install/idutils: Byte-compiling for ${FLAVOR}..."
+mkdir -p @PREFIX@/share/${FLAVOR}/site-lisp/idutils
+ln -s -f @PREFIX@/share/emacs/site-lisp/idutils.el @PREFIX@/share/${FLAVOR}/site-lisp/idutils.el
+
+cd @PREFIX@/share/${FLAVOR}/site-lisp;
+
+(${FLAVOR} --no-init-file -batch -f batch-byte-compile idutils.el 2>&1) | gzip -9qf > @PREFIX@/share/doc/idutils/CompilationLog-${FLAVOR}.gz
+
+echo >&2 "done."
+echo >&2 "install/idutils: Compilation log saved in @PREFIX@/share/doc/idutils/CompilationLog-${FLAVOR}.gz."
+
+exit 0
diff -Naur --exclude='*~' idutils/fink/idutils-remove idutils.fink/fink/idutils-remove
--- idutils/fink/idutils-remove 1969-12-31 18:00:00.000000000 -0600
+++ idutils.fink/fink/idutils-remove 2007-12-10 18:35:39.000000000 -0600
@@ -0,0 +1,15 @@
+#!/bin/bash -e
+#
+# This is the Fink version of the idutils emacs package.
+set -o posix
+
+FLAVOR=${1}
+
+echo "remove/idutils: Handling removal for emacsen flavor ${FLAVOR}"
+
+echo >&2 -n "remove/idutils: Purging compilation log and byte-compiled files for ${FLAVOR}..."
+rm -f @PREFIX@/share/doc/idutils/CompilationLog-${FLAVOR}.gz
+rm -Rf @PREFIX@/share/${FLAVOR}/site-lisp/idutils
+echo >&2 "done."
+
+exit 0
--- idutils.orig/lisp/idutils.el
+++ idutils/lisp/idutils.el
@@ -34,7 +34,7 @@
(require 'compile)
(provide 'idutils)

-(defvar gid-command "gid" "The command run by the gid function.")
+(defvar gid-command "grepid" "The command run by the gid function.")

(defun gid (args)
"Run gid, with user-specified ARGS, and collect output in a buffer.

idutils _unstable_ port .patch