Browse Source

Adding Debian package required files

Nixus Networks 11 years ago
parent
commit
edce0a7c8e
12 changed files with 323 additions and 0 deletions
  1. 0 0
      ChangeLog
  2. 16 0
      contrib/clish/root-view.xml
  3. 51 0
      contrib/clish/startup.xml
  4. 137 0
      contrib/konfd.init.debian
  5. 11 0
      debian/changelog
  6. 15 0
      debian/control
  7. 4 0
      debian/dirs
  8. 1 0
      debian/files
  9. 2 0
      debian/install
  10. 15 0
      debian/postinst
  11. 69 0
      debian/rules
  12. 2 0
      debian/substvars

+ 0 - 0
ChangeLog


+ 16 - 0
contrib/clish/root-view.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<CLISH_MODULE xmlns="http://clish.sourceforge.net/XMLSchema" 
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+ xsi:schemaLocation="http://clish.sourceforge.net/XMLSchema
+                     http://clish.sourceforge.net/XMLSchema/clish.xsd">
+ 	<!--=======================================================-->
+    <VIEW name="root-view"
+        prompt="${SYSTEM_NAME}&gt; ">
+        <!--===================================================-->
+        <COMMAND name="exit"
+                 help="Exit this CLI session">
+            <ACTION builtin="clish_close"/>
+        </COMMAND>
+ 	<!--=======================================================-->    
+    </VIEW>
+</CLISH_MODULE>

+ 51 - 0
contrib/clish/startup.xml

@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<CLISH_MODULE xmlns="http://clish.sourceforge.net/XMLSchema" 
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+ xsi:schemaLocation="http://clish.sourceforge.net/XMLSchema
+                     http://clish.sourceforge.net/XMLSchema/clish.xsd">
+ 	<!--=======================================================-->
+	<OVERVIEW>
+CONTEXT SENSITIVE HELP
+[?] - Display context sensitive help. This is either a list of possible
+      command completions with summaries, or the full syntax of the 
+      current command. A subsequent repeat of this key, when a command
+      has been resolved, will display a detailed reference.
+
+AUTO-COMPLETION
+The following keys both perform auto-completion for the current command line.
+If the command prefix is not unique then the bell will ring and a subsequent
+repeat of the key will display possible completions.
+
+[enter] - Auto-completes, syntax-checks then executes a command. If there is 
+          a syntax error then offending part of the command line will be
+          highlighted and explained.
+
+[space] - Auto-completes, or if the command is already resolved inserts a space.
+
+MOVEMENT KEYS
+[CTRL-A] - Move to the start of the line
+[CTRL-E] - Move to the end of the line.
+[up]     - Move to the previous command line held in history.
+[down]   - Move to the next command line held in history.
+[left]   - Move the insertion point left one character.
+[right]  - Move the insertion point right one character.
+
+DELETION KEYS
+[CTRL-C]    - Delete and abort the current line
+[CTRL-D]    - Delete the character to the right on the insertion point.
+[CTRL-K]    - Delete all the characters to the right of the insertion point.
+[CTRL-U]    - Delete the whole line.
+[backspace] - Delete the character to the left of the insertion point.
+
+ESCAPE SEQUENCES
+!!  - Subsitute the the last command line.
+!N  - Substitute the Nth command line (absolute as per 'history' command)
+!-N - Substitute the command line entered N lines before (relative)
+    </OVERVIEW>
+ 	<!--=======================================================-->
+	<STARTUP view="root-view">
+		<DETAIL>Welcome to Clish</DETAIL>
+		<ACTION></ACTION>
+	</STARTUP>
+ 	<!--=======================================================-->
+</CLISH_MODULE>

+ 137 - 0
contrib/konfd.init.debian

