[Blends-commit] [SCM] blends-gsoc branch, master, updated. d7f4b3775cf10890ea19a996a33e11867b49b933

Emmanouil Kiagias e.kiagias at gmail.com
Fri Aug 2 17:38:46 UTC 2013


The following commit has been merged in the master branch:
commit d7f4b3775cf10890ea19a996a33e11867b49b933
Author: Emmanouil Kiagias <e.kiagias at gmail.com>
Date:   Fri Aug 2 19:38:10 2013 +0200

    added files from current blends-dev package(templates, examples, blend-get-names,blend-install-helper) so this project's code can fully replace the current blends-dev. Generated package now comes with the name blends-dev (and not blends-dev-patch)

diff --git a/debian/blends-dev-patch.install b/debian/blends-dev-patch.install
deleted file mode 100644
index 4cb7f83..0000000
--- a/debian/blends-dev-patch.install
+++ /dev/null
@@ -1,4 +0,0 @@
-devtools/blend-gen-control         	usr/share/blends-dev
-devtools/Makefile					usr/share/blends-dev
-devtools/rules 						usr/share/blends-dev
-tasks_diff							usr/share/blends-dev
\ No newline at end of file
diff --git a/debian/blends-dev.examples b/debian/blends-dev.examples
new file mode 100644
index 0000000..4cd66f8
--- /dev/null
+++ b/debian/blends-dev.examples
@@ -0,0 +1 @@
+examples/*
\ No newline at end of file
diff --git a/debian/blends-dev.install b/debian/blends-dev.install
new file mode 100644
index 0000000..0a0e35f
--- /dev/null
+++ b/debian/blends-dev.install
@@ -0,0 +1,7 @@
+devtools/blend-gen-control         	usr/share/blends-dev
+devtools/Makefile					usr/share/blends-dev
+devtools/rules 						usr/share/blends-dev
+devtools/blend-get-names 			usr/share/blends-dev
+devtools/blend-install-helper		usr/share/blends-dev
+tasks_diff							usr/share/blends-dev
+templates           				usr/share/blends
\ No newline at end of file
diff --git a/debian/control b/debian/control
index d250075..9275566 100644
--- a/debian/control
+++ b/debian/control
@@ -7,7 +7,7 @@ Standards-Version: 3.9.4
 Vcs-Browser: http://git.debian.org/?p=blends/blends-gsoc.git
 Vcs-Git: git://git.debian.org/git/blends/blends-gsoc.git
 
-Package: blends-dev-patch
+Package: blends-dev
 Architecture: all
 Depends: debconf (>= 0.5) | debconf-2.0,
          make | build-essential,
diff --git a/debian/copyright b/debian/copyright
index 0b21dff..5a10ce1 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -12,4 +12,29 @@ License: GPL-2+
 Files: devtools/rules
 Copyright: © 2007-2012 Andreas Tille <tille at debian.org>
            © 2013 Emmanouil Kiagias <e.kiagias at gmail.com>
-License: GPL-2+
\ No newline at end of file
+License: GPL-2+
+
+Files: devtools/blend-get-names
+Copyright: © 2007-2012 Andreas Tille <tille at debian.org>
+License: GPL-2+
+
+Files: devtools/blend-install-helper
+Copyright: © 2007-2012 Andreas Tille <tille at debian.org>
+License: GPL-2+
+
+Files: examples/*
+Copyright: © 2007-2012 Andreas Tille <tille at debian.org>
+License: GPL-2+
+
+Files: templates/*
+Copyright: © 2007-2012 Andreas Tille <tille at debian.org>
+License: GPL-2+
+
+License: GPL-2+
+ This package is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+ .
+ On Debian systems, the complete text of the GNU GPL version 2
+ can be found in: `/usr/share/common-licenses/GPL-2'
\ No newline at end of file
diff --git a/devtools/Makefile b/devtools/Makefile
index 3626a5a..c6319cf 100755
--- a/devtools/Makefile
+++ b/devtools/Makefile
@@ -4,6 +4,8 @@
 # for a Debian Pure Blend.
 #
 # Copyright (C) Andreas Tille <tille at debian.org>
+# Copyright (C) Emmanouil Kiagias <e.kiagias at gmail.com> 
+#
 # License: GPL
 
 # TARGET_DIST is one of stable, sarge, etch, unstable, or any other available
diff --git a/devtools/blend-get-names b/devtools/blend-get-names
new file mode 100755
index 0000000..89a5647
--- /dev/null
+++ b/devtools/blend-get-names
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+# Read Blend specific names from debian/control.stub
+#
+# Copyright (C) Andreas Tille <tille at debian.org>
+# License: GPL
+
+# Return codes according to
+# http://epydoc.sourceforge.net/stdlib/posix-module.html
+
+CONTROLFILE=debian/control.stub
+
+GetShortName () {
+    grep '^Source:' $CONTROLFILE | \
+	sed -e 's/^Source:[[:space:]]*//' -e 's/^debian-//'
+}
+
+if [ ! -e "$CONTROLFILE" ] ; then
+	echo "Missing control file $CONTROLFILE"
+	exit 72   # EX_OSFILE
+fi
+
+if [ "$#" -ne 1 ] ; then
+	echo "Missing argument"
+	echo "Usage: $0 blendname|blendshortname|metapackageprefix"
+	exit 64   #  EX_USAGE
+fi
+
+case "$1" in
+    blendname)
+        grep '^Source:[[:space:]]*' "$CONTROLFILE" | \
+	    sed 's/^Source:[[:space:]]*//'
+	exit 0
+	;;
+    blendshortname)
+	GetShortName
+	exit 0
+	;;
+    metapackageprefix)
+	mprefix=`grep '^Package:[[:space:]]*' "$CONTROLFILE" |head -1| \
+	    sed 's/^Package:[[:space:]]*\([[:alnum:]]\+\)-*.*/\1/'`
+	if [ -z $mprefix ] ; then
+	    GetShortName
+	else
+	    echo $mprefix
+	fi
+	exit 0
+	;;
+    *)
+	echo "Unknown argument $1"
+	echo "Usage: $0 blendname|blendshortname|metapackageprefix"
+	exit 64   #  EX_USAGE
+	;;
+esac
diff --git a/devtools/blend-install-helper b/devtools/blend-install-helper
new file mode 100755
index 0000000..88b85b6
--- /dev/null
+++ b/devtools/blend-install-helper
@@ -0,0 +1,140 @@
+#!/bin/sh
+
+blend=`/usr/share/blends-dev/blend-get-names metapackageprefix`
+menudir=usr/share/blends/"$blend"/menu
+
+SubstBlendName () {
+    sed -e "s/#BLEND#/${blend}/g" \
+        -e "s?\([/ ]\)\(config.templates:*\)?\1${blend}-\2?" \
+        -e "s/#BLENDNAME#/${BLENDNAME}/g" /usr/share/blends/templates/$1 >> \
+	debian/$2
+}
+
+# Make dependency from menu containing packages to the right #BLEND#-config version
+# version="(>= `dpkg-parsechangelog | grep "^Version:" | sed -e "s/^Version:[[:space:]]\+\([\.0-9]*\)[[:space:]]*/\1/"`)"
+version="(>= `dpkg-parsechangelog | awk '/^Version/ { print $2 }'`)"
+
+# First make sure that we really have to prepare a metapackage for all
+# tasks.  It might be that there are tasks without any existing Dependency
+# inside Debian.  These tasks are not mentioned in debian/control - so check
+# this file first and assemble list of metapackages to create in $TASKLIST
+TASKLIST=""
+for pkg in `ls tasks | grep -v "^[a-z]*:$*" | grep -v "^$" | sort | uniq` ; do
+    if grep -q "^Package: ${blend}-${pkg}" debian/control ; then
+	TASKLIST="$TASKLIST $pkg"
+    fi
+done
+# General Task registry, menu registration and post{inst,rm} preparation
+for pkg in $TASKLIST ; do
+    # registration
+    if ! grep -q -w "^Task:" tasks/$pkg ; then
+	echo "Control file template tasks/$pkg does not contain 'Task:' field."
+	# I'm sure there are more clever ways to make the first letter upper case ...
+	# task=`echo $pkg | sed 's/^\(.\).*/\1/' | tr "^[a-z]" "^[A-Z]"``echo $pkg | sed 's/^.//'`
+	# For the moment disable tasksel if there is no "Task:" tag given
+    else
+	task=`grep -w "^Task:" tasks/"$pkg" | sed "s/^Task:[[:space:]]*\([^[:space:]]*\)/\1/"`
+	mkdir -p debian/"$blend"-"$pkg"/usr/share/blends/tasks/"$blend"/
+	echo "$task" > debian/"$blend"-"$pkg"/usr/share/blends/tasks/"$blend"/"$pkg"
+    fi
+
+    # if we provide an extra menu which overrides some menus provided by
+    # the maintainers of the dependand packages move them now to the right
+    # directory
+    [ -d menu ] && [ -d menu/"$pkg" ] && \
+	    if [ `find menu/"$pkg" -maxdepth 1 -name \*.menu | wc -l` -gt 0 ] ; then
+	mkdir -p debian/"$blend"-"$pkg"/"$menudir"
+	for dep in `find menu/"$pkg" -maxdepth 1 -name \*.menu` ; do
+		cp -a "$dep" debian/"$blend"-"$pkg"/"$menudir"/`basename "$dep" .menu`
+        done
+    fi
+
+    # Provide a README.Debian in any case
+    mkdir -p debian/"$blend"-"$pkg"/usr/share/doc/"$blend"-"$pkg"
+    [ ! -s docs/"$pkg"/README.Debian ] && cp -a /usr/share/blends/templates/README.Debian debian/"$blend"-"$pkg"/usr/share/doc/"$blend"-"$pkg"
+    # Check for documentation of packages (*.txt or *.html) which should be viewed in
+    # case of missing GUI
+    [ -d menu ] && [ -d menu/"$pkg" ] && \
+	    if [ `find menu/"$pkg" -maxdepth 1 -name \*.txt -o -name \*.html | wc -l` -gt 0 ] ; then
+	for dep in `find menu/"$pkg" -maxdepth 1 -name \*.txt -o -name \*.html` ; do
+            # Formerly here was checked, whether this package is really listed in the
+	    # dependencies, with more clever menu handling it is enough to verify
+	    # whether it is mentioned at all in the package relations and the menu
+	    # system cares about whether a sugested package is installed or not
+	    depmenu=`basename ${dep} .txt`
+	    if [ "$depmenu" = `basename ${dep}` ] ; then depmenu=`basename ${dep} .html` ; fi
+	    if ! grep -A 5 "Package: $blend-$pkg" debian/control | grep -q -w "$depmenu" ; then
+		## echo "Package ${depmenu} seems not to be in dependencies"
+		continue
+	    fi
+	    cp -a "$dep" debian/"$blend"-"$pkg"/usr/share/doc/"$blend"-"$pkg"
+	done
+    fi
+
+    # if README.Source exits move it into every package
+    [ -s debian/README.source ] && cp -a debian/README.source debian/"$blend"-"$pkg"/usr/share/doc/"$blend"-"$pkg"
+
+    # post{inst/rm} template are appended if some extra scripts are provided or just created
+    # an extra postinst has to be saved (*.stub) and restored by the clean target in
+    # debian/rules
+    for prepost in postinst prerm ; do
+	[ -s debian/"$blend"-"$pkg".${prepost}.stub ] && cp debian/"$blend"-"$pkg".${prepost}.stub debian/"$blend"-"$pkg".${prepost}
+	if [ -s /usr/share/blends/templates/${prepost} ] ; then
+	    sed -e "s/#BLEND#/${blend}/g" \
+	        -e "s/#PKG#/${blend}-${pkg}/g" \
+    		/usr/share/blends/templates/${prepost} >> debian/"$blend"-"$pkg".${prepost}
+    	fi
+    done
+done
+
+# if config/config exists use this as general helper script
+if [ -s config/config ] ; then
+  mkdir -p debian/"$blend"-config/usr/bin
+  mkdir -p debian/"$blend"-config/usr/share/man/man1
+  cp -a config/config   debian/"$blend"-config/usr/bin/"$blend"-config
+  cp -a config/config.1 debian/"$blend"-config/usr/share/man/man1/"$blend"-config.1
+
+  # install link to package helper script
+  for pkg in $TASKLIST ; do
+    mkdir -p debian/"$blend"-"$pkg"/usr/bin
+    mkdir -p debian/"$blend"-"$pkg"/usr/share/man/man1
+    ln -s "$blend"-config debian/"$blend"-"$pkg"/usr/bin/"$blend"-"$pkg"
+    ln -s "$blend"-config.1.gz debian/"$blend"-"$pkg"/usr/share/man/man1/"$blend"-"$pkg".1.gz
+  done
+fi
+
+# config/conf should really exist for the Blend registry in /etc/blends
+# currently there is no error message issued if it is missing but
+# this might be reasonable
+if [ -s config/conf ] ; then
+  # Get name of Debian Pure Blend
+  . config/conf
+  # Config file should set BLENDNAME, but if not try to build a useful one
+  if [ _"$BLENDNAME" = _"" ] ; then
+    BLENDNAME=Debian-`echo ${blend} | perl -ne 'print "\u\L$_";'`
+  fi
+  # Move templates for user configuration script
+  # In case there is a config {preinst/postinst} template, preserve this
+  [ -s config/preinst  ] && cp config/preinst  debian/"$blend"-config.preinst
+  [ -s config/postinst ] && cp config/postinst debian/"$blend"-config.postinst
+  for comm in `ls /usr/share/blends/templates/config.* /usr/share/blends/templates/apt.conf` ; do
+    commname=`basename $comm`
+    SubstBlendName ${commname} ${blend}-${commname}
+  done
+  # rename apt.conf.d file 
+  [ -s debian/${blend}-apt.conf ] && mv debian/${blend}-apt.conf debian/90${blend}-config
+  if [ -d debian/po.stub ] ; then
+      cp -a debian/po.stub debian/po
+  else
+      mkdir -p debian/po
+  fi
+  for po in `ls /usr/share/blends/templates/po/*` ; do
+    poname=`basename $po`
+    SubstBlendName po/${poname} po/${poname}
+  done
+  [ -d debian/po ] && debconf-updatepo
+
+  # Add common config file for ${blend}
+  mkdir -p debian/"$blend"-config/etc/blends/"$blend"
+  cp -a config/conf debian/"$blend"-config/etc/blends/"$blend"/"$blend".conf
+fi
diff --git a/devtools/rules b/devtools/rules
index 6f0d155..b8cb421 100755
--- a/devtools/rules
+++ b/devtools/rules
@@ -4,6 +4,8 @@
 # for a Debian Pure Blend.
 #
 # Copyright (C) Andreas Tille <tille at debian.org>
