Moved /usr/lib/ais to /usr/share/ais
authorJean-Michel Nirgal Vourgère <jmv@nirgal.com>
Tue, 18 Dec 2012 13:32:56 +0000 (13:32 +0000)
committerJean-Michel Nirgal Vourgère <jmv@nirgal.com>
Tue, 18 Dec 2012 13:32:56 +0000 (13:32 +0000)
Added debian package source

14 files changed:
bin/djais/settings.py
bin/show_targets_ships.py
debian/changelog [new file with mode: 0644]
debian/compat [new file with mode: 0644]
debian/control [new file with mode: 0644]
debian/copyright [new file with mode: 0644]
debian/init [new symlink]
debian/install [new file with mode: 0644]
debian/postinst [new file with mode: 0644]
debian/postrm [new file with mode: 0644]
debian/rules [new file with mode: 0755]
debian/source/format [new file with mode: 0644]
debian/source/options [new file with mode: 0644]
etc/init.sh

index 5f94619467a1b5fd7d7b8e7ea402c5b3101cacb0..a0f461981413980edd54b3b89e5a6b69f6493d62 100644 (file)
@@ -40,7 +40,7 @@ USE_I18N = True
 
 # Absolute path to the directory that holds media.
 # Example: "/home/media/media.lawrence.com/"
-MEDIA_ROOT = '/usr/lib/ais/www/'
+MEDIA_ROOT = '/usr/share/ais/www/'
 
 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
 # trailing slash if there is a path component (optional in other cases).
