JHT ===> Added Sun Solaris binary package building spec files contributed
authorJohn Terpstra <jht@samba.org>
Sat, 4 Oct 1997 02:57:14 +0000 (02:57 +0000)
committerJohn Terpstra <jht@samba.org>
Sat, 4 Oct 1997 02:57:14 +0000 (02:57 +0000)
         by Tim Towers <tim@lorien.demon.co.uk>. Note: Not yet checked.

packaging/Solaris/pkg-specs/Packaging.script [new file with mode: 0644]
packaging/Solaris/pkg-specs/mkprototype [new file with mode: 0644]
packaging/Solaris/pkg-specs/pkginfo [new file with mode: 0644]
packaging/Solaris/pkg-specs/postinstall [new file with mode: 0644]
packaging/Solaris/pkg-specs/postremove [new file with mode: 0644]

diff --git a/packaging/Solaris/pkg-specs/Packaging.script b/packaging/Solaris/pkg-specs/Packaging.script
new file mode 100644 (file)
index 0000000..6f182c3
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/sh
+./mkprototype
+pkgmk -o -d /tmp -b `pwd` -f ./prototype
+cd /tmp
+pkgtrans . samba.pkg samba
diff --git a/packaging/Solaris/pkg-specs/mkprototype b/packaging/Solaris/pkg-specs/mkprototype
new file mode 100644 (file)
index 0000000..5ca0746
--- /dev/null
@@ -0,0 +1,31 @@
+#!/bin/sh
+# this creates prototype files
+pkgproto * > prototype
+nawk 'BEGIN { print "# d   directory"
+       print "# e   a file to be edited upon installation or removal"
+       print "# f   a standard executable or data file"
+       print "# i   installation script or information file"
+       print "# l   linked file"
+       print "# s   symbolic link"
+       print "# v   volatile file (one whose contents are expected to
+change)"
+       print "#" }
+/ pkginfo /    { print "i pkginfo" ; next }
+/ postinstall /        { print "i postinstall" ; next }
+/ postremove / { print "i postremove" ; next }
+/d none usr /  { print "d none usr ? ? ?" ; next }
+/d none usr\/local /   { print "d none usr/local ? ? ?" ; next }
+/d none etc /  { print "d none etc ? ? ?" ; next }
+/f none etc\// { $1 = "v" }
+/d none opt /  { print "d none opt ? ? ?" ; next }
+/d none var /  { print "d none var ? ? ?" ; next }
+/none prototype / { next }
+/none mkprototype / { next }
+/ src[ \/]/ { next }
+/^[dfv]/ { $5 = "bin"
+       $6 = "bin"
+       print
+       next }
+{ print }' prototype >/tmp/prototype.$$
+mv /tmp/prototype.$$ prototype
+
diff --git a/packaging/Solaris/pkg-specs/pkginfo b/packaging/Solaris/pkg-specs/pkginfo
new file mode 100644 (file)
index 0000000..ab06b3f
--- /dev/null
@@ -0,0 +1,12 @@
+PSTAMP=Mon Sep 29 17:26:14 BST 1997
+PKG=samba
+NAME=SMB based file/printer sharing
+VERSION=1.9.17p2,REV=1
+ARCH=sparc
+CATEGORY=system
+VENDOR=samba group
+DESC=File and printer sharing for NT workstations
+CLASSES=none
+INTONLY=1
+HOTLINE=Please contact your local UNIX support group
+BASEDIR=/
diff --git a/packaging/Solaris/pkg-specs/postinstall b/packaging/Solaris/pkg-specs/postinstall
new file mode 100644 (file)
index 0000000..0fbe9da
--- /dev/null
@@ -0,0 +1,37 @@
+#!/bin/sh
+# install samba
+
+nawk '/^netbios-[ns]*[         ]/ {next}
+{print}
+END { print "netbios-ssn       139/tcp"
+       print "netbios-ns       137/udp # samba service" }' \
+       ${PKG_INSTALL_ROOT}/etc/inet/services > /tmp/services.$$ && \
+       mv -f /tmp/services.$$ ${PKG_INSTALL_ROOT}/etc/inet/services &&
+\
+       chmod 644 ${PKG_INSTALL_ROOT}/etc/inet/services && \
+       echo "Updated ${PKG_INSTALL_ROOT}/etc/inet/services"
+
+nawk '/samba.*mbd[     ]/ { next }
+{print}
+END { print "# samba connections are handled by smbd and nmbd"
+      print "netbios-ssn stream tcp nowait root /opt/samba/bin/smbd
+smbd"
+      print "netbios-ns dgram udp wait root /opt/samba/bin/nmbd nmbd" }'
+\
+        ${PKG_INSTALL_ROOT}/etc/inet/inetd.conf > /tmp/inetd.conf.$$ &&
+\
+        mv -f /tmp/inetd.conf.$$ ${PKG_INSTALL_ROOT}/etc/inet/inetd.conf
+&& \
+       chmod 644 ${PKG_INSTALL_ROOT}/etc/inet/inetd.conf && \
+        echo "Updated ${PKG_INSTALL_ROOT}/etc/inet/inetd.conf"
+
+echo "Installed samba service into ${PKG_INSTALL_ROOT:-/}" 
+inetpid=`/bin/ps -ef | awk '/ \/usr\/sbin\/inetd / { print $2 } '`
+if [ "X$inetpid" = "X" ]; then
+   echo "inetd not running"
+else
+   echo "Restarting inetd($inetpid)"
+   kill -HUP $inetpid
+fi
+
diff --git a/packaging/Solaris/pkg-specs/postremove b/packaging/Solaris/pkg-specs/postremove
new file mode 100644 (file)
index 0000000..7f7a5c1
--- /dev/null
@@ -0,0 +1,30 @@
+#!/bin/sh
+# remove samba
+
+nawk '/^netbios-[ns]*[         ]/ {next}
+{print} ' \
+       ${PKG_INSTALL_ROOT}/etc/inet/services > /tmp/services.$$ && \
+       mv -f /tmp/services.$$ ${PKG_INSTALL_ROOT}/etc/inet/services &&
+\
+       chmod 644 ${PKG_INSTALL_ROOT}/etc/inet/services && \
+       echo "Updated ${PKG_INSTALL_ROOT}/etc/inet/services"
+
+nawk '/samba.*mbd[     ]/ { next }
+{print} ' \
+        ${PKG_INSTALL_ROOT}/etc/inet/inetd.conf > /tmp/inetd.conf.$$ &&
+\
+        mv -f /tmp/inetd.conf.$$ ${PKG_INSTALL_ROOT}/etc/inet/inetd.conf
+&& \
+       chmod 644  ${PKG_INSTALL_ROOT}/etc/inet/inetd.conf && \
+        echo "Updated ${PKG_INSTALL_ROOT}/etc/inet/inetd.conf"
+echo "Removed samba service from ${PKG_INSTALL_ROOT:-/}" 
+inetpid=`/bin/ps -ef | awk '/ \/usr\/sbin\/inetd / { print $2 } '`
+if [ "X$inetpid" = "X" ]; then
+   echo "inetd not running"
+else
+   echo "Restarting inetd($inetpid)"
+   kill -HUP $inetpid
+fi
+