Adding stub of an example packaging for customization purposes (analog to live-config).
authorDaniel Baumann <daniel@debian.org>
Mon, 12 Nov 2012 14:43:56 +0000 (15:43 +0100)
committerDaniel Baumann <daniel@debian.org>
Mon, 12 Nov 2012 14:43:56 +0000 (15:43 +0100)
12 files changed:
Makefile
examples/README [new file with mode: 0644]
examples/live-debconfig-foobar/debian/changelog [new file with mode: 0644]
examples/live-debconfig-foobar/debian/compat [copied from debian/compat with 100% similarity]
examples/live-debconfig-foobar/debian/control [new file with mode: 0644]
examples/live-debconfig-foobar/debian/copyright [copied from debian/copyright with 72% similarity]
examples/live-debconfig-foobar/debian/install [new file with mode: 0644]
examples/live-debconfig-foobar/debian/rules [new file with mode: 0755]
examples/live-debconfig-foobar/debian/source/format [new file with mode: 0644]
examples/live-debconfig-foobar/debian/source/options [copied from debian/source/options with 100% similarity]
examples/live-debconfig-foobar/scripts/9000-foobar [new file with mode: 0755]
examples/live-debconfig-foobar/scripts/9000-foobar.templates [new file with mode: 0644]

index bebf5d2..258d54f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -63,7 +63,7 @@ install:
 
        # Installing docs
        mkdir -p $(DESTDIR)/usr/share/doc/live-debconfig