@@ -74,7 +74,7 @@ TEMPLATE_DIRS = (
     # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
     # Always use forward slashes, even on Windows.
     # Don't forget to use absolute paths, not relative paths.
-    '/usr/lib/ais/www_templates',
+    '/usr/share/ais/www_templates',
 )
 
 INSTALLED_APPS = (
index 53b13844fb0d7f710294365179694474ed3a875d..c0d50111ad904f9b96e2bce67da52f73058ff460 100755 (executable)
@@ -438,7 +438,7 @@ def kml_to_kmz(inputstr):
     kmz = zipfile.ZipFile(output, 'w')
     kmz.writestr('doc.kml', inputstr)
     for iconname in STYLE.used_icons:
-        kmz.write('/usr/lib/ais/kmz_icons/'+iconname, iconname)
+        kmz.write('/usr/share/ais/kmz_icons/'+iconname, iconname)
     kmz.close()
     return output.getvalue()
     
diff --git a/debian/changelog b/debian/changelog
new file mode 100644 (file)
index 0000000..b4eded4
--- /dev/null
@@ -0,0 +1,5 @@
+ais (0.2) UNRELEASED; urgency=low
+
+  * Initial release.
+
+ -- Jean-Michel Vourgère <jmv_deb@nirgal.com>  Mon, 17 Dec 2012 10:49:26 +0000
diff --git a/debian/compat b/debian/compat
new file mode 100644 (file)
index 0000000..45a4fb7
--- /dev/null
@@ -0,0 +1 @@
+8
diff --git a/debian/control b/debian/control
new file mode 100644 (file)
index 0000000..d8523de
--- /dev/null
@@ -0,0 +1,15 @@
+Source: ais
+Section: net
+Priority: optional
+Maintainer: Jean-Michel Vourgère <jmv_deb@nirgal.com>
+Build-Depends: debhelper (>= 8) 
+Standards-Version: 3.9.1
+Vcs-Svn: svn://svn.nirgal.com/ais
+
+Package: ais
+Architecture: all
+Depends: ${misc:Depends}, ${python:Depends}, postgresql, python (>= 2.6), python-serial, python-rrdtool, python-psycopg2, python-cracklib, libjs-jquery, apache2, libapache2-mod-python, python-django, xz-utils, python-daemon, ntp, python-daemon, sudo, python-decoratedstr, python-htmlentities, adduser
+Description: Nirgal's Ais server
+ Stores AIS ship trafic
+ .
+ And more.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644 (file)
index 0000000..bfeabb7
--- /dev/null
@@ -0,0 +1,25 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: ais
+Upstream-Contact: Jean-Michel Vourgère <jmv_deb@nirgal.com>
+Source: svn://svn.nirgal.com/ais
+
+Files: *
+Copyright: 2009-2012 Jean-Michel Vourgère
+License: GPL-3+
+
+License: GPL-3+
+ This program 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 3 of the License, or
+ (at your option) any later version.
+ .
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ .
+ On Debian systems, the text of the GNU General Public License
+ version 3 can be found in `/usr/share/common-licenses/GPL-3'.
diff --git a/debian/init b/debian/init
new file mode 120000 (symlink)
index 0000000..fd5c6a9
--- /dev/null
@@ -0,0 +1 @@
+../etc/init.sh
\ No newline at end of file
diff --git a/debian/install b/debian/install
new file mode 100644 (file)
index 0000000..cfb5fb4
--- /dev/null
@@ -0,0 +1,10 @@
+/etc/config.SAMPLE              /etc/ais/
+/etc/database.SAMPLE            /etc/ais/
+/bin/*.py                       /usr/share/python-support/ais/
+/bin/djais/*.py                 /usr/share/python-support/ais/djais/
+/bin/djais/templatetags/*.py    /usr/share/python-support/ais/djais/templatetags/
+/bin/extras/*.py                /usr/share/python-support/ais/extras/
+/bin/inputs/*.py                /usr/share/python-support/ais/inputs/
+/kmz_icons                      /usr/share/ais/
+/www                            /usr/share/ais/
+/www_templates                  /usr/share/ais/
diff --git a/debian/postinst b/debian/postinst
new file mode 100644 (file)
index 0000000..325a808
--- /dev/null
@@ -0,0 +1,47 @@
+#!/bin/sh
+# postinst script
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# 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
+
+case "$1" in
+    configure)
+        # System users and groups are NOT to be removed on package purge
+        # So that any orphaned file does not get another owner with a reused UID
+        addgroup --system ais
+        adduser --system --home /var/lib/ais --disabled-password --ingroup ais ais
+
+        if ! dpkg-statoverride --list /var/lib/ais >/dev/null 2>&1; then
+            dpkg-statoverride --update --add ais ais 2775 /var/lib/ais
+        fi
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
diff --git a/debian/postrm b/debian/postrm
new file mode 100644 (file)
index 0000000..3d08221
--- /dev/null
@@ -0,0 +1,42 @@
+#!/bin/sh
+# postrm script for eyefiserver
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postrm> `remove'
+#        * <postrm> `purge'
+#        * <old-postrm> `upgrade' <new-version>
+#        * <new-postrm> `failed-upgrade' <old-version>
+#        * <new-postrm> `abort-install'
+#        * <new-postrm> `abort-install' <old-version>
+#        * <new-postrm> `abort-upgrade' <old-version>
+#        * <disappearer's-postrm> `disappear' <overwriter>
+#          <overwriter-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+       purge)
+               if dpkg-statoverride --list /var/lib/ais >/dev/null 2>&1; then
+            dpkg-statoverride --remove /var/lib/ais
+        fi
+       ;;
+       remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+       ;;
+
+       *)
+               echo "postrm called with unknown argument \`$1'" >&2
+               exit 1
+       ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/rules b/debian/rules
new file mode 100755 (executable)
index 0000000..fe2778c
--- /dev/null
@@ -0,0 +1,5 @@
+#!/usr/bin/make -f
+DH_VERBOSE=1
+export DH_ALWAYS_EXCLUDE=.svn
+%:
+       dh $@
diff --git a/debian/source/format b/debian/source/format
new file mode 100644 (file)
index 0000000..89ae9db
--- /dev/null
@@ -0,0 +1 @@
+3.0 (native)
diff --git a/debian/source/options b/debian/source/options
new file mode 100644 (file)
index 0000000..14407d7
--- /dev/null
@@ -0,0 +1,3 @@
+tar-ignore = *.svn*
+tar-ignore = ressources*
+tar-ignore = bin/old/*
index 965608b5ef5f3327d2a5a525d8dab4d21da9b13c..86519cedc13458b3aa879d61e82d233e264d7fd7 100755 (executable)
@@ -19,7 +19,7 @@ set -e
 
 case $1 in
     start)
-        [ -r /etc/ais/database ] && RUN_PARAMS=--db
+               [ -r /etc/ais/database ] && RUN_PARAMS=--db
                log_daemon_msg "Starting AIS acquisition"
                if sudo -u nirgal python -m ais.inputs.run $RUN_PARAMS
                then
@@ -40,7 +40,7 @@ case $1 in
                        log_warning_msg "Disabled because there is no /etc/ais/database"
                fi
     ;;
-    stop)
+    stop|restart|force-reload)
         log_success_msg "Not implemented"
         exit 1
     ;;