Upgrade to libwnck-3.14.0
[hvlinux.git] / stage5 / pkg / samba
index 24ab9e9..3926f0d 100644 (file)
@@ -1,58 +1,51 @@
-#!/bin/sh
-set -o errexit
-
-# First argument of this script is the package name
-
-# Reading system configuration informations, functions and package versions.
-source ../sysinfos
-source ../functions
-source ../packages-list
-
-# Applying patches (if any)
-apply_patches ${1}
-
-install -d /var/cache/samba
-
-cd ${LFS_TMP}/${1}/source
-./configure \
-    --prefix=/usr \
-    --sysconfdir=/etc \
-    --localstatedir=/var \
-    --with-piddir=/var/run \
-    --with-fhs \
-    --with-smbmount
-make
-make install
-mv /usr/lib/samba/libsmbclient.so /usr/lib
-ln -sf ../libsmbclient.so /usr/lib/samba
-
-mkdir -p /var/log/samba
-
-# libsmbclient.a doesn't seem to be installed...
-#chmod 644 /usr/include/libsmbclient.h /usr/lib/samba/libsmbclient.a
-chmod 644 /usr/include/libsmbclient.h
-
-install -m755 nsswitch/libnss_win{s,bind}.so /lib
-ln -sf libnss_winbind.so /lib/libnss_winbind.so.2
-ln -sf libnss_wins.so /lib/libnss_wins.so.2
-cp ../examples/smb.conf.default /etc/samba
-install -m644 ../docs/*.pdf /usr/share/samba
-
-if [ -f nsswitch/pam_winbind.so ]; then 
-    install -m755 nsswitch/pam_winbind.so /lib/security
-fi
-
-ldconfig
-
-# Configuring SWAT
-string_add "swat            901/tcp" /etc/services
-string_add "swat_tunnel     902/tcp" /etc/services
-string_add "swat stream tcp nowait.400 root /usr/sbin/swat swat" /etc/inetd.conf
-
-# Bootscript
-install -v -m740 ${SCRDIR}/bootscripts/samba /etc/rc.d/init.d
-
-# script-name start stop
-bootscript_add_rc3 samba 85 10
-
-exit $?
+#!/bin/bash
+
+hvconfig_pre()
+{
+    install -d /var/cache/samba
+}
+
+hvbuild_post()
+{
+    mv /usr/lib/samba/libsmbclient.so /usr/lib
+    ln -sf ../libsmbclient.so /usr/lib/samba
+
+    mkdir -p /var/log/samba
+
+    # libsmbclient.a doesn't seem to be installed...
+    #chmod 644 /usr/include/libsmbclient.h /usr/lib/samba/libsmbclient.a
+    chmod 644 /usr/include/libsmbclient.h
+
+    install -v -m755 nsswitch/libnss_win{s,bind}.so /lib
+    ln -sf libnss_winbind.so /lib/libnss_winbind.so.2
+    ln -sf libnss_wins.so /lib/libnss_wins.so.2
+    cp ../examples/smb.conf.default /etc/samba
+    install -v -m644 ../docs/*.pdf /usr/share/samba
+
+    if [ -f nsswitch/pam_winbind.so ]; then 
+        install -v -m755 nsswitch/pam_winbind.so /lib/security
+    fi
+
+    # Configuring SWAT
+    string_add "swat            901/tcp" /etc/services
+    string_add "swat_tunnel     902/tcp" /etc/services
+
+    cat > /etc/xinetd.d/swat << "EOF"
+service swat
+{
+   disable        = no
+   socket_type    = stream
+   protocol       = tcp
+   wait           = no
+   user           = root
+   server         = /usr/sbin/swat
+   log_type       = SYSLOG local4 info
+}
+EOF
+
+    # Bootscript
+    install -v -m740 ${SCRDIR}/bootscripts/samba /etc/rc.d/init.d
+
+    # script-name start stop
+    bootscript_add_rc3 samba 85 10
+}