+# Copyright (C) Emmanouil Kiagias <e.kiagias at gmail.com>
+#
 # License: GPL
 
 BLENDNAME   := $(shell /usr/share/blends-dev/blend-get-names blendname)
diff --git a/examples/Makefile b/examples/Makefile
new file mode 100755
index 0000000..a75538c
--- /dev/null
+++ b/examples/Makefile
@@ -0,0 +1,13 @@
+#!/usr/bin/make -f
+
+BLENDMAKEFILE=/usr/share/blends-dev/Makefile
+
+CheckBlendMakefile := $(shell if [ -e $(BLENDMAKEFILE) ] ; then echo 1 ; else echo 0 ; fi)
+ifeq ($(CheckBlendMakefile),1)
+    include $(BLENDMAKEFILE)
+else
+    err := $(shell echo "$(BLENDMAKEFILE) is missing.  Please install blends-dev package!")
+endif
+
+dummy:
+	@echo $(err)
diff --git a/examples/README b/examples/README
new file mode 100644
index 0000000..9b3355f
--- /dev/null
+++ b/examples/README
@@ -0,0 +1,4 @@
+This is an example directory layout for building metapackages for a
+Debian Pure Blend with the name Debian-_BLEND_.  So search for the
+string _BLEND_ and replacing it with a real name would provide a basic
+skeleton to work with.
diff --git a/examples/config/README b/examples/config/README
new file mode 100644
index 0000000..e86b0c4
--- /dev/null
+++ b/examples/config/README
@@ -0,0 +1,2 @@
+If this directory exists a _BLEND_-common package is created.
+See for instance Debian Med packages.
diff --git a/examples/config/common b/examples/config/common
new file mode 100755
index 0000000..2c05a0a
--- /dev/null
+++ b/examples/config/common
@@ -0,0 +1,6 @@
+#!/bin/sh
+## Prints some info about that package and lets auto-apt work
+dpkg --status `basename $0` | \
+     grep -v ^Priority | \
+     grep -v ^Section | \
+     grep -v ^Installed-Size
diff --git a/examples/config/common.1 b/examples/config/common.1
new file mode 100644
index 0000000..699a525
--- /dev/null
+++ b/examples/config/common.1
@@ -0,0 +1,19 @@
+.TH _BLEND_-common 1 "October 24, 2008" "Debian-_BLEND_"
+.SH NAME
+.B _BLEND_-common
+.B _BLEND_-<metapackage_name>
+\- package information and auto-apt helper
+
+.SH SYNOPSIS
+.B _BLEND_-common
+.B _BLEND_-<metapackage_name>
+
+.SH DESCRIPTION
+Print just a simple information page about every _BLEND_-* package
+of the Debian _BLEND_ Blend.  Each metapackage has a 
+.I /usr/bin/_BLEND_-<metapackage_name>
+file which should print some usefull informations and could be serve
+as auto-apt helper.
+
+.SH AUTHOR
+Andreas Tille <tille at debian.org>.
diff --git a/examples/config/conf b/examples/config/conf
new file mode 100644
index 0000000..7ea8fa9
--- /dev/null
+++ b/examples/config/conf
@@ -0,0 +1,6 @@
+## This is a configuration file for the Debian _BLEND_ Blend
+## It is read after /etc/blends/blends.conf and can override or add variables
+
+## Some Blends do not build their name generic like Debian #BLEND# so
+## we need the correct name here
+BLENDNAME=Debian-_BLEND_
diff --git a/examples/config/control b/examples/config/control
new file mode 100644
index 0000000..8031b6f
--- /dev/null
+++ b/examples/config/control
@@ -0,0 +1,9 @@
+Package: _BLEND_-config
+Architecture: all
+Depends: adduser,
+         ${misc:Depends},
+         menu,
+         blends-common (>= 0.6)
+Description: Debian _BLEND_ Project config package
+ This package builds the basic infra structure of all metapackages
+ for the Debian _BLEND_ Blend.
diff --git a/examples/debian/README b/examples/debian/README
new file mode 100644
index 0000000..7af00bc
--- /dev/null
+++ b/examples/debian/README
@@ -0,0 +1,3 @@
+You always need this directory to build metapackages.
+Just change control.stub and replace the variables _BLEND_ and
+_MAINTAINER_ to the apropriate strings.
diff --git a/examples/debian/compat b/examples/debian/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/examples/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/examples/debian/control.stub b/examples/debian/control.stub
new file mode 100644
index 0000000..ae1c387
--- /dev/null
+++ b/examples/debian/control.stub
@@ -0,0 +1,9 @@
+Source: debian-_BLEND_
+Section: misc
+Priority: extra
+Maintainer: _MAINTAINER_ <_maintainer_ at debian.org>
+Uploaders: _OPTIONAL-FURTHER-MAINTAINER_ <_optional-further-maintainer_ at debian.org>
+Build-Depends-Indep: debhelper (>= 9),
+                     blends-dev (>= 0.6.16.4)
+Standards-Version: 3.9.4
+
diff --git a/examples/debian/dis-task1.install b/examples/debian/dis-task1.install
new file mode 100644
index 0000000..1d788b2
--- /dev/null
+++ b/examples/debian/dis-task1.install
@@ -0,0 +1,2 @@
+### this file is optional and only needed if the install directory is needed
+install/task1/extra-script-which-is-needed-in-task1 usr/bin
diff --git a/examples/debian/dis-task1.manpages b/examples/debian/dis-task1.manpages
new file mode 100644
index 0000000..d3dc4bd
--- /dev/null
+++ b/examples/debian/dis-task1.manpages
@@ -0,0 +1,2 @@
+### this file is optional and only needed if the install directory is needed
+install/task1/extra-script-which-is-needed-in-task1.1
diff --git a/examples/debian/rules b/examples/debian/rules
new file mode 100755
index 0000000..908ab44
--- /dev/null
+++ b/examples/debian/rules
@@ -0,0 +1,3 @@
+#!/usr/bin/make -f
+
+include /usr/share/blends-dev/rules
diff --git a/examples/install/README b/examples/install/README
new file mode 100644
index 0000000..e5dc2ab
--- /dev/null
+++ b/examples/install/README
@@ -0,0 +1,9 @@
+If some extra files like scripts of manpages are needed in the
+metapackages they should be placed into apropriate subdirectories of
+this directory.  While there is no certain procedure in the blends-dev
+tools to handle files in this directory it might be a good idea to
+settle down with some default place for those extra files.  To move
+them right into place the files debian/<pkg>.install,
+debian/<pkg>.manpages etc. should be used.
+
+See for instance Debian Med packages.
diff --git a/examples/install/task1/extra-script-which-is-needed-in-task1 b/examples/install/task1/extra-script-which-is-needed-in-task1
new file mode 100755
index 0000000..2d16991
--- /dev/null
+++ b/examples/install/task1/extra-script-which-is-needed-in-task1
@@ -0,0 +1,2 @@
+#!/bin/sh
+echo "Do something useful for task1."
diff --git a/examples/install/task1/extra-script-which-is-needed-in-task1.1 b/examples/install/task1/extra-script-which-is-needed-in-task1.1
new file mode 100644
index 0000000..7adfab0
--- /dev/null
+++ b/examples/install/task1/extra-script-which-is-needed-in-task1.1
@@ -0,0 +1,15 @@
+.TH extra-script-which-is-needed-in-task1 1 "<date>" "#BLEND#"
+.SH NAME
+.B extra-script-which-is-needed-in-task1 
+\- some useful script for task1
+
+.SH SYNOPSIS
+.B extra-script-which-is-needed-in-task1 
+
+.SH DESCRIPTION
+The task makes no sense without this script - or at least this script
+provides extra functionality which is not in any of the single
+dependencies.
+
+.SH AUTHOR
+Metapackage Autor <mpa at debian.org>.
diff --git a/examples/menu/README b/examples/menu/README
new file mode 100644
index 0000000..81b4f45
--- /dev/null
+++ b/examples/menu/README
@@ -0,0 +1,26 @@
+If this directory exists, menu entries for the single metapackages can
+be provided here.  The files should have the same name as the files in
+the tasks directory and ideally each single task should have its own
+menu.
+
+See for instance Debian Med packages.
+
+In general a metapackage should provide a menu for every dependent
+package.  This menu entry should either point to a package executable
+(perhaps with some special hints assigned) or to a pager call which
+provides some extra information how the special package can be used.
+For instance this can be done via text files
+/usr/share/doc/_BLEND_task1/deppkg1.txt (see Debian Med).
+
+The idea is to provide a special _BLEND_ menu with the relevant parts
+for the users of the _BLEND_.
+
+At install time the existing dependencies are checked for their menu
+entries.  These are taken over into the user menu.  If the metapackage
+maintainer wants to override this entry he is able to provide
+menu/<task>/<dep>.menu files.  If there is no reasonable menu entry
+for a package extra documentation can be provided which can be viewed
+via menu entries.  This can either be given as plain text files
+menu/<task>/<dep>.txt or HTML files menu/<task>/<dep>.html.  The
+created menu entry calls sensible-pager or sensible-browser,
+respectively.
diff --git a/examples/menu/task1/README b/examples/menu/task1/README
new file mode 100644
index 0000000..f00dbdf
--- /dev/null
+++ b/examples/menu/task1/README
@@ -0,0 +1,16 @@
+Here you can place overrides for the package maintainer menu entries
+in normal menu syntax as files <dep>.menu .
+
+Sometimes it is not possible to provide a useful menu entry for a
+package and thus we would fail to create a menu entry for a dependency
+inside a metapackage.  This sucks in term of user support and thus it
+is strongly suggested to provide some information about each dependant
+package which has no reasonable menu entry.
+
+This can easily done by creating a text file with the name of the
+dependency, i.e. dep2.txt.  Alternatively you can provide HTML
+formated description as dep3.html.
+
+These files should provide all information which is necessary to use
+this package, like man pages online documentation, usage examples,
+upstream URL, etc.
diff --git a/examples/menu/task1/dep1.menu b/examples/menu/task1/dep1.menu
new file mode 100644
index 0000000..95a717a
--- /dev/null
+++ b/examples/menu/task1/dep1.menu
@@ -0,0 +1,5 @@
+?package(dep1): needs   = "X11" \
+                section = "_BLEND_/Task1" \
+                title   = "DepPkg1" \
+		command = "/usr/bin/deppkg1" \
+		hints   = "Use of DepPkg1"
diff --git a/examples/menu/task1/dep2.txt b/examples/menu/task1/dep2.txt
new file mode 100644
index 0000000..d341b00
--- /dev/null
+++ b/examples/menu/task1/dep2.txt
@@ -0,0 +1,18 @@
+dep2: Short description of package dep2
+
+Some information about dep2 from the Debian-_BLEND_ project.
+
+ long description of dep2
+ 
+ More infromation about the dep2 package can be obtained from the following
+ manpages:
+ 
+   dep2_a.1 dep2_b.1 ...
+
+ You can use this package in the following way:
+
+   ...
+
+ More information about dep2 can be obtained from the home page at
+
+   http://www.dep2.org/
diff --git a/examples/menu/task1/dep3.html b/examples/menu/task1/dep3.html
new file mode 100644
index 0000000..0ed7e19
--- /dev/null
+++ b/examples/menu/task1/dep3.html
@@ -0,0 +1,15 @@
+<html>
+<head>
+<title>Description of dep3</title>
+<meta name="author" content="<metapackage author>" />
+</head>
+<body>
+<h2>dep3: Short description of package dep3</h2>
+<p>
+ long description of dep3
+</p>
+
+<h4>For more detailed information see:</h4>
+
+</body>
+</html>
diff --git a/examples/tasks/README b/examples/tasks/README
new file mode 100644
index 0000000..067aeeb
--- /dev/null
+++ b/examples/tasks/README
@@ -0,0 +1,4 @@
+This directory is mandatory.  Each file had to follow a certain syntax
+to build a valid control file entry for the metapackage to build.
+
+For an extensive and working example see Debian Med packages >= 1.0 .
diff --git a/examples/tasks/task1 b/examples/tasks/task1
new file mode 100644
index 0000000..3145943
--- /dev/null
+++ b/examples/tasks/task1
@@ -0,0 +1,17 @@
+Task: task1
+Description: Debian-_BLEND_ task1 packages
+ This metapackage will install Debian packages for use in 
+ task1 of Debian-_BLEND_.
+
+Depends: dep-pkg1, dep-pkg2, ...
+Suggests: sug-pkg1, ...
+
+Depends: dep-pkg42
+Why:     You might provide some reasons here ...
+Responsible: Somebody who cares
+NeedConfig:  no / yes via debconf
+
+Depends:     _BLEND_-common
+Why:         Optional reason for dependency of the _BLEND_-common package
+Responsible: Optional _BLEND_Maintainer
+NeedConfig:  Optional yes via debconf
diff --git a/tasks_diff b/tasks_diff
index 5de88ad..5fe4c95 100755
--- a/tasks_diff
+++ b/tasks_diff
@@ -4,8 +4,7 @@
 # License: GPL
 
 """
-this module is still under construction, just testing stuff around
-before I write the complete script
+no  documentation for the moment
 """
 
 import os
