[Pkg-jed-commit] r208 - in trunk/packages/jed-extra: debian
debian/patches utils
Guenter Milde
milde-guest at costa.debian.org
Fri Nov 18 14:30:39 UTC 2005
Author: milde-guest
Date: 2005-11-18 14:30:38 +0000 (Fri, 18 Nov 2005)
New Revision: 208
Added:
trunk/packages/jed-extra/debian/sort-modes.sl
Removed:
trunk/packages/jed-extra/utils/sort-modes.sl
Modified:
trunk/packages/jed-extra/debian/changelog
trunk/packages/jed-extra/debian/jed-extra-preparse.sl
trunk/packages/jed-extra/debian/patches/00list
trunk/packages/jed-extra/debian/rules
trunk/packages/jed-extra/utils/build-from-scratch.sh
trunk/packages/jed-extra/utils/prepare-build.sh
Log:
sort-modes is now called from the rules to generate jed-extra.install
new upstream version jedmodes-2.1 (not yet oficially released)
one more upstream patch
Modified: trunk/packages/jed-extra/debian/changelog
===================================================================
--- trunk/packages/jed-extra/debian/changelog 2005-11-17 17:38:34 UTC (rev 207)
+++ trunk/packages/jed-extra/debian/changelog 2005-11-18 14:30:38 UTC (rev 208)
@@ -1,4 +1,4 @@
-jed-extra (2.0-1) experimental; urgency=high
+jed-extra (2.1-1) experimental; urgency=high
NOT YET RELEASED!
@@ -20,6 +20,8 @@
* new upstream source URI
* list of upstream modes (with categorization) in contents.txt
+ modes marked as "Obsolete" or "eXotic/eXperimental" are now excluded
+ from the jed-extra package to keep the footprint small
* updated copyright (source URI, author list, contact info)
* updated README.Debian (give customization instructions)
* move all initialization/customization to jed.d/50jed-extra.sl
@@ -68,7 +70,7 @@
experimental state, GM]
* the example file for apsmode/apsconf is in examples
- --
+ -- Debian JED Group <pkg-jed-devel at lists.alioth.debian.org>
jed-extra (1.0-1) experimental; urgency=low
Modified: trunk/packages/jed-extra/debian/jed-extra-preparse.sl
===================================================================
--- trunk/packages/jed-extra/debian/jed-extra-preparse.sl 2005-11-17 17:38:34 UTC (rev 207)
+++ trunk/packages/jed-extra/debian/jed-extra-preparse.sl 2005-11-18 14:30:38 UTC (rev 208)
@@ -1,14 +1,14 @@
% -*- slang -*-
% Location of the jed-extra package's library dir
-$1 = "/usr/share/jed/jed-extra";
+private variable libdir = "/usr/share/jed/jed-extra";
% add the jed-extra library dir to the jed library path
-set_jed_library_path($1 + "," + get_jed_library_path());
+set_jed_library_path(libdir + "," + get_jed_library_path());
require("make_ini");
-update_ini($1);
+update_ini(libdir);
# stop
% the old code without use of make_ini
Modified: trunk/packages/jed-extra/debian/patches/00list
===================================================================
--- trunk/packages/jed-extra/debian/patches/00list 2005-11-17 17:38:34 UTC (rev 207)
+++ trunk/packages/jed-extra/debian/patches/00list 2005-11-18 14:30:38 UTC (rev 208)
@@ -1,4 +1,4 @@
-41_apsconf-tmp-dir
+# 41_apsconf-tmp-dir # fixed upsream
50_ispell-fix-requirements
# 50_rfcview-require-bufutils # no longer in jed-extra (eXotic)
# 52_yodl-require # no longer in jed-extra (eXotic)
Modified: trunk/packages/jed-extra/debian/rules
===================================================================
--- trunk/packages/jed-extra/debian/rules 2005-11-17 17:38:34 UTC (rev 207)
+++ trunk/packages/jed-extra/debian/rules 2005-11-18 14:30:38 UTC (rev 208)
@@ -10,10 +10,8 @@
include /usr/share/dpatch/dpatch.make
debroot = $(PWD)/debian/jed-extra
-jed_root = /usr/share/jed
-libdir = $(jed_root)/jed-extra
# upstream version
-VER = 2.0
+VER = 2.1
build:
@@ -30,21 +28,17 @@
# uncomment your choice of source location # TODO: make this an option
#
# officially released CVS tarball directly from a download mirror
- # wget http://kent.dl.sourceforge.net/sourceforge/jedmodes/jedmodes-cvs.tgz
+ # wget http://kent.dl.sourceforge.net/sourceforge/jedmodes/jedmodes-$(VER).tgz
# latest non-released source tarball
- wget http://jedmodes.sf.net/cvs/jedmodes.tgz
+ # wget http://jedmodes.sf.net/cvs/jedmodes-$(VER).tgz
# local copy
- # cp ~/.jed/jedmodes/src/jedmodes.tgz .
+ cp ~/.jed/jedmodes/src/jedmodes-$(VER).tgz .
# rename
- mv jedmodes.tgz jed-extra_$(VER).orig.tar.gz
+ mv jedmodes-$(VER).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
- #
- # rename the base directory (will be done by dpkg-source)
- # tar -xzf jedmodes.tgz
- # mv mode jed-extra-$(VER)
# TODO: get modes from different URIs
# and extract to jed-extra-$(VER)/$modename/
@@ -66,8 +60,9 @@
# keep dh_install informations (debian/files)
dh_clean --keep
- # install modes according to jed-extra.install
- # (generated by ../utils/sort-modes.sl)
+ # install modes
+ # create jed-extra.install from categorization in contents.txt
+ jed-script debian/sort-modes.sl
dh_install -X.html -X.otl -X.example -XREADME
# install documentation (under /usr/share/doc/jed-extra)
Copied: trunk/packages/jed-extra/debian/sort-modes.sl (from rev 204, trunk/packages/jed-extra/utils/sort-modes.sl)
===================================================================
--- trunk/packages/jed-extra/utils/sort-modes.sl 2005-11-17 12:40:10 UTC (rev 204)
+++ trunk/packages/jed-extra/debian/sort-modes.sl 2005-11-18 14:30:38 UTC (rev 208)
@@ -0,0 +1,134 @@
+% This script produces an jed-exrta.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";
+
+% 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");
+
+% 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"] = lib_dir;
+
+% files that do not fit into the list
+private variable non_listed_files =
+ ["debian/init/*.sl etc/jed.d/",
+ "apsmode/apsconf " + lib_dir,
+ "debian/compile usr/share/jed/compile",
+ "debian/jed-extra-preparse.sl usr/share/jed/compile"];
+
+
+% 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
+% ---------------------
+
+() = find_file(target_file);
+erase_buffer();
+
+% debian specific installation tasks
+
+insert(strjoin(non_listed_files, "\n") + "\n");
+
+% show(getcwd, listdir("."));
+% #stop
+
+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);
+}
+
+save_buffer();
+
+% 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);
+
+
Modified: trunk/packages/jed-extra/utils/build-from-scratch.sh
===================================================================
--- trunk/packages/jed-extra/utils/build-from-scratch.sh 2005-11-17 17:38:34 UTC (rev 207)
+++ trunk/packages/jed-extra/utils/build-from-scratch.sh 2005-11-18 14:30:38 UTC (rev 208)
@@ -6,7 +6,7 @@
# with all needed sources and the results of a debbuild
# upstream version
-VERSION=2.0
+VER=2.0
# Get the jed-extra files from SVN
# --------------------------------
@@ -21,27 +21,20 @@
debian/rules get-orig-source
-# Unpack and rename
-# -----------------
+# Unpack
+# ------
-tar -xzf jed-extra_$VERSION.orig.tar.gz
-mv mode jed-extra-$VERSION
+tar -xzf jed-extra_$VER.orig.tar.gz
-# (Re)create the jed-extra.install file list
-# -------------------------------------------
-
-jed-script utils/sort-modes.sl
-
-
# Move the debian/ subdir to the source tree
# ------------------------------------------
-mv debian jed-extra-$VERSION/
+mv debian jedmodes-$VER/
# Build the package
# -----------------
-cd jed-extra-$VERSION
+cd jedmodes-$VER
# let the builder fix changelog
echo "Please fix the trailer line in changelog"
Modified: trunk/packages/jed-extra/utils/prepare-build.sh
===================================================================
--- trunk/packages/jed-extra/utils/prepare-build.sh 2005-11-17 17:38:34 UTC (rev 207)
+++ trunk/packages/jed-extra/utils/prepare-build.sh 2005-11-18 14:30:38 UTC (rev 208)
@@ -13,7 +13,7 @@
# cd jed-extra
# upstream version
-VERSION=2.0
+VER=2.1
# Download the upstream tarball
# -----------------------------
@@ -21,37 +21,25 @@
debian/rules get-orig-source
-# Unpack and rename
-# -----------------
+# Unpack
+# ------
-# rm -R jed-extra-$VERSION
+tar -xzf jed-extra_$VER.orig.tar.gz
-tar -xzf jed-extra_$VERSION.orig.tar.gz
-
-install --directory jed-extra-$VERSION
-cp -uRf mode/* jed-extra-$VERSION
-rm -Rf mode
-
-
-# (Re)create the jed-extra.install file list
-# -------------------------------------------
-
-jed-script utils/sort-modes.sl
-
-
# Copy the debian/ subdir to the source tree
# ------------------------------------------
-cp -uRf debian jed-extra-$VERSION
+install -d jedmodes-$VER/debian
+cp -uRf debian/* jedmodes-$VER/debian
-rm -Rf .svn
-rm -Rf */.svn
+cd jedmodes-$VER
-cd jed-extra-$VERSION/debian
-debuild -us -uc
+# xjed debian/changelog
+debuild -i -us -uc
+
Deleted: trunk/packages/jed-extra/utils/sort-modes.sl
===================================================================
--- trunk/packages/jed-extra/utils/sort-modes.sl 2005-11-17 17:38:34 UTC (rev 207)
+++ trunk/packages/jed-extra/utils/sort-modes.sl 2005-11-18 14:30:38 UTC (rev 208)
@@ -1,224 +0,0 @@
-% This script produces an jed-exrta.install list
-% that lets dh_install put the files in the right place
-%
-% call from the directory that contains jed-extra-$VER/ and 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 ...
-
-% upstream version
-private variable VER = "2.0";
-
-% the list of modes and their categories
-private variable modelist = "debian/contents.txt";
-private variable target_file = "debian/jed-extra.install";
-
-% orig-source
-private variable orig_dir = "jed-extra-" + VER;
-
-
-% 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");
-
-% 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"] = lib_dir;
-
-
-% files that do not fit into the list
-private variable non_listed_files = "debian/init/*.sl etc/jed.d/\n"
- + "apsmode/apsconf " + lib_dir + "\n"
- + "debian/compile usr/share/jed/compile\n"
- + "debian/jed-extra-preparse.sl usr/share/jed/compile\n\n";
-
-
-% 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, ""];
-
-
-% 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;
- modes[line[1]] = line[0];
-}
-
-
-rv = fclose(fp);
-
-% write an install file
-% ---------------------
-
-() = find_file(target_file);
-erase_buffer();
-
-% debian specific installation tasks
-
-insert(non_listed_files);
-
-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})
- {
- vmessage("skipping: unknown '%s'", mode);
- continue;
- }
- dest = destinations[category];
- if (dest == "")
- {
- if (verbose)
- vmessage("skipping: %s '%s'", category, mode);
- continue;
- }
- % prepend the common part of the path
- vinsert("%s/*\t%s\n", mode, dest);
-}
-
-save_buffer();
-
-message("Missing modes");
-
-% delete the ones we do not install
-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);
-
-
-% 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
-% -----------
-
-rv = chdir(dir);
-show(getcwd);
-% set up a working directory hierarchy
-
-% create a dir under build-dir, creating parent dirs on the fly (as `mkdir -p`)
-static define mk_build_dir(dir)
-{
- variable d, path="";
- % prepend the build dir and parse
- dir = [build_dir, strtok(dir, "/")];
- % show(dir);
- foreach (dir)
- {
- d = ();
- path = path_concat(path, d);
- if (file_status(path) != 2)
- rv = mkdir(path);
- }
- if (rv != 0)
- vmessage("error creating '%s', %s", path, errno_string());
-}
-
-mk_build_dir(""); % create build_dir itself
-mk_build_dir(lib_dir);
-mk_build_dir(colors_dir);
-mk_build_dir(drop_in_dir);
-
-
-
-% The source files are in subdirs of 'jed-extra-$VER' and should be sorted to
-% 'libdir', colors_dir, and 'drop_in_dir'.
-
-foreach (listdir(orig_dir))
-{
- mode = ();
- category = modes[mode];
- if (andelse{category == ""}{file_status(path_concat(orig_dir, mode)) == 2})
- {
- vmessage("skipping: unknown '%s'", mode);
- continue;
- }
- dest = destinations[category];
- if (dest == "")
- {
- if (verbose)
- vmessage("skipping: %s '%s'", category, mode);
- continue;
- }
- % prepend the common part of the path
- mode = path_concat(orig_dir, mode);
- dest = path_concat(build_dir, strtrim_beg(dest, "/"));
- % show(mode, dest);
- rv = system(sprintf("cp --backup %s/* %s", mode, dest));
- if (rv == -1 or rv == 127)
- vmessage("error copying '%s/*' to '%s', %s", mode, dest, errno_string());
-
- % OS independent SLang variant of sorting
- % foreach (listdir(mode))
- % {
- % file = ();
- % file = path_concat(mode, file);
- % !if (file_status(file))
- % verror("file %s missing %d", file, file_status(file));
- % !if (file_status(dest))
- % verror("dest %s missing %d", dest, file_status(dest));
- % if (verbose)
- % vmessage("copying %s", file);
- % rv = copy_file(file,
- % path_concat(dest, file));
- % if (rv == 0)
- % vmessage("error copying '%s' to '%s', %s",
- % file, dest, errno_string());
- % }
-}
-
More information about the Pkg-jed-commit
mailing list