-       cp -r COPYING $(DESTDIR)/usr/share/doc/live-debconfig
+       cp -r COPYING examples $(DESTDIR)/usr/share/doc/live-debconfig
 
        # Installing manpages
        for MANPAGE in manpages/en/*; \
diff --git a/examples/README b/examples/README
new file mode 100644 (file)
index 0000000..a9f764c
--- /dev/null
@@ -0,0 +1,15 @@
+live-debconfig-foobar Example
+-----------------------------
+
+Best practise for downstream projects and derivatives is to ship their custom
+live-debconfig scripts in an own debian package.
+
+The following live-debconfig-foobar example package should be used as a starting
+point. The following things should minimally be changed:
+
+  * Replace any mentioning of 'Joe Doe' with your own name.
+  * Replace any mentioning of 'example.org' with your own domain name.
+  * Replace any mentioning of 'foobar', 'Foobar' and 'FOOBAR' with the name of
+    your custom script or project name.
+
+ -- Daniel Baumann <daniel@debian.org>  Sun, 26 Feb 2012 21:15:40 +0100
diff --git a/examples/live-debconfig-foobar/debian/changelog b/examples/live-debconfig-foobar/debian/changelog
new file mode 100644 (file)
index 0000000..979cf79
--- /dev/null
@@ -0,0 +1,6 @@
+live-debconfig-foobar (4-1) unstable; urgency=low
+
+  * Initial release based on the live-debconfig-foobar example package
+    included in live-debconfig.
+
+ -- John Doe <john@example.org>  Sun, 26 Feb 2012 21:15:40 +0100
diff --git a/examples/live-debconfig-foobar/debian/control b/examples/live-debconfig-foobar/debian/control
new file mode 100644 (file)
index 0000000..2f0a9d7
--- /dev/null
@@ -0,0 +1,18 @@
+Source: live-debconfig-foobar
+Section: misc
+Priority: extra
+Maintainer: John Doe <john@example.org>
+Build-Depends: debhelper (>= 9)
+Standards-Version: 3.9.4
+Homepage: http://www.example.org/foobar/
+Vcs-Browser: http://git.example.org/?p=live-debconfig-foobar.git
+Vcs-Git: git://git.example.org/git/live-debconfig-foobar.git
+
+Package: live-debconfig-foobar
+Architecture: all
+Depends: ${misc:Depends}, live-debconfig (>= 4), live-debconfig (<< 5)
+Description: Additional Live System Configuration Scripts (foobar)
+ live-debconfig contains the scripts that debconfigure a live system during the boot
+ process (late userspace).
+ .
+ This package contains the additional foobar script(s).
similarity index 72%
copy from debian/copyright
copy to examples/live-debconfig-foobar/debian/copyright
index 4dfd48c..c09eca6 100644 (file)
@@ -1,10 +1,15 @@
 Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
-Upstream-Name: live-debconfig
-Upstream-Contact: Debian Live Project <debian-live@lists.debian.org>
-Source: http://live.debian.net/archive/packages/live-debconfig/
+Upstream-Name: live-debconfig-foobar
+Upstream-Contact: John Doe <john@example.org>
+Source: http://www.example.org/foobar/
+Comment:
+ This package is based on the live-debconfig-foobar example package
+ included in live-debconfig which can be optained from
+ http://live.debian.net/devel/live-debconfig/.
 
 Files: *
 Copyright: 2006-2012 Daniel Baumann <daniel@debian.org>
+           2012 John Doe <john@example.org>
 License: GPL-3+
 
 License: GPL-3+
diff --git a/examples/live-debconfig-foobar/debian/install b/examples/live-debconfig-foobar/debian/install
new file mode 100644 (file)
index 0000000..38a44d6
--- /dev/null
@@ -0,0 +1 @@
+scripts/*      /lib/live/debconfig
diff --git a/examples/live-debconfig-foobar/debian/rules b/examples/live-debconfig-foobar/debian/rules
new file mode 100755 (executable)
index 0000000..017e176
--- /dev/null
@@ -0,0 +1,7 @@
+#!/usr/bin/make -f
+
+%:
+       dh ${@}
+
+override_dh_builddeb:
+       dh_builddeb -- -Zxz -z9
diff --git a/examples/live-debconfig-foobar/debian/source/format b/examples/live-debconfig-foobar/debian/source/format
new file mode 100644 (file)
index 0000000..89ae9db
--- /dev/null
@@ -0,0 +1 @@
+3.0 (native)
diff --git a/examples/live-debconfig-foobar/scripts/9000-foobar b/examples/live-debconfig-foobar/scripts/9000-foobar
new file mode 100755 (executable)
index 0000000..59390e3
--- /dev/null
@@ -0,0 +1,47 @@
+#!/bin/sh
+
+## live-debconfig(7) - System Configuration Scripts
+## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org>
+##
+## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
+## This is free software, and you are welcome to redistribute it
+## under certain conditions; see COPYING for details.
+
+
+set -e
+
+DEBCONF_SYSTEMRC="/var/lib/live/debconfig/systemrc"
+export DEBCONF_SYSTEMRC
+
+. /usr/share/debconf/confmodule
+
+Defaults ()
+{
+       if [ -z "${_FOO}" ]
+       then
+               # FIXME
+       fi
+}
+
+db_get live-debconfig/foobar/foo
+_FOO="${RET}" # string (w/o empty)
+
+Defaults
+
+db_set live-debconfig/foobar/foo "${_FOO}"
+db_fset live-debconfig/foobar/foo seen false
+
+db_settitle live-debconfig/title
+db_input high live-debconfig/foobar/foo || true
+db_go
+
+db_get live-debconfig/foobar/foo
+_FOO="${RET}" # string (w/o empty)
+
+Defaults
+
+db_stop
+
+# Set foo
+echo "${_FOO}" > /etc/foo.tmp
+mv /etc/foo.tmp /etc/foo
diff --git a/examples/live-debconfig-foobar/scripts/9000-foobar.templates b/examples/live-debconfig-foobar/scripts/9000-foobar.templates
new file mode 100644 (file)
index 0000000..c50dc5e
--- /dev/null
@@ -0,0 +1,13 @@
+Template: live-debconfig/title
+Type: title
+Description: live-debconfig: System Configuration
+
+Template: live-debconfig/foobar/foo
+Type: string
+Default:
+Description: live-debconfig: Foo?
+ What should be the foo of the current system?
+ .
+ The default value is determined automatically:
+ .
+   1. FIXME