[Pkg-jed-commit] r178 - in trunk/packages/jed-extra: debian
debian/patches utils
Guenter Milde
milde-guest at costa.debian.org
Fri Nov 11 14:32:02 UTC 2005
Author: milde-guest
Date: 2005-11-11 14:32:01 +0000 (Fri, 11 Nov 2005)
New Revision: 178
Removed:
trunk/packages/jed-extra/debian/patches/44_gnuplot-use-jedmodes-info.dpatch
Modified:
trunk/packages/jed-extra/debian/patches/00list
trunk/packages/jed-extra/debian/patches/41_apsconf-tmp-dir.dpatch
trunk/packages/jed-extra/debian/rules
trunk/packages/jed-extra/utils/sort-modes.sl
Log:
sort-modes.sl now prepares a jed-extra.install file for dh_install
41_apsconf-tmp-dir.dpatch: fix location of file to patch
44_gnuplot-use-jedmodes-info.dpatch: (fixed upstream)
rules: sort files according to jed-extra.install
Modified: trunk/packages/jed-extra/debian/patches/00list
===================================================================
--- trunk/packages/jed-extra/debian/patches/00list 2005-11-10 23:53:13 UTC (rev 177)
+++ trunk/packages/jed-extra/debian/patches/00list 2005-11-11 14:32:01 UTC (rev 178)
@@ -1,5 +1,4 @@
41_apsconf-tmp-dir
-# 44_gnuplot-use-jedmodes-info
48_make-dfa-fixes
50_ispell-fix-requirements
# 50_rfcview-require-bufutils
Modified: trunk/packages/jed-extra/debian/patches/41_apsconf-tmp-dir.dpatch
===================================================================
--- trunk/packages/jed-extra/debian/patches/41_apsconf-tmp-dir.dpatch 2005-11-10 23:53:13 UTC (rev 177)
+++ trunk/packages/jed-extra/debian/patches/41_apsconf-tmp-dir.dpatch 2005-11-11 14:32:01 UTC (rev 178)
@@ -8,7 +8,7 @@
diff -Naur mode-orig/apsmode/apsconf/apsconf.sl mode/apsmode/apsconf/apsconf.sl
--- mode-orig/apsmode/apsconf/apsconf.sl 2004-11-15 13:35:56.000000000 +0100
-+++ mode/apsmode/apsconf/apsconf.sl 2005-03-05 15:50:11.000000000 +0100
++++ jedmodes-extra-2.0/apsmode/apsconf/apsconf.sl 2005-03-05 15:50:11.000000000 +0100
@@ -53,7 +53,9 @@
aps_del_ps_file = 1;
Deleted: trunk/packages/jed-extra/debian/patches/44_gnuplot-use-jedmodes-info.dpatch
===================================================================
--- trunk/packages/jed-extra/debian/patches/44_gnuplot-use-jedmodes-info.dpatch 2005-11-10 23:53:13 UTC (rev 177)
+++ trunk/packages/jed-extra/debian/patches/44_gnuplot-use-jedmodes-info.dpatch 2005-11-11 14:32:01 UTC (rev 178)
@@ -1,38 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 44_gnuplot-use-jedmodes-info.dpatch by Rafael Laboissiere <rafael at debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
- at DPATCH@
-
-diff -Naur mode-orig/gnuplot/gnuplot.sl mode/gnuplot/gnuplot.sl
---- mode-orig/gnuplot/gnuplot.sl 2004-11-15 13:36:02.000000000 +0100
-+++ mode/gnuplot/gnuplot.sl 2005-03-06 14:52:24.000000000 +0100
-@@ -48,11 +48,9 @@
-
- % requirements
- require("comments"); % from jed's standard library
-+autoload ("find_dir", "info");
- autoload ("do_shell_cmd_on_region", "ishell.sl");
- autoload ("ishell_mode", "ishell.sl");
--!if (is_defined ("info_find_dir"))
-- () = evalfile("info.sl"); % has no provides command :-(
--
-
- % --- user adjustable settings ------------------------------------
-
-@@ -168,11 +166,11 @@
- %\usage{Void gnuplot_info (); }
- %\description
- % open info and goto node (gnuplot), an optional argument is subnode
--%\seealso{info_find_dir, info_find_node, gnuplot_mode}
-+%\seealso{find_dir, info_find_node, gnuplot_mode}
- %!%-
- define gnuplot_info ()
- {
-- info_find_dir();
-+ find_dir();
- info_find_node("(gnuplot)");
- if (_NARGS) % optional argument present
- {
Modified: trunk/packages/jed-extra/debian/rules
===================================================================
--- trunk/packages/jed-extra/debian/rules 2005-11-10 23:53:13 UTC (rev 177)
+++ trunk/packages/jed-extra/debian/rules 2005-11-11 14:32:01 UTC (rev 178)
@@ -9,29 +9,40 @@
include /usr/share/dpatch/dpatch.make
-jed_root = /usr/share/jed
debroot = $(PWD)/debian/jed-extra
-VER = 2.0 # upstream version
+jed_root = /usr/share/jed
+libdir = $(jed_root)/jed-extra
+# upstream version
+VER = 2.0
+
build:
# nothing to do, but required by debian policy
get-orig-source: jed-extra_$(VER).orig.tar.gz
-
+ # Debian policy says:
+ # This target fetches the most recent version of the original source
+ # package from a canonical archive site (via FTP or WWW, for example)
+ # The dependency on the archive file makes it idempotent
+
jed-extra_$(VER).orig.tar.gz:
- # This target fetches the most recent version of the original source
- # package from a canonical archive site (via FTP or WWW, for example)
-
# Get the upstream archive
+ # uncomment your choice of source location
+ # TODO: make this an option
+ #
+ # latest non-released source tarball
# wget http://jedmodes.sf.net/cvs/jedmodes.tgz
+ # officially released CVS tarball directly from the download mirror in Kent
+ # wget http://kent.dl.sourceforge.net/sourceforge/jedmodes/jedmodes-cvs.tgz
+ # local copy
cp ~/.jed/jedmodes/src/jedmodes.tgz .
# rename
mv jedmodes.tgz jed-extra_$(VER).orig.tar.gz
- # Debian Developers Reference recommends to keep the upstream tarball
- # pristine, if possible, so the following is just for reference
- #
+ # Debian Developers Reference recommends to keep the upstream tarball
+ # pristine, if possible, so the following is just for reference
+ #
# rename the base directory (will be done by dpkg-source)
# tar -xzf jedmodes.tgz
# mv mode jed-extra-$(VER)
@@ -56,43 +67,24 @@
# keep dh_install informations (debian/files)
dh_clean --keep
- dh_install $$(find . \( -wholename ./debian -o -wholename ./colors -o \
- -wholename ./apsmode/apsconf \) -prune -o \
- \( -name \*.sl -o -name \*.hlp \) -print ) yodl/yodlfun.txt \
- debian/jed-extra-preparse.sl debian/jed-extra-init.sl \
- $(jed_root)/site-lib
+ # install modes according to jed-extra.install
+ dh_install -X.html -X.otl -Xapsconf -XREADME
+
+ # install documentation (under /usr/share/doc/jed-extra)
+ dh_installdocs $$(find . -name \*.html -o -name \*.otl) \
+ COPYING README.txt
- dh_install a2ps/*.ssh /usr/share/a2ps/sheets/
- dh_install -Xapsconf.example -XSLang.ssh apsmode/apsconf colors \
- $(jed_root)/site-lib
- chmod -x $(debroot)$(jed_root)/site-lib/apsconf/*
+ # install some extra docs from the source
+ dh_installexamples apsmode/apsconf
- # fill up /etc
- dh_install debian/init/*.sl etc/jed.d/
-
- # install compile script to build *.slc files after installation
- dh_install debian/compile usr/share/jed/compile
+ # rename compile script to build *.slc files after installation
mv $(debroot)/usr/share/jed/compile/compile \
$(debroot)/usr/share/jed/compile/jed-extra
- # fill up /usr/share/doc/jed-extra
- dh_installchangelogs
-
- dh_installdocs $$(find . -name \*.html -o -name \*.otl) \
- a2ps/README tar/INSTALL
-
- mv $(debroot)/usr/share/doc/jed-extra/README \
- $(debroot)/usr/share/doc/jed-extra/README.a2ps
- mv $(debroot)/usr/share/doc/jed-extra/INSTALL \
- $(debroot)/usr/share/doc/jed-extra/README.tar.sl
-
- # install some extra docs from the source
- dh_installexamples apsmode/apsconf/apsconf.example
-
#dh_installdebconf
-
+
+ dh_installchangelogs
dh_compress
-
dh_fixperms
dh_installdeb
dh_gencontrol
Modified: trunk/packages/jed-extra/utils/sort-modes.sl
===================================================================
--- trunk/packages/jed-extra/utils/sort-modes.sl 2005-11-10 23:53:13 UTC (rev 177)
+++ trunk/packages/jed-extra/utils/sort-modes.sl 2005-11-11 14:32:01 UTC (rev 178)
@@ -1,4 +1,9 @@
-% TODO?: slsh or jed-script shebang line
+% This script produces an jed-exrta.install list
+% that lets dh_install put the files in the right place
+%
+% (c) 2005 Günter Milde
+% Released under the terms of the GNU General Public License
+% (version 2 or later)
_debug_info = 1;
@@ -7,19 +12,20 @@
%
% customize these ...
+% upstream version
+private variable VER = "2.0";
+
% the list of modes and their categories
-private variable modelist = "jedmodes-list.txt";
+private variable modelist = "../debian/jedmodes-list.txt";
-private variable orig_dir = "jed-extra-1.2";
+private variable orig_dir = "../jed-extra-" + VER;
-% the dir to build the package. New Maintainer guide recomments tmp
-private variable build_dir = "tmp";
-%these will become subdirs of `build_dir'
-private variable lib_dir = "/usr/share/jed/jed-extra";
+% 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 verbose = 1;
+
% Types
% -----
%
@@ -41,6 +47,98 @@
private variable cwd=getcwd(), rv, line, mode, file, dest, fp;
private variable category, modes = Assoc_Type[String_Type, ""];
+
+modelist = expand_filename(path_concat(buffer_dirname(), modelist));
+orig_dir = expand_filename(path_concat(buffer_dirname(), orig_dir));
+
+% read in modelist
+% ----------------
+
+% 'modelist' 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;
+ % show(line[0], line[1]);
+ modes[line[1]] = line[0];
+}
+
+% show(modes);
+
+rv = fclose(fp);
+
+% write an install buffer
+% -----------------------
+
+() = find_file(path_concat(buffer_dirname(), "../debian/jed-extra.install"));
+erase_buffer();
+
+% debian specific installation tasks
+
+insert("debian/init/*.sl etc/jed.d/\n");
+insert("debian/compile usr/share/jed/compile\n\n");
+
+foreach (listdir(orig_dir))
+{
+ mode = ();
+ category = modes[mode];
+
+ % mark as done (this breaks the obsolete sorting further down)
+ assoc_delete_key(modes, mode);
+
+ if (andelse{category == ""}{file_status(path_concat(orig_dir, mode)) == 2})
+ {
+ vshow("skipping: unknown '%s'", mode);
+ continue;
+ }
+ dest = destinations[category];
+ if (dest == "")
+ {
+ if (verbose)
+ vshow("skipping: %s '%s'", category, mode);
+ continue;
+ }
+ % prepend the common part of the path
+ vinsert("%s/*\t%s\n", mode, dest);
+}
+
+save_buffer();
+
+show_string("Missing modes");
+
+% delete the ones we do not install
+foreach (assoc_get_keys(modes))
+{
+ mode = ();
+ if (length(where(modes[mode] == ["X", "O"])))
+ assoc_delete_key(modes, mode);
+}
+
+
+show(modes);
+
+% reset the working dir
+rv = chdir(cwd);
+
+
+% Sorting
+% -------
+
+% now done in rules with dh_install
+#stop
+
+% kept for reference
+
+% the dir to build the package. New Maintainer guide recomments tmp
+private variable build_dir = "tmp";
+
% Preparation
% -----------
@@ -72,33 +170,7 @@
mk_build_dir(drop_in_dir);
-% read in modelist
-% ----------------
-% 'modelist' 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;
- % show(line[0], line[1]);
- modes[line[1]] = line[0];
-}
-
-% show(modes);
-
-rv = fclose(fp);
-
-
-% Sorting
-% -------
-
% The source files are in subdirs of 'jed-extra-$VER' and should be sorted to
% 'libdir', colors_dir, and 'drop_in_dir'.
@@ -145,5 +217,3 @@
% }
}
-% reset the working dir
-rv = chdir(cwd);
More information about the Pkg-jed-commit
mailing list