-Amélioré fonctions de download des packages
[hvlinux.git] / stage5 / pkg / sasl2
index abda5e6..8478861 100644 (file)
@@ -1,50 +1,35 @@
-#!/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}
-
-cd ${LFS_TMP}/${1}
-
-# Fixes an issue when compiling Cyrus SASL with GCC-4:
-sed -i '/sasl_global/s/^static //' lib/client.c
-
-# Puts the saslauthd man page in a more standard location:
-sed -i 's/cat8/man8/' saslauthd/Makefile.in
-
-cd ${LFS_TMP}/${1}-build
-../${1}/configure \
-    --prefix=/usr \
-    --sysconfdir=/etc \
-    --with-dbpath=/var/lib/sasl/sasldb2 \
-    --with-saslauthd=/var/run
-make
-make install
-
-cd ${LFS_TMP}/${1}
-install -v -m755 -d /usr/share/doc/${1}
-install -v -m644 doc/{*.{html,txt,fig},ONEWS,TODO} \
-    saslauthd/LDAP_SASLAUTHD /usr/share/doc/${1}
-install -v -m700 -d /var/lib/sasl
-
-# Creating SASL configuration file for Sendmail:
-cat > /usr/lib/sasl2/Sendmail.conf << "EOF"
+#!/bin/bash
+
+hvconfig_pre()
+{
+    # Fixes an issue when compiling Cyrus SASL with GCC-4:
+    sed -i '/sasl_global/s/^static //' ${LFS_TMP}/${PACKAGE}/lib/client.c
+
+    # Puts the saslauthd man page in a more standard location:
+    sed -i 's/cat8/man8/' ${LFS_TMP}/${PACKAGE}/saslauthd/Makefile.in
+
+    CONFIGURE_OPTS=" \
+        ${CONFIGURE_OPTS} \
+        --with-dbpath=/var/lib/sasl/sasldb2 \
+        --with-saslauthd=/var/run"
+}
+
+hvbuild_post()
+{
+    cd ${LFS_TMP}/${PACKAGE}
+    install -v -m755 -d /usr/share/doc/${PACKAGE}
+    install -v -m644 doc/{*.{html,txt,fig},ONEWS,TODO} \
+        saslauthd/LDAP_SASLAUTHD /usr/share/doc/${PACKAGE}
+    install -v -m700 -d /var/lib/sasl
+
+    # Creating SASL configuration file for Sendmail:
+    cat > /usr/lib/sasl2/Sendmail.conf << "EOF"
 pwcheck_method:saslauthd
 EOF
 
-ldconfig
-
-# Bootscript
-install -v -m740 ${SCRDIR}/bootscripts/saslauthd /etc/rc.d/init.d
-
-# script-name start stop
-bootscript_add_rc3 saslauthd 50 40
+    # Bootscript
+    install -v -m740 ${SCRDIR}/bootscripts/saslauthd /etc/rc.d/init.d
 
-exit $?
+    # script-name start stop
+    bootscript_add_rc3 saslauthd 50 40
+}