[Pkg-jed-commit] r295 - in trunk/packages/jed-extra/debian: . init
patches
Jörg Sommer
jo-guest at costa.debian.org
Mon May 22 20:53:35 UTC 2006
Author: jo-guest
Date: 2006-05-22 20:53:28 +0000 (Mon, 22 May 2006)
New Revision: 295
Added:
trunk/packages/jed-extra/debian/install
trunk/packages/jed-extra/debian/patches/grep.dpatch
trunk/packages/jed-extra/debian/patches/make_ini.dpatch
trunk/packages/jed-extra/debian/patches/rst.dpatch
Removed:
trunk/packages/jed-extra/debian/jed-extra.install.template
trunk/packages/jed-extra/debian/sort-modes.sl
Modified:
trunk/packages/jed-extra/debian/contents.txt
trunk/packages/jed-extra/debian/control
trunk/packages/jed-extra/debian/init/50jed-extra.sl
trunk/packages/jed-extra/debian/jed-extra-preparse.sl
trunk/packages/jed-extra/debian/patches/00list
trunk/packages/jed-extra/debian/patches/50_rfcview-require-bufutils.dpatch
trunk/packages/jed-extra/debian/rules
Log:
* control:
+ increased Standards-Version to 3.7.2 -- no changes needed
+ dropped jed and xjed from the build dependencies; they are no longer
needed
+ moved the Build-Depends-Indep to Build-Depends, because this field is
needed for the clean target and is the same as -Indep
* patches/grep.dpatch, patches/rst.dpatch, patches/make_ini.dpatch:
+ these modes are buggy; hopefully upstream fixes this before release :)
* patches/00list:
+ added the patches above
+ activated the patches for yodl and rfcview, because they are included
in the package even if as experimental modes
* jed-extra-preparse.sl:
+ there was a white space to much, which caused jed did not find the
files in /usr/share/jed/lib/
* renamed jed-extra.install.template as install
* contents.txt:
+ disabled all lines with modes not found in upstream archive -- should
we remove these lines?
* sort-modes.sl:
+ removed; its not needed anymore
* rules:
+ all the stuff that was done in sort-mode.sl implemented directly in
make with shell tools. This saves uses the dependency on jed
+ dropped the dependency from the get-orig-source target; mistake in
the last commit
+ dropped the chmod for apsmode; its not needed anymore
+ added an additional check to show all non-.sl files in /u/s/j/jed-extra
+ moved a2ps/README to mode-doc
Modified: trunk/packages/jed-extra/debian/contents.txt
===================================================================
--- trunk/packages/jed-extra/debian/contents.txt 2006-05-22 16:45:18 UTC (rev 294)
+++ trunk/packages/jed-extra/debian/contents.txt 2006-05-22 20:53:28 UTC (rev 295)
@@ -1,16 +1,16 @@
# Modes at Jedmodes
# ~~~~~~~~~~~~~~~~~
-#
+#
# Types: Addition Color Drop-In Enhancement
# Obsolete Utils eXperimental (or eXotic)
-#
+#
# Type Name Abstract
X a2ps Pretty-printing tools
-X apache mode for editing Apache configuration files
+#X apache mode for editing Apache configuration files
X apsmode pretty printing mode using a2ps
X autotext autotext a la MS Word
-X awk mode for editing Awk scripts
+#X awk mode for editing Awk scripts
D brief Brief editor emulation
A browse_url Functions for display of web pages from within JED.
X bufed buffer manager
@@ -33,7 +33,7 @@
O dabbrev Complete the current word looking for similar word-beginnings
U datutils Convenience functions for several Data_Types
A diagnose Diagnostic functions for SLang programmers
-X dict A dict client.
+#X dict A dict client.
X ding Ding dictionary lookup function and mode
A dictmode dict dictionary lookup (including thesaurus)
A dict-backend backends for dictmode
@@ -54,13 +54,13 @@
A ishell Interactive shell ("workbook mode")
D ispell spell checking utilities
A jedasp Try to simulate MS IIS Active Server Pages with JED
-X jedgtk slgtk dialogs for JED
-X jedmodes Utilities for the publication of modes at Jedmodes
+#X jedgtk slgtk dialogs for JED
+#X jedmodes Utilities for the publication of modes at Jedmodes
X jedscape html browser
-X kcomplete keyword completion from the syntax table
+#X kcomplete keyword completion from the syntax table
A keywords Create keyword lists for syntax tables
O kp_keydefs keydefs for the numeric keypad (now included in x-keydefs)
-D latex-jlm Yet another latex mode for Jed
+#D latex-jlm Yet another latex mode for Jed
A libdir Support for library directories with jed extensions
A life Conway's Game of Life
A listing Mode for listings of e.g. files or findings
@@ -70,14 +70,14 @@
A md5 MD5 message digest algorithm implemented in SLang
U menutils popup menu extensions
O minued Minibuffer edit mode (now in standard library)
-X misc miscellaneous modes
+#X misc miscellaneous modes
A moby-thesaurus English thesaurus via dict protocol
A mtools Interface to mtools for easy floppy read/write under UNIX
A mupad Mode for Mupad (computer algebra system) files.
E navigate "History feature" known from many browsers
E numbuf Number the buffers and bind Alt-[n] to go to buffer n
D occur occur with context
-X outline outline mode
+#X outline outline mode
X pcre Perl-compatible searching functions
A po_mode Mode for editing PO-files
A print printer interface
@@ -97,7 +97,7 @@
A temabbrv On request replaces the word at cursor with a user-defined template
X templates Open templates and do some replacements
A tm TM documentation parser and TM creation tools
-X tree Recursive directory listing utility
+#X tree Recursive directory listing utility
X turbo dynamic word completion (like in StarOffice)
U txtutils Tools for text processing (marking, string processing, formatting)
E uri Let jed handle Universal Ressource Indicators (URIs)
Modified: trunk/packages/jed-extra/debian/control
===================================================================
--- trunk/packages/jed-extra/debian/control 2006-05-22 16:45:18 UTC (rev 294)
+++ trunk/packages/jed-extra/debian/control 2006-05-22 20:53:28 UTC (rev 295)
@@ -3,8 +3,8 @@
Priority: optional
Maintainer: Debian JED Group <pkg-jed-devel at lists.alioth.debian.org>
Uploaders: Rafael Laboissiere <rafael at debian.org>
-Build-Depends-Indep: debhelper (>> 4.0.0), dpatch, jed (>= 0.99.17.111-1) | xjed (>= 0.99.17.111-1)
-Standards-Version: 3.6.2
+Build-Depends: debhelper, dpatch
+Standards-Version: 3.7.2
Package: jed-extra
Architecture: all
Modified: trunk/packages/jed-extra/debian/init/50jed-extra.sl
===================================================================
--- trunk/packages/jed-extra/debian/init/50jed-extra.sl 2006-05-22 16:45:18 UTC (rev 294)
+++ trunk/packages/jed-extra/debian/init/50jed-extra.sl 2006-05-22 20:53:28 UTC (rev 295)
@@ -48,8 +48,8 @@
add_mode_for_extension ("gnuplot", "gp");
add_mode_for_extension ("mupad", "mu"); % mode for mupad files
foreach (["man", "1", "2", "3", "4", "5", "6", "7", "8"]) {
- variable ext = ();
- add_mode_for_extension ("manedit", ext);
+ "manedit"; exch;
+ add_mode_for_extension ((), ());
}
add_mode_for_extension ("sql", "sql");
@@ -69,7 +69,7 @@
% Printing
% --------
-
+
% there are 2 alternative functions to send the current buffer to a printer
%
% autoload("print_buffer", "print"); % simple, sends pure ASCII
Copied: trunk/packages/jed-extra/debian/install (from rev 292, trunk/packages/jed-extra/debian/jed-extra.install.template)
Modified: trunk/packages/jed-extra/debian/jed-extra-preparse.sl
===================================================================
--- trunk/packages/jed-extra/debian/jed-extra-preparse.sl 2006-05-22 16:45:18 UTC (rev 294)
+++ trunk/packages/jed-extra/debian/jed-extra-preparse.sl 2006-05-22 20:53:28 UTC (rev 295)
@@ -7,7 +7,7 @@
private variable extra_dir = path_concat(lib_dir, "extra");
% add the jed-extra libraries to the jed library path
-set_jed_library_path(sprintf("%s,%s,%s, %s",
+set_jed_library_path(sprintf("%s,%s,%s,%s",
utils_dir, lib_dir, drop_in_dir, get_jed_library_path()));
vmessage("jed library path: %s", get_jed_library_path());
Deleted: trunk/packages/jed-extra/debian/jed-extra.install.template
===================================================================
--- trunk/packages/jed-extra/debian/jed-extra.install.template 2006-05-22 16:45:18 UTC (rev 294)
+++ trunk/packages/jed-extra/debian/jed-extra.install.template 2006-05-22 20:53:28 UTC (rev 295)
@@ -1,3 +0,0 @@
-debian/examples/50jed-extra.sl etc/jed.d/
-debian/compile usr/share/jed/compile
-debian/jed-extra-preparse.sl usr/share/jed/compile
Modified: trunk/packages/jed-extra/debian/patches/00list
===================================================================
--- trunk/packages/jed-extra/debian/patches/00list 2006-05-22 16:45:18 UTC (rev 294)
+++ trunk/packages/jed-extra/debian/patches/00list 2006-05-22 20:53:28 UTC (rev 295)
@@ -1,3 +1,6 @@
50_ispell-fix-requirements
-# 50_rfcview-require-bufutils # no longer in jed-extra (eXotic)
-# 52_yodl-require # no longer in jed-extra (eXotic)
+50_rfcview-require-bufutils
+52_yodl-require
+make_ini
+grep
+rst
Modified: trunk/packages/jed-extra/debian/patches/50_rfcview-require-bufutils.dpatch
===================================================================
--- trunk/packages/jed-extra/debian/patches/50_rfcview-require-bufutils.dpatch 2006-05-22 16:45:18 UTC (rev 294)
+++ trunk/packages/jed-extra/debian/patches/50_rfcview-require-bufutils.dpatch 2006-05-22 20:53:28 UTC (rev 295)
@@ -5,15 +5,14 @@
## DP: No description.
@DPATCH@
-
-diff -Naur mode-orig/rfcview/rfcview.sl mode/rfcview/rfcview.sl
---- mode-orig/rfcview/rfcview.sl 2004-11-15 13:36:07.000000000 +0100
-+++ mode/rfcview/rfcview.sl 2005-03-07 23:19:46.000000000 +0100
-@@ -24,6 +24,7 @@
- implements("rfcview");
+diff -urNad jed-extra-2.2~/rfcview/rfcview.sl jed-extra-2.2/rfcview/rfcview.sl
+--- jed-extra-2.2~/rfcview/rfcview.sl 2005-11-18 11:50:30.000000000 +0100
++++ jed-extra-2.2/rfcview/rfcview.sl 2006-05-22 22:11:02.798733102 +0200
+@@ -17,6 +17,7 @@
+ provide("rfcview");
require("view");
+require("bufutils");
- _autoload
- ("set_buffer_hidden", "filter-view",
- "set_matching_hidden", "filter_view",
+ implements("rfcview");
+
+ custom_variable ("Rfc_Path", "/usr/doc/rfc");
Added: trunk/packages/jed-extra/debian/patches/grep.dpatch
===================================================================
--- trunk/packages/jed-extra/debian/patches/grep.dpatch 2006-05-22 16:45:18 UTC (rev 294)
+++ trunk/packages/jed-extra/debian/patches/grep.dpatch 2006-05-22 20:53:28 UTC (rev 295)
@@ -0,0 +1,64 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## grep.dpatch by Jörg Sommer <joerg at alea.gnuu.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+ at DPATCH@
+diff -urNad jed-extra-2.2~/grep/grep.sl jed-extra-2.2/grep/grep.sl
+--- jed-extra-2.2~/grep/grep.sl 2006-03-21 09:20:22.000000000 +0100
++++ jed-extra-2.2/grep/grep.sl 2006-05-22 22:16:43.010733102 +0200
+@@ -21,19 +21,6 @@
+ % * change _implements() to implements() (this will only affect re-evaluating
+ % sl_utils.sl in a JED < 0.99.17, so if you are not a developer on an older
+ % jed version, it will not harm).
+-<<<<<<< grep.sl
+-% 0.9.6 2006-02-02 bugfix and code cleanup in grep_replace_*
+-% (using POINT instead of what_column(), as TAB expansion
+-% might differ between grep output and referenced buffer)
+-% 1.0 2006-03-09
+-% * provide for --include pattern with recursive grep,
+-% * escape the `what' argument with quotes
+-% (this prevents ugly surprises with shell expansion but disables the
+-% trick to put command line options into `what').
+-% grep("pat", "dir/*.sl!") --> `grep -r --include='*.sl', 'pat' dir/`
+-% * change name of the custom var to Grep_Cmd to adhere to the
+-% "<capitalized-modenaem>_*" convention.
+-=======
+ % 0.9.6 2006-02-02 bugfix and code cleanup in grep_replace_*
+ % (using POINT instead of what_column(), as TAB expansion
+ % might differ between grep output and referenced buffer)
+@@ -47,7 +34,6 @@
+ % "<capitalized-modenaem>_*" convention.
+ % 1.1 2006-03-20
+ % * better cleanup in zero-output handling in grep().
+->>>>>>> 1.8
+ %
+ % USAGE
+ %
+@@ -205,25 +191,13 @@
+ push_mark(); () = right(len);
+ verror("File differs from grep output (looking at %s)", bufsubstr());
+ }
+-<<<<<<< grep.sl
+
+ len = replace_chars(len, new);
+
+ old = new;
+ EXECUTE_ERROR_BLOCK; % close newly opened buffer, return to grep results
+-=======
+-
+- len = replace_chars(len, new);
+->>>>>>> 1.8
+
+-<<<<<<< grep.sl
+ return len;
+-=======
+- old = new;
+- EXECUTE_ERROR_BLOCK; % close newly opened buffer, return to grep results
+-
+- return len;
+->>>>>>> 1.8
+ }
+
+ % Replace across files found by grep (interactive function)
Property changes on: trunk/packages/jed-extra/debian/patches/grep.dpatch
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/packages/jed-extra/debian/patches/make_ini.dpatch
===================================================================
--- trunk/packages/jed-extra/debian/patches/make_ini.dpatch 2006-05-22 16:45:18 UTC (rev 294)
+++ trunk/packages/jed-extra/debian/patches/make_ini.dpatch 2006-05-22 20:53:28 UTC (rev 295)
@@ -0,0 +1,16 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## make_ini.dpatch by Jörg Sommer <joerg at alea.gnuu.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+ at DPATCH@
+diff -urNad jed-extra-2.2~/make_ini/make_ini.sl jed-extra-2.2/make_ini/make_ini.sl
+--- jed-extra-2.2~/make_ini/make_ini.sl 2005-11-22 16:52:29.000000000 +0100
++++ jed-extra-2.2/make_ini/make_ini.sl 2006-05-22 22:05:27.914733102 +0200
+@@ -518,3 +518,5 @@
+ update_ini(path_concat(Jed_Home_Directory, "lib"));
+ }
+ #endif
++
++provide("make_ini");
Property changes on: trunk/packages/jed-extra/debian/patches/make_ini.dpatch
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/packages/jed-extra/debian/patches/rst.dpatch
===================================================================
--- trunk/packages/jed-extra/debian/patches/rst.dpatch 2006-05-22 16:45:18 UTC (rev 294)
+++ trunk/packages/jed-extra/debian/patches/rst.dpatch 2006-05-22 20:53:28 UTC (rev 295)
@@ -0,0 +1,92 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## rst.dpatch by Jörg Sommer <joerg at alea.gnuu.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+ at DPATCH@
+diff -urNad jed-extra-2.2~/rst/structured_text.sl jed-extra-2.2/rst/structured_text.sl
+--- jed-extra-2.2~/rst/structured_text.sl 2006-03-21 09:20:24.000000000 +0100
++++ jed-extra-2.2/rst/structured_text.sl 2006-05-22 22:19:30.122733102 +0200
+@@ -1,4 +1,3 @@
+-<<<<<<< structured_text.sl
+ % structured_text: formatting hooks for "ASCII markup"
+ %
+ % Copyright (c) 2006 Günter Milde
+@@ -14,55 +13,7 @@
+ %
+ % TODO: Lines that are marked as paragraph separator don't get
+ % formatted when calling format_paragraph :-(
+-=======
+-% structured_text: formatting hooks for "ASCII markup"
+-%
+-% Copyright (c) 2006 Günter Milde
+-% Released under the terms of the GNU General Public License (ver. 2 or later)
+-%
+-% Versions:
+-%
+-% 0.1 first version published together with rst.sl
+-% 2006-01-20 0.2 including the regular expressions from JED
+-% documentation
+-% 2006-01-23 0.3 added st_backward_paragraph() and st_mark_paragraph()
+-% set "mark_paragraph_hook" to format first line of list item
+-% 2006-02-03 0.4 bugfix in the Text_List_Patterns (* needs to be escaped)
+-%
+-% TODO: Lines that are marked as paragraph separator don't get
+-% formatted when calling format_paragraph :-(
+->>>>>>> 1.2
+-
+-<<<<<<< structured_text.sl
+-% the set of regular expressions matching a list mark
+-custom_variable("Text_List_Patterns",
+- ["[0-9]+\\.[ \t]+ ", % enumeration
+- % "[a-z]+\\) ", % alpha enumeration
+- "[*+-] " % itemize (bullet list)
+- ]);
+
+-%!%+
+-%\function{line_is_list}
+-%\synopsis{Return length of a list marker}
+-%\usage{ line_is_list()}
+-%\description
+-% Check if the current line starts with a list marker matching one of the
+-% regular expressions defined in \var{Rst_List_Patterns}.
+-% Return length of the list marker (excluding leading whitespace)
+-%
+-% This function leaves the editing point at the first non-whitespace
+-% character or the end of the line.
+-%\notes
+-% Thanks to JED for the regular expressions variant
+-%\seealso{line_is_empty, Text_List_Patterns}
+-%!%-
+-define line_is_list()
+-{
+- variable len = 0, re;
+- % get the current line without leading whitespace
+- variable line = strtrim_beg(line_as_string());
+- bol_skip_white();
+-=======
+ % the set of regular expressions matching a list mark
+ custom_variable("Text_List_Patterns",
+ ["[0-9]+\\.[ \t]+ ", % enumeration
+@@ -91,7 +42,6 @@
+ % get the current line without leading whitespace
+ variable line = strtrim_beg(line_as_string());
+ bol_skip_white();
+->>>>>>> 1.2
+
+ foreach (Text_List_Patterns)
+ {
+@@ -232,12 +182,8 @@
+ {
+ set_buffer_hook("wrap_hook", &st_indent);
+ set_buffer_hook("indent_hook", &st_indent);
+-<<<<<<< structured_text.sl
+- set_buffer_hook("mark_paragraph_hook", "st_mark_paragraph");
+-=======
+ % set_buffer_hook("backward_paragraph_hook", &st_backward_paragraph);
+ set_buffer_hook("mark_paragraph_hook", "st_mark_paragraph");
+->>>>>>> 1.2
+ set_buffer_hook("newline_indent_hook", &st_newline_and_indent);
+ set_buffer_hook("par_sep", &st_is_paragraph_separator);
+ }
Property changes on: trunk/packages/jed-extra/debian/patches/rst.dpatch
___________________________________________________________________
Name: svn:executable
+ *
Modified: trunk/packages/jed-extra/debian/rules
===================================================================
--- trunk/packages/jed-extra/debian/rules 2006-05-22 16:45:18 UTC (rev 294)
+++ trunk/packages/jed-extra/debian/rules 2006-05-22 20:53:28 UTC (rev 295)
@@ -9,7 +9,20 @@
include /usr/share/dpatch/dpatch.make
+CONTENTS_FILE = debian/contents.txt
+
+ADDITION = $(shell sed -n -e '/^A/ {s/^.\s*//; s@\s.*@/*@; p;}' $(CONTENTS_FILE))
+COLOR = $(shell sed -n -e '/^C/ {s/^.\s*//; s@\s.*@/*@; p;}' $(CONTENTS_FILE))
+DROP_IN = $(shell sed -n -e '/^D/ {s/^.\s*//; s@\s.*@/*@; p;}' $(CONTENTS_FILE))
+ENHANCEMENT = $(shell sed -n -e '/^E/ {s/^.\s*//; s@\s.*@/*@; p;}' $(CONTENTS_FILE))
+UTILS = $(shell sed -n -e '/^U/ {s/^.\s*//; s@\s.*@/*@; p;}' $(CONTENTS_FILE))
+EXPERIMENTAL = $(shell sed -n -e '/^X/ {s/^.\s*//; s@\s.*@/*@; p;}' $(CONTENTS_FILE))
+
debroot = $(PWD)/debian/jed-extra
+libdir = /usr/share/jed/jed-extra
+
+dh_inst_excl = -X.html -X.otl -X.example -XREADME
+
# upstream version
VER = $(shell perl -ne '/([\d.]+)-/; print $$1; exit' < \
$(dir $(firstword $(MAKEFILE_LIST)))/changelog)
@@ -17,7 +30,7 @@
build:
# nothing to do, but required by debian policy
-get-orig-source: jed-extra_$(VER).orig.tar.gz
+get-orig-source:
# officially released CVS tarball directly from a download mirror
# wget http://kent.dl.sourceforge.net/sourceforge/jedmodes/jedmodes-$(VER).tgz
# latest non-released source tarball
@@ -32,27 +45,45 @@
dh_testdir
dh_testroot
# keep dh_install informations (debian/files)
- dh_clean --keep
+ dh_clean
# install modes
# -------------
-
- # fix apsconf permissions
- # (executable in the Jedmodes CVS repository due to upload from Windoof)
- chmod -R a-x apsmode/*
- chmod a+x apsmode/apsconf/
# move mode documentation to /usr/share/doc/jed-extra/mode-doc/
- install -d $(debroot)/usr/share/doc/jed-extra/mode-doc/
- mv $$(find . -name \*.html -o -name \*.otl -name \*.example) \
- $(debroot)/usr/share/doc/jed-extra/mode-doc/
-
- # generate jed-extra.install from categorization in contents.txt
- jed-script debian/sort-modes.sl
- # now install using the generated jed-extra.install
- dh_install
- # dh_install -X.html -X.otl -X.example -XREADME
-
+ dh_install $$(find . -name \*.html -o -name \*.otl -name \*.example \
+ -o -name README) usr/share/doc/jed-extra/mode-doc/
+
+ for i in $(ADDITION) $(ENHANCEMENT) $(COLOR) $(DROP_IN) \
+ $(UTILS) $(EXPERIMENTAL); do \
+ case "$$i" in *"/*") echo $${i%/*} not found >&2; exit 1;; esac; \
+ done
+
+ifneq ($(ADDITION)$(ENHANCEMENT), )
+ dh_install $(dh_inst_excl) $(ADDITION) $(ENHANCEMENT) $(libdir)
+endif
+ifneq ($(COLOR), )
+ dh_install $(dh_inst_excl) $(COLOR) $(libdir)/colors
+endif
+ifneq ($(DROP_IN), )
+ dh_install $(dh_inst_excl) $(DROP_IN) $(libdir)/drop-in
+endif
+ifneq ($(UTILS), )
+ dh_install $(dh_inst_excl) $(UTILS) $(libdir)/utils
+endif
+ifneq ($(EXPERIMENTAL), )
+ dh_install $(dh_inst_excl) $(EXPERIMENTAL) $(libdir)/extra
+endif
+
+ @echo "following modes are not installed:"
+ (sed -n -e '/^[ACDEOUX]/ {s/^.\s*//; s/\s.*//; p;}' $(CONTENTS_FILE); \
+ ls; echo "COPYING\ndebian\nREADME\npatch-stamp") | sort | uniq -u
+ @echo
+
+ @echo "non .sl files in $(libdir):"
+ find $(debroot)$(libdir) -type f -not -name \*.sl -printf '%P\n'
+ @echo
+
# install package documentation
dh_installdocs debian/contents.txt
Deleted: trunk/packages/jed-extra/debian/sort-modes.sl
===================================================================
--- trunk/packages/jed-extra/debian/sort-modes.sl 2006-05-22 16:45:18 UTC (rev 294)
+++ trunk/packages/jed-extra/debian/sort-modes.sl 2006-05-22 20:53:28 UTC (rev 295)
@@ -1,124 +0,0 @@
-% This script produces an jed-extra.install list
-% that lets dh_install put the files in the right place
-%
-% call from the source directory that contains debian/
-%
-% (c) 2005 Günter Milde
-% Released under the terms of the GNU General Public License
-% (version 2 or later)
-
-_debug_info = 1;
-
-% Semi-Constants
-% --------------
-%
-% customize these ...
-
-% the list of modes and their categories
-private variable modelist = "debian/contents.txt";
-private variable target_file = "debian/jed-extra.install";
-private variable target_template = "debian/jed-extra.install.template";
-
-% dirs to sort into...
-private variable lib_dir = "usr/share/jed/jed-extra";
-private variable colors_dir = path_concat(lib_dir, "colors");
-private variable drop_in_dir = path_concat(lib_dir, "drop-in");
-private variable utils_dir = path_concat(lib_dir, "utils");
-private variable extra_dir = path_concat(lib_dir, "extra");
-
-% Types
-% -----
-%
-% *A*ddition *C*olor *D*rop-In *E*nhancement
-% *O*bsolete *U*tils e*X*perimental (or e*X*otic)
-
-private variable destinations = Assoc_Type[String_Type, ""];
-destinations["A"] = lib_dir;
-destinations["C"] = colors_dir;
-destinations["D"] = drop_in_dir;
-destinations["E"] = lib_dir;
-destinations["U"] = utils_dir;
-destinations["X"] = extra_dir;
-
-% verbosity
-private variable verbose = 1;
-
-% Main
-% ----
-
-% Variables for internale use
-private variable cwd=getcwd(), rv, line, mode, file,
- dest, fp, category, modes = Assoc_Type[String_Type, ""];
-
-
-if (is_substr(cwd, "debian"))
- chdir("..");
-
-% read in contents.txt
-% --------------------
-
-% contains a list of modes at Jedmodes and their categorization.
-
-fp = fopen(modelist, "r");
-if (fp == NULL)
- verror("fopen %s failed, %s", modelist, errno_string());
-
-while (-1 != fgets(&line, fp))
-{
- line = strtok(line);
- % skip comments, empty lines, and continuations
- if (orelse{length(line) < 2 }{line[0] == "#"})
- continue;
- modes[line[1]] = line[0];
-}
-
-rv = fclose(fp);
-
-% write an install file
-% ---------------------
-
-% open template with static content
-() = find_file(target_template);
-
-foreach (listdir("."))
-{
- mode = ();
- category = modes[mode];
-
- % mark as done
- assoc_delete_key(modes, mode);
-
- if (andelse{category == ""}{file_status(mode) == 2})
- {
- vmessage("skipping: unknown '%s'", mode);
- continue;
- }
- dest = destinations[category];
- if (dest == "")
- {
- if (verbose)
- vmessage("skipping: %s '%s'", category, mode);
- continue;
- }
- % write the sorting line
- vinsert("%s/* %s\n", mode, dest);
-}
-
-rv = write_buffer(target_file);
-
-% Give feedback about missing modes
-% ---------------------------------
-
-message("Missing modes");
-
-foreach (assoc_get_keys(modes))
-{
- mode = ();
- !if (length(where(modes[mode] == ["X", "O"])))
- vmessage("%s %s", mode, modes[mode]);
-}
-
-% reset the working dir
-rv = chdir(cwd);
-
-
More information about the Pkg-jed-commit
mailing list