@@ -0,0 +1,137 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides:          kondf
+# Required-Start:    
+# Required-Stop:     
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Konfd initscript
+# Description:       Klish configuration daemon
+### END INIT INFO
+
+# Author: Nixus Networks <oss@nixus.es>
+#
+# Please remove the "Author" lines above and replace them
+# with your own name if you copy and modify this script.
+
+# Do NOT "set -e"
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+DESC="Klish configuration daemon"
+NAME=gluff
+DAEMON=/usr/sbin/$NAME
+PIDFILE=/var/run/$NAME.pid
+SCRIPTNAME=/etc/init.d/$NAME
+
+# Exit if the package is not installed
+[ -x "$DAEMON" ] || exit 0
+
+# Read configuration variable file if it is present
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+
+# Load the VERBOSE setting and other rcS variables
+. /lib/init/vars.sh
+
+# Define LSB log_* functions.
+# Depend on lsb-base (>= 3.2-14) to ensure that this file is present
+# and status_of_proc is working.
+. /lib/lsb/init-functions
+
+DAEMON_ARGS="-l $QUEUE_DB -h $MYSQL_HOST -u $MYSQL_USER -p $MYSQL_PASSWD -d $MYSQL_DB $OPTIONS"
+
+#
+# Function that starts the daemon/service
+#
+do_start()
+{
+                log_daemon_msg "Starting $DESC" "$NAME"
+                start-stop-daemon --start --quiet --exec $DAEMON -- $DAEMON_ARGS	
+		ps -fe | grep $DAEMON | head -n1 | cut -d" " -f 6 > ${PIDFILE}
+	
+		log_end_msg $?
+}
+
+#
+# Function that stops the daemon/service
+#
+do_stop()
+{
+	log_daemon_msg "Stopping $DESC" "$NAME"
+	start-stop-daemon --stop --quiet --pidfile "$PIDFILE"
+        log_end_msg $?
+        rm -f "$PIDFILE"
+}
+
+
+#
+# Function that sends a SIGHUP to the daemon/service
+#
+do_reload() {
+	#
+	# If the daemon can reload its configuration without
+	# restarting (for example, when it is sent a SIGHUP),
+	# then implement that here.
+	#
+	start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME
+	return 0
+}
+
+case "$1" in
+  start)
+	[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
+	do_start
+	case "$?" in
+		0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+		2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+	esac
+	;;
+  stop)
+	[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
+	do_stop
+	case "$?" in
+		0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+		2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+	esac
+	;;
+  status)
+       status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
+       ;;
+  #reload|force-reload)
+	#
+	# If do_reload() is not implemented then leave this commented out
+	# and leave 'force-reload' as an alias for 'restart'.
+	#
+	#log_daemon_msg "Reloading $DESC" "$NAME"
+	#do_reload
+	#log_end_msg $?
+	#;;
+  restart|force-reload)
+	#
+	# If the "reload" option is implemented then remove the
+	# 'force-reload' alias
+	#
+	do_stop
+	case "$?" in
+	  0|1)
+		do_start
+		case "$?" in
+			0) log_end_msg 0 ;;
+			1) log_end_msg 1 ;; # Old process is still running
+			*) log_end_msg 1 ;; # Failed to start
+		esac
+		;;
+	  *)
+	  	# Failed to stop
+		log_end_msg 1
+		;;
+	esac
+	;;
+  *)
+	#echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
+	echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
+	exit 3
+	;;
+esac
+
+:

+ 11 - 0
debian/changelog

@@ -0,0 +1,11 @@
+klish (1.6.2-1) unstable; urgency=low
+
+  * New upstream
+
+ -- Nixus Networks <debian@nixus.es>  Thu, 9 Dec 2012 17:04:00 +0200
+
+klish (1.5.2-8) unstable; urgency=low
+
+  * Initial Release.
+
+ -- Nixus Networks <debian@nixus.es>  Thu, 19 Jan 2012 18:48:36 +0200

+ 15 - 0
debian/control

@@ -0,0 +1,15 @@
+Source: klish
+Maintainer: Nixus Networks <debian@nixus.es>
+Uploaders: Nixus Networks <debian@nixus.es>
+Section: web
+Priority: extra
+Standards-Version: 0.1
+Build-Depends: debhelper (>= 7), 
+Homepage: http://www.nixus.es
+
+Package: klish
+Architecture: amd64
+Depends: 
+Recommends:
+Suggests:
+Description: Klish

+ 4 - 0
debian/dirs

@@ -0,0 +1,4 @@
+usr/share/doc/clish/
+etc/clish/
+etc/init.d/
+etc/default/

+ 1 - 0
debian/files

@@ -0,0 +1 @@
+klish_1.6.2-1_amd64.deb web extra

+ 2 - 0
debian/install

@@ -0,0 +1,2 @@
+clish.xsd	usr/share/doc/klish/
+xml-examples	usr/share/doc/klish/

+ 15 - 0
debian/postinst

@@ -0,0 +1,15 @@
+#!/bin/sh
+
+set -e
+
+PKG=klish
+
+if [ "$1" = configure ] ; then
+	
+   insserv konfd	
+
+fi
+
+#DEBHELPER#
+
+exit 0

+ 69 - 0
debian/rules

@@ -0,0 +1,69 @@
+#!/usr/bin/make -f
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+SRCTOP = `pwd`
+DESTDIR = $(SRCTOP)/debian/tmp
+
+INST_OWN = -o root -g root 
+MAKE_DIR = install -p -d $(INST_OWN) -m 755
+INST_FILE = install -c $(INST_OWN) -m 644
+INST_PROG = install -c $(INST_OWN) -m 755 -s
+INST_SCRIPT = install -c $(INST_OWN) -m 755
+
+build: build-stamp
+build-stamp:
+	dh_testdir
+        
+	./configure --prefix=/usr
+
+	touch build-stamp
+
+clean: 
+	dh_testdir
+	dh_testroot
+
+	-$(MAKE) distclean
+
+	rm -f build-stamp
+	dh_clean 
+
+install: build
+
+	dh_testdir
+	dh_testroot
+	dh_prep
+
+	dh_installdirs
+
+	$(MAKE) install DESTDIR=$(DESTDIR) LIBTOOL=libtool
+	rm -rf $(DESTDIR)/usr/include
+
+	install -m 755 $(SRCTOP)/contrib/konfd.init.debian $(DESTDIR)/etc/init.d/konfd
+	cp $(SRCTOP)/contrib/clish/*	$(DESTDIR)/etc/clish/
+
+	dh_install
+
+# Build architecture-independent files here.
+binary-indep: build install
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs ChangeLog
+	dh_installdocs
+	dh_installexamples
+	dh_installdebconf	
+	dh_installman
+	dh_link
+	dh_compress
+	dh_fixperms
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+# Build architecture-dependent files here.
+binary-arch:
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install

+ 2 - 0
debian/substvars

@@ -0,0 +1,2 @@
+shlibs:Depends=libc6 (>= 2.7), libexpat1 (>= 1.95.8)
+misc:Depends=