]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
* Add debconf support for /etc/openafs/*
authorSam Hartman <hartmans@debian.org>
Sun, 5 Nov 2000 03:09:19 +0000 (03:09 +0000)
committerSam Hartman <hartmans@debian.org>
Sun, 5 Nov 2000 03:09:19 +0000 (03:09 +0000)
* Define openafs-client package
* Move files into packges

debian/control
debian/openafs-client.config [new file with mode: 0644]
debian/openafs-client.dirs [new file with mode: 0644]
debian/openafs-client.postinst [new file with mode: 0644]
debian/openafs-client.postrm [new file with mode: 0644]
debian/openafs-client.templates [new file with mode: 0644]
debian/rules

index de8938877822dd12a286d3692bb531397ddaa7e9..0d3e1bb0bc4537f5e32850fc8d8e835b117b8d47 100644 (file)
@@ -1,17 +1,17 @@
 Source: openafs
-Section: unknown
+Section: non-us
 Priority: optional
-Maintainer: unknown <hartmans@snorklewacker.mit.edu>
-Build-Depends: debhelper
+Maintainer: Sam Hartman <hartmans@mit.edu>
+Build-Depends: debhelper, libncurses5-dev, libpam0g-dev, bison
 Standards-Version: 3.1.1
 
-Package: openafs
+Package: openafs-client
 Architecture: any
-Depends: ${shlibs:Depends}
-Description: <insert up to 60 chars description>
- <insert long description, indented with spaces>
-
-Package: openafs-doc
-Architecture: all
-Description: Documentation for openafs
- <insert long description, indented with spaces>
+Depends: ${shlibs:Depends}, debconf
+Description: The AFS distributed filesystem- client support
+   AFS is a distributed filesystem allowing cross-platform sharing of
+   files among multiple computers.  Facilities are provided for access
+   control, authentication, backup and administrative management.
+   .
+   This package provides basic client support to mount and manipulate
+   AFS.
diff --git a/debian/openafs-client.config b/debian/openafs-client.config
new file mode 100644 (file)
index 0000000..ac51376
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/sh -e
+
+. /usr/share/debconf/confmodule ||exit
+
+db_version 2.0
+db_input medium openafs-client/thiscell ||true
+db_go
+
+db_input high openafs-client/cachesize ||true
+
+db_go
diff --git a/debian/openafs-client.dirs b/debian/openafs-client.dirs
new file mode 100644 (file)
index 0000000..36d778c
--- /dev/null
@@ -0,0 +1,2 @@
+var/cache/openafs
+etc/openafs
diff --git a/debian/openafs-client.postinst b/debian/openafs-client.postinst
new file mode 100644 (file)
index 0000000..7faabfb
--- /dev/null
@@ -0,0 +1,46 @@
+#! /bin/sh
+# postinst script for openafs
+
+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>
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+
+case "$1" in
+    configure)
+
+       . /usr/share/debconf/confmodule
+
+       db_version 2.0
+
+       db_get openafs-client/thiscell
+       echo $RET >/etc/openafs/ThisCell
+       db_get openafs-client/cachesize
+       echo /afs:/var/cache/openafs:$RET >/etc/openafs/cacheinfo
+
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 0
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
diff --git a/debian/openafs-client.postrm b/debian/openafs-client.postrm
new file mode 100644 (file)
index 0000000..095d39e
--- /dev/null
@@ -0,0 +1,40 @@
+#! /bin/sh
+# postrm script for openafs
+#
+# 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' <r>overwrit>r> <new-version>
+# for details, see /usr/share/doc/packaging-manual/
+
+case "$1" in
+       purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+
+
+        ;;
+
+purge)
+    rm /etc/openafs/cacheinfo 2>/dev/null ||true
+    rm /etc/openafs/ThisCell 2>?dev/null ||true
+    ;;
+    *)
+        echo "postrm called with unknown argument \`$1'" >&2
+        exit 0
+
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+
diff --git a/debian/openafs-client.templates b/debian/openafs-client.templates
new file mode 100644 (file)
index 0000000..5281fcb
--- /dev/null
@@ -0,0 +1,12 @@
+Template: openafs-client/thiscell
+Type: string
+Description:  What AFS cell does this workstation belong to?
+   AFS filespace is organized into cells or administrative domains.
+   Each workstation belongs to one cell.  Usually the cell is the DNS
+   domain name of the workstation.
+
+template: openafs-client/cachesize
+Type: string
+Description:  How large is your AFS cache (kb)? 
+Default: 50000
+
index c44f7d3bfd5d15695caa38914cbbbc4286ff4657..e03369296842ce069f21f8489143b8ca02838119 100755 (executable)
@@ -58,9 +58,9 @@ install: build
        dh_installdirs
 
        # Add here commands to install the package into debian/tmp.
-       $(MAKE) install DESTDIR=`pwd`/debian/tmp
+       cat debian/filelist |debian/movefiles
+
 
-       dh_movefiles
 
 # Build architecture-independent files here.
 # Pass -i to all debhelper commands in this target to reduce clutter.
@@ -101,7 +101,7 @@ binary-arch: build install
        dh_testversion 1.1.17
        dh_testdir
        dh_testroot
-#      dh_installdebconf
+       dh_installdebconf
        dh_installdocs
        dh_installexamples
        dh_installmenu
@@ -118,6 +118,7 @@ binary-arch: build install
        dh_compress
        dh_fixperms
        # You may want to make some executables suid here.
+       chmod 700 debian/openafs-client/var/cache/openafs
        dh_suidregister
        dh_installdeb
 #      dh_makeshlibs