diff --git a/templates/README.Debian b/templates/README.Debian
new file mode 100644
index 0000000..619fe68
--- /dev/null
+++ b/templates/README.Debian
@@ -0,0 +1,22 @@
+This is a metapackage which is used by Debian Pure Blends
+---------------------------------------------------------
+
+This package is a metapackage; it depends on several other packages to make
+them be installed when it is installed. If you want to remove one of those
+packages, you have to remove this package as well. The other packages won't be
+touched.
+
+There exists an comprehensive documentation about Debian Pure Blends
+which can be found at http://blends.alioth.debian.org/blends/.
+
+The metapackages should always be installable on a Debian system.
+Thus no dependency on a non-available package (ie. a package available
+outside of Debian) have been used. However such dependencies have
+been downgraded to Suggests.
+
+Sometimes some non-free packages are suggested when no good free
+alternatives are known. You're encouraged to find good free
+replacements.
+
+Perhaps type-handling might gives us a way to specify arch-dependant
+dependencies.
diff --git a/templates/apt.conf b/templates/apt.conf
new file mode 100644
index 0000000..4386376
--- /dev/null
+++ b/templates/apt.conf
@@ -0,0 +1,7 @@
+/*
+ * APT configuration file for #BLEND#-config package
+ */
+
+DPkg {
+	Post-Invoke {"test -f /var/run/#BLEND#-config.usermenu && if [ -x /usr/sbin/blend-update-usermenus ] ; then /usr/sbin/blend-update-usermenus #BLEND# ; fi ; rm -f /var/run/#BLEND#-config.usermenu";};
+}
diff --git a/templates/config.config b/templates/config.config
new file mode 100755
index 0000000..073851c
--- /dev/null
+++ b/templates/config.config
@@ -0,0 +1,54 @@
+#!/bin/sh -e
+
+# Initialize debconf if not yet done
+if [ _"$DEBCONF_REDIR" = _"" ]; then
+    . /usr/share/debconf/confmodule
+    db_version 2.0
+    db_capb backup
+fi
+
+db_input "medium" "shared/#BLEND#-config/useusermenus" || true
+db_go
+db_get shared/#BLEND#-config/useusermenus
+if [ $RET ] ; then
+    db_input "medium" "shared/#BLEND#-config/usermenus" || true
+    db_go
+fi
+
+# if blends.config package is not yet installed we have to stop here
+if [ ! -f /etc/blends/blends.conf ] ; then
+   db_stop
+   exit 0
+fi
+
+[ -s /etc/blends/blends.conf ]         && . /etc/blends/blends.conf
+[ -s /etc/blends/#BLEND#/#BLEND#.conf ] && . /etc/blends/#BLEND#/#BLEND#.conf
+
+# Add at least one default role for each Blend
+addRole #BLEND# #BLEND#
+
+# Login names of all users of the system as comma separated list 
+USERS=`getAllUsers 0 ,`
+
+# "login (Real Name)" of users registered to the Debian Pure Blend #BLEND#
+BLENDUSERS=`getUsersInRole #BLEND# #BLEND# 0 ,`
+
+db_set #BLEND#-config/group "$BLENDUSERS"
+db_subst #BLEND#-config/group users "$USERS"
+db_get #BLEND#-config/group
+
+db_input high #BLEND#-config/group || true
+db_go
+
+db_stop
+
+if [ -d /etc/blends/#BLEND#/ ] ; then 
+    if [ ! -f /etc/blends/#BLEND#/#BLEND#.conf ] ; then 
+        # Due to a bug in blends-common the real Blend config file was moved to #BLEND#.conf~.  This is fixed here
+        if [ -f /etc/blends/#BLEND#/#BLEND#.conf~ ] ; then
+            cp -a /etc/blends/#BLEND#/#BLEND#.conf~ /etc/blends/#BLEND#/#BLEND#.conf
+        fi
+    fi
+fi
+                
+exit 0
diff --git a/templates/config.install b/templates/config.install
new file mode 100644
index 0000000..7bacde6
--- /dev/null
+++ b/templates/config.install
@@ -0,0 +1 @@
+debian/90#BLEND#-config   etc/apt/apt.conf.d
diff --git a/templates/config.links b/templates/config.links
new file mode 100644
index 0000000..5c234cc
--- /dev/null
+++ b/templates/config.links
@@ -0,0 +1 @@
+usr/share/blends/blend-task-lister usr/lib/tasksel/#BLEND#-task-files
diff --git a/templates/config.postinst b/templates/config.postinst
new file mode 100755
index 0000000..1a8997e
--- /dev/null
+++ b/templates/config.postinst
@@ -0,0 +1,46 @@
+#!/bin/sh -e
+
+# if blends-common package is not yet installed we have to stop here
+if [ ! -f /etc/blends/blends.conf ] ; then
+   echo "Debian Pure Blends configuration file /etc/blends/blends.conf is missing."
+   exit -1
+fi
+. /etc/blends/blends.conf
+
+if [ ! -f /etc/blends/#BLEND#/#BLEND#.conf ] ; then
+   echo "#BLENDNAME# configuration file /etc/blends/#BLEND#/#BLEND#.conf is missing."
+   exit -1
+fi
+. /etc/blends/#BLEND#/#BLEND#.conf
+
+# Source debconf library.
+. /usr/share/debconf/confmodule
+db_version 2.0
+
+# If $USEUSERMENU is not set in /etc/blends/#BLEND#/#BLEND#.conf read it from debconf database
+if [ -z $USEUSERMENU ] ; then
+    db_get shared/#BLEND#-config/useusermenus
+    if [ $RET ] ; then
+	USEUSERMENU="yes"
+    fi
+fi
+
+if [ "$USEUSERMENU" = "yes" ] ; then
+    db_get #BLEND#-config/group 
+
+    CURRENTBLENDUSERS=`getUsersInRole #BLEND# #BLEND# 1`
+    # Add those users which were selected but are not yet in the group
+    for user in `echo "$RET" | sed "s/([^)]*)//g" | sed "s/ //g" |  tr ',' '\n'` ; do
+	if [ `echo "${CURRENTBLENDUSERS}" | grep -c -w "$user"` -eq 0 ] ; then
+	    blend-user add #BLEND# $user
+	fi
+    done
+    # Del those users which were obviousely removed from list of Blend users
+    for user in `getAllUsers 1` ; do
+	if [ `echo "$RET" | grep -c -w "$user"` -eq 0 ] && [ `getent group #BLEND# | grep -c -w $user` -gt 0 ] ; then
+	    blend-user del #BLEND# $user
+	fi
+    done
+fi
+
+#DEBHELPER#
diff --git a/templates/config.templates b/templates/config.templates
new file mode 100644
index 0000000..47892be
--- /dev/null
+++ b/templates/config.templates
@@ -0,0 +1,36 @@
+Template: #BLEND#-config/group
+Type: multiselect
+Choices: ${users}
+_Description: #BLENDNAME# users:
+ Please select, among the whole system user list, users who should get
+ a #BLENDNAME# user menu.
+
+Template: shared/#BLEND#-config/usermenus
+Type: select
+_Choices: Each package installation, End of installation, Never
+Default: never
+_Description: Build user menus at:
+ The metapackages of the #BLENDNAME# Debian Pure Blend
+ contain extra menus that will be auto generated from existing packages.
+ If the role based user menu option was choosen these menus will be built
+ when a user who is registered to a given role uses the "update-menus"
+ utility.  This can be done automatically for all users who are registered
+ for #BLENDNAME# after installation of each single metapackage,
+ at the end of the whole installation process to save time in case
+ of installing more than one metapackage or just leave the call of
+ "update-menus" to the users themselves.
+  * Each package installation : Call "update-menus" after each metapackage
+                               (time consuming);
+  * End of installation       : Call "update-menus" only once at the end of
+                                the whole installation/upgrading process;
+  * Never                     : Do not call "update-menus" at all.
+
+Template: shared/#BLEND#-config/useusermenus
+Type: boolean
+_Description: Do you want user menus?
+ The menus for the #BLENDNAME# Debian Pure Blend could be
+ implemented as user menus which means they are visible only for those
+ users that will be selected explicitely.  Be warned that selecting
+ the users from a large list does not scale very well so it makes no
+ real sense to activate this feature if there are more than 50 users
+ on this machine.
diff --git a/templates/po/POTFILES.in b/templates/po/POTFILES.in
new file mode 100644
index 0000000..5b07d9c
--- /dev/null
+++ b/templates/po/POTFILES.in
@@ -0,0 +1 @@
+[type: gettext/rfc822deb] config.templates
diff --git a/templates/po/ca.po b/templates/po/ca.po
new file mode 100644
index 0000000..b76bd05
--- /dev/null
+++ b/templates/po/ca.po
@@ -0,0 +1,87 @@
+#
+#    Translators, if you are not familiar with the PO format, gettext
+#    documentation is worth reading, especially sections dedicated to
+#    this format, e.g. by running:
+#         info -n '(gettext)PO Files'
+#         info -n '(gettext)Header Entry'
+#
+#    Some information specific to po-debconf are available at
+#            /usr/share/doc/po-debconf/README-trans
+#         or http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+#    Developers do not need to manually edit POT or PO files.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: blends 0.4\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2004-06-28 15:58+0200\n"
+"PO-Revision-Date: 2004-09-07 20:59+0200\n"
+"Last-Translator: Guillem Jover <guillem at debian.org>\n"
+"Language-Team: Catalan <debian-l10n-catalan at debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: multiselect
+#. Description
+#: ../config.templates:4
+msgid "#BLENDNAME# users:"
+msgstr "Usuaris de #BLENDNAME#:"
+
+#. Type: multiselect
+#. Description
+#: ../config.templates:4
+msgid ""
+"Please select, among the whole system user list, users who should get a "
+"#BLENDNAME# user menu."
+msgstr ""
+"Si us plau seleccioneu, de la llista de tots els usuaris del sistema, "
+"aquells usuaris que han d'obtenir un menú d'usuari de #BLENDNAME#."
+
+#. Type: select
+#. Choices
+#: ../config.templates:10
+msgid "Each package installation, End of installation, Never"
+msgstr "En cada instal·lació d'un paquet, Al final de la instal·lació, Mai"
+
+#. Type: select
+#. Description
+#: ../config.templates:12
+msgid "Build user menus at:"
+msgstr "Construir els menús d'usuari a:"
+
+#. Type: select
+#. Description
+#: ../config.templates:12
+msgid ""
+"The meta packages of the #BLENDNAME# Debian Pure Blend contain extra "
+"role based menus for users. These will be built when a user who is "
+"registered to a given role uses the \"update-menus\" utility.  This can be "
+"done automatically for all users who are registered for #BLENDNAME# after "
+"installation of each single meta package, at the end of the whole "
+"installation process to save time in case of installing more than one meta "
+"package or just leave the call of \"update-menus\" to the users themselves.\n"
+" * Each package installation : Call \"update-menus\" after each meta "
+"package\n"
+"                              (time consuming);\n"
+" * End of installation       : Call \"update-menus\" only once at the end "
+"of\n"
+"                               the whole installation/upgrading process;\n"
+" * Never                     : Do not call \"update-menus\" at all."
+msgstr ""
+"Els meta paquets de la distribució de Debian adaptada #BLENDNAME# contenen "
+"menús extra basats en rols per als usuaris. Aquests seran construïts quan "
+"un usuari que estigui registrat en algun dels rols faci servir la utilitat "
+"«update-menus». Això es pot fer automàticament per a tots els usuaris que "
+"estiguin registrats per #BLENDNAME# després de la instal·lació de cada meta "
+"paquet, al final de tot el procés d'instal·lació per a estalviar temps en "
+"cas d'instal·lar més d'un meta paquet o senzillament deixar l'execució de "
+"«update-menus» als propis usuaris.\n"
+" * En cada instal·lació d'un paquet: Executar «update-menus» després de cada\n"
+"                                     meta paquet (consumeix molt de temps);\n"
+" * Al final d'instal·lació         : Executar «update-menus» només al final\n"
+"                                     de tota la instal·lació o procés\n"
+"                                     d'actualització;\n"
+" * Mai                             : No executar mai «update-menus»."
+
diff --git a/templates/po/de.po b/templates/po/de.po
new file mode 100644
index 0000000..fd54264
--- /dev/null
+++ b/templates/po/de.po
@@ -0,0 +1,84 @@
+#
+#    Translators, if you are not familiar with the PO format, gettext
+#    documentation is worth reading, especially sections dedicated to
+#    this format, e.g. by running:
+#         info -n '(gettext)PO Files'
+#         info -n '(gettext)Header Entry'
+#
+#    Some information specific to po-debconf are available at
+#            /usr/share/doc/po-debconf/README-trans
+#         or http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+#    Developers do not need to manually edit POT or PO files.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: #BLEND#-config\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2004-06-28 15:58+0200\n"
+"PO-Revision-Date: 2008-10-26 07:42+0100\n"
+"Last-Translator: Andreas Tille <tille at debian.org>\n"
+"Language-Team: German <debian-l10n-german at lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: multiselect
+#. Description
+#: ../config.templates:4
+msgid "#BLENDNAME# users:"
+msgstr "#BLENDNAME# Nutzer:"
+
+#. Type: multiselect
+#. Description
+#: ../config.templates:4
+msgid ""
+"Please select, among the whole system user list, users who should get a "
+"#BLENDNAME# user menu."
+msgstr ""
+"Bitte wählen Sie aus der Liste aller Nutzer des Systems diejenigen aus, die "
+"ein #BLENDNAME# Nutzermenü erhalten sollen."
+
+#. Type: select
+#. Choices
+#: ../config.templates:10
+msgid "Each package installation, End of installation, Never"
+msgstr "Paketinstallation, Installationsende, Nie"
+
+#. Type: select
+#. Description
+#: ../config.templates:12
+msgid "Build user menus at:"
+msgstr "Erzeugen der Nutzermenüs bei:"
+
+#. Type: select
+#. Description
+#: ../config.templates:12
+msgid ""
+"The metapackages of the #BLENDNAME# Debian Pure Blend contain extra "
+"role based menus for users. These will be built when a user who is "
+"registered to a given role uses the \"update-menus\" utility.  This can be "
+"done automatically for all users who are registered for #BLENDNAME# after "
+"installation of each single metapackage, at the end of the whole "
+"installation process to save time in case of installing more than one meta "
+"package or just leave the call of \"update-menus\" to the users themselves.\n"
+" * Each package installation : Call \"update-menus\" after each meta "
+"package\n"
+"                              (time consuming);\n"
+" * End of installation       : Call \"update-menus\" only once at the end "
+"of\n"
+"                               the whole installation/upgrading process;\n"
+" * Never                     : Do not call \"update-menus\" at all."
+msgstr ""
+"Die Metapakete der Debian Pure Blend #BLENDNAME# enthalten Rollen "
+"basierte Nutzermenüs.  Diese werden erzeugt, wenn ein Nutzer, der für eine "
+"bestimmte Rolle registriert ist, das Programm \"update-menus\" aufruft. Das "
+"kann automatisch für alle für #BLENDNAME# registrierten Nutzer geschehen und "
+"zwar nach der Installation jedes einzelnen Metapaketes oder zeitsparend am "
+"Ende des Installationsprozesses mehrerer Metapakete.  Alternativ kann "
+"\"update-menus\" auch manuell durch jeden Nutzer aufgerufen werden.\n"
+" * Paketinstallation : \"update-menus\" nach jeder Metapaketinstallation\n"
+"                       aufrufen (zeitintensiv).\n"
+" * Installationsende : \"update-menus\" einmalig am Ende des\n"
+"                       Installations- oder Updateprozesses aufrufen.\n"
+" * Nie               : \"update-menus\" nicht aufrufen.\n"
diff --git a/templates/po/fr.po b/templates/po/fr.po
new file mode 100644
index 0000000..9348ddf
--- /dev/null
+++ b/templates/po/fr.po
@@ -0,0 +1,92 @@
+# translation of fr.po to French
+#
+#    Translators, if you are not familiar with the PO format, gettext
+#    documentation is worth reading, especially sections dedicated to
+#    this format, e.g. by running:
+#         info -n '(gettext)PO Files'
+#         info -n '(gettext)Header Entry'
+#
+#    Some information specific to po-debconf are available at
+#            /usr/share/doc/po-debconf/README-trans
+#         or http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+#    Developers do not need to manually edit POT or PO files.
+# Christian Perrier <bubulle at debian.org>, 2004.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: #BLEND#-config\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2004-06-28 15:58+0200\n"
+"PO-Revision-Date: 2004-06-29 08:04+0200\n"
+"Last-Translator: Eric Madesclair <eric-m at wanadoo.fr>\n"
+"Language-Team: French <debian-l10n-french at lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.3.1\n"
+"Plural-Forms: Plural-Forms: nplurals=2; plural=n>1;\n"
+
+#. Type: multiselect
+#. Description
+#: ../config.templates:4
+msgid "#BLENDNAME# users:"
+msgstr "Utilisateurs de #BLENDNAME# :"
+
+#. Type: multiselect
+#. Description
+#: ../config.templates:4
+msgid ""
+"Please select, among the whole system user list, users who should get a "
+"#BLENDNAME# user menu."
+msgstr ""
+"Veuillez choisir parmi tous les utilisateurs du système ceux qui auront un "
+"menu #BLENDNAME#."
+
+#. Type: select
+#. Choices
+#: ../config.templates:10
+msgid "Each package installation, End of installation, Never"
+msgstr "À chaque installation de paquet, À la fin de l'installation, Jamais"
+
+#. Type: select
+#. Description
+#: ../config.templates:12
+msgid "Build user menus at:"
+msgstr "Construction des menus des utilisateurs :"
+
+#. Type: select
+#. Description
+#: ../config.templates:12
+msgid ""
+"The metapackages of the #BLENDNAME# Debian Pure Blend contain extra "
+"role based menus for users. These will be built when a user who is "
+"registered to a given role uses the \"update-menus\" utility.  This can be "
+"done automatically for all users who are registered for #BLENDNAME# after "
+"installation of each single metapackage, at the end of the whole "
+"installation process to save time in case of installing more than one meta "
+"package or just leave the call of \"update-menus\" to the users themselves.\n"
+" * Each package installation : Call \"update-menus\" after each meta "
+"package\n"
+"                              (time consuming);\n"
+" * End of installation       : Call \"update-menus\" only once at the end "
+"of\n"
+"                               the whole installation/upgrading process;\n"
+" * Never                     : Do not call \"update-menus\" at all."
+msgstr ""
+"Les méta-paquets de la distribution Debian spécialisée #BLENDNAME# comportent "
+"des menus additionnels suivant le rôle attribué aux utilisateurs. Ces menus "
+"sont construits quand un utilisateur enregistré dans un rôle donné lancera "
+"la commande « update-menus ». Cette opération peut se faire automatiquement "
+"après l'installation de chaque méta-paquet pour chaque utilisateur "
+"enregistré pour #BLENDNAME# ou à la fin du processus d'installation pour "
+"gagner du temps si plu sd'un méta-paquet est installé. Il est également "
+"possible de laisser aux utilisateurs l'initiative de lancer eux-même la "
+"commande.\n"
+" - À chaque installation de paquet : lancer « update-menus » après\n"
+"                                     l'installation de chaque méta-paquet\n"
+"                                     (cette opération peut être longue) ;\n"
+" - À la fin de l'installation      : lancer « update-menus » seulement\n"
+"                                     à la fin de la procédure\n"
+"                                     d'installation ou de mise à jour ;\n"
+" - Jamais                          : ne pas du tout lancer « update-menus »."
diff --git a/templates/po/pt_BR.po b/templates/po/pt_BR.po
new file mode 100644
index 0000000..9dda3f2
--- /dev/null
+++ b/templates/po/pt_BR.po
@@ -0,0 +1,88 @@
+#
+#    Translators, if you are not familiar with the PO format, gettext
+#    documentation is worth reading, especially sections dedicated to
+#    this format, e.g. by running:
+#         info -n '(gettext)PO Files'
+#         info -n '(gettext)Header Entry'
+#
+#    Some information specific to po-debconf are available at
+#            /usr/share/doc/po-debconf/README-trans
+#         or http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+#    Developers do not need to manually edit POT or PO files.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: blends-dev\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2004-06-28 15:58+0200\n"
+"PO-Revision-Date: 2004-06-29 22:00-0300\n"
+"Last-Translator: André Luís Lopes <andrelop at debian.org>\n"
+"Language-Team: Debian-BR Project <debian-l10n-portuguese at lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: multiselect
+#. Description
+#: ../config.templates:4
+msgid "#BLENDNAME# users:"
+msgstr "Usuários #BLENDNAME# : "
+
+#. Type: multiselect
+#. Description
+#: ../config.templates:4
+msgid ""
+"Please select, among the whole system user list, users who should get a "
+"#BLENDNAME# user menu."
+msgstr ""
+"Por favor, selecione dentre a lista de usuários de todo o sistema os "
+"usuários que devem obter um menu de usuário do #BLENDNAME#."
+
+#. Type: select
+#. Choices
+#: ../config.templates:10
+msgid "Each package installation, End of installation, Never"
+msgstr "A cada instalação de pacote, Ao final da instalação, Nunca"
+
+#. Type: select
+#. Description
+#: ../config.templates:12
+msgid "Build user menus at:"
+msgstr "Construir menus de usuários :"
+
+#. Type: select
+#. Description
+#: ../config.templates:12
+msgid ""
+"The metapackages of the #BLENDNAME# Debian Pure Blend contain extra "
+"role based menus for users. These will be built when a user who is "
+"registered to a given role uses the \"update-menus\" utility.  This can be "
+"done automatically for all users who are registered for #BLENDNAME# after "
+"installation of each single metapackage, at the end of the whole "
+"installation process to save time in case of installing more than one meta "
+"package or just leave the call of \"update-menus\" to the users themselves.\n"
+" * Each package installation : Call \"update-menus\" after each meta "
+"package\n"
+"                              (time consuming);\n"
+" * End of installation       : Call \"update-menus\" only once at the end "
+"of\n"
+"                               the whole installation/upgrading process;\n"
+" * Never                     : Do not call \"update-menus\" at all."
+msgstr ""
+"Os meta-pacotes da Debian Pure Blend #BLENDNAME# contém "
+"menus extras para usuários com base em suas funções. Tais menus serão "
+"gerados quando um usuário registrado para uma função específica utilizar "
+"o utilitário \"update-menus\". Isso pode ser feito automaticamente para "
+"todos os usuários que estejam registrados para o #BLENDNAME# após a "
+"instalação de cada meta-pacote, ao final de todo o processo de instalação "
+"para economizar tempo no caso da instalação de mais de um meta-pacote ou "
+"deixar a execução do utilitário \"update-menus\" por conta dos prórios"
+"usuários.\n"
+" * A cada instalação de pacote : Executa \"update-menus\" após cada meta "
+"pacote\n"
+"                                 (consome muito tempo);\n"
+" * Ao final da instalação      : Executa \"update-menus\" uma única vez "
+"no final\n"
+"                                 do processo completo de instalação/atualização;\n"
+" * Nunca                       : Não executa \"update-menus\"."
diff --git a/templates/po/templates.pot b/templates/po/templates.pot
new file mode 100644
index 0000000..2836f8d
--- /dev/null
+++ b/templates/po/templates.pot
@@ -0,0 +1,71 @@
+#
+#    Translators, if you are not familiar with the PO format, gettext
+#    documentation is worth reading, especially sections dedicated to
+#    this format, e.g. by running:
+#         info -n '(gettext)PO Files'
+#         info -n '(gettext)Header Entry'
+#
+#    Some information specific to po-debconf are available at
+#            /usr/share/doc/po-debconf/README-trans
+#         or http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+#    Developers do not need to manually edit POT or PO files.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2004-06-28 15:58+0200\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: multiselect
+#. Description
+#: ../config.templates:4
+msgid "#BLENDNAME# users:"
+msgstr ""
+
+#. Type: multiselect
+#. Description
+#: ../config.templates:4
+msgid ""
+"Please select, among the whole system user list, users who should get a "
+"#BLENDNAME# user menu."
+msgstr ""
+
+#. Type: select
+#. Choices
+#: ../config.templates:10
+msgid "Each package installation, End of installation, Never"
+msgstr ""
+
+#. Type: select
+#. Description
+#: ../config.templates:12
+msgid "Build user menus at:"
+msgstr ""
+
+#. Type: select
+#. Description
+#: ../config.templates:12
+msgid ""
+"The metapackages of the #BLENDNAME# Debian Pure Blend contain extra "
+"role based menus for users. These will be built when a user who is "
+"registered to a given role uses the \"update-menus\" utility.  This can be "
+"done automatically for all users who are registered for #BLENDNAME# after "
+"installation of each single metapackage, at the end of the whole "
+"installation process to save time in case of installing more than one meta "
+"package or just leave the call of \"update-menus\" to the users themselves.\n"
+" * Each package installation : Call \"update-menus\" after each meta "
+"package\n"
+"                              (time consuming);\n"
+" * End of installation       : Call \"update-menus\" only once at the end "
+"of\n"
+"                               the whole installation/upgrading process;\n"
+" * Never                     : Do not call \"update-menus\" at all."
+msgstr ""
diff --git a/templates/postinst b/templates/postinst
new file mode 100755
index 0000000..080cf46
--- /dev/null
+++ b/templates/postinst
@@ -0,0 +1,69 @@
+#!/bin/sh
+set -e
+
+# This is the default postinst file from the blends-dev package which is used
+# in all meta packages.  If there is a certain need to provide extra
+# postinst files for some meta packages this template will be appended.  Thus
+# it will be checked whether debconf was just initialized.
+#
+# You should not insert the _DEBHELPER_ template in the special postscript
+# file because it is in the end of this template anyway.
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <postinst> `abort-remove'
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+###########################################################################
+# If the user menus are not needed/wished for a Blend (like for instance
+# Debian Edu there is no need to install blends-common package.  Thus we
+# have to make sure that postinst does not try to include the menu stuff
+if [ -d /etc/blends -a -f /etc/blends/blends.conf ] ; then
+    # Also verify that this Blend provides special configuration
+    # If not there is no need to execute the user menu code
+    if [ -d /etc/blends/#BLEND# -a -f /etc/blends/#BLEND#/#BLEND#.conf ] ; then
+        test -x /usr/sbin/blend-update-menus && blend-update-menus --blend #BLEND#
+
+	# Initialize debconf if not yet done
+	if [ _"$DEBCONF_REDIR" = _"" ]; then
+	    . /usr/share/debconf/confmodule
+    	    db_version 2.0
+	fi
+
+	. /etc/blends/blends.conf
+	if [ -s /etc/blends/#BLEND#/#BLEND#.conf ] ; then . /etc/blends/#BLEND#/#BLEND#.conf ; fi
+
+	case "$1" in
+	    abort-deconfigure|abort-remove|abort-upgrade)
+		;;
+    	    configure|upgrade)
+		db_get "shared/#BLEND#-config/usermenus" || true
+		case "$RET" in
+    		    "Each package installation")
+        		blend-update-usermenus #BLEND#
+            		;;
+        	    "End of installation")
+            		touch /var/run/#BLEND#-config.usermenu
+            		;;
+    		esac
+		;;
+	    *)
+		echo "postinst called with unknown argument \`$1'" >&2
+		exit 1
+		;;
+	esac
+
+	db_stop
+    fi
+fi
+
+#DEBHELPER#
+
+exit 0
diff --git a/templates/prerm b/templates/prerm
new file mode 100755
index 0000000..5d245ee
--- /dev/null
+++ b/templates/prerm
@@ -0,0 +1,56 @@
+#!/bin/sh
+set -e
+
+# This is the default prerm file from the blends-dev package which is used
+# in all meta packages.  If there is a certain need to provide extra
+# prerm files for some meta packages this template will be appended.  Thus
+# it will be checked whether debconf was just initialized.
+#
+# You should not insert the _DEBHELPER_ template in the special postscript
+# file because it is in the end of this template anyway.
+
+###########################################################################
+# If the user menus are not needed/wished for a Blend (like for instance
+# Debian Edu there is no need to install blends-common package.  Thus we
+# have to make sure that postinst does not try to include the menu stuff
+if [ -d /etc/blends -a -f /etc/blends/blends.conf ] ; then
+    # Also verify that this Blend provides special configuration
+    # If not there is no need to execute the user menu code
+    if [ -d /etc/blends/#BLEND# -a -s /etc/blends/#BLEND#/#BLEND#.conf -a -s /etc/blends/blends.conf ] ; then
+	if [ -x /usr/sbin/blend-update-usermenus ] ; then
+	    . /etc/blends/blends.conf
+	    . /etc/blends/#BLEND#/#BLEND#.conf
+	    blend-update-menus --blend #BLEND# 
+	    
+	    # Initialize debconf if not yet done
+	    if [ _"$DEBCONF_REDIR" = _"" ]; then
+    		. /usr/share/debconf/confmodule
+    		db_version 2.0
+	    fi
+
+	    case "$1" in
+		deconfigure|failed-upgrade|upgrade)
+		    ;;
+		remove|purge)
+		    db_get "shared/#BLEND#-config/usermenus" || true
+		    case "$RET" in
+			"Each package installation")
+			    blend-update-usermenus #BLEND#
+			;;
+			"End of installation")
+			    touch /var/run/#BLEND#-config.usermenu
+			;;
+		    esac
+		    ;;
+		*)
+		    echo "prerm called with unknown argument \`$1'" >&2
+		    exit 1
+		    ;;
+	    esac
+	fi
+    fi
+fi
+
+#DEBHELPER#
+
+exit 0

-- 
Git repository for blends-gsoc code



More information about the Blends-commit mailing list