-Amélioré fonctions de download des packages
[hvlinux.git] / stage5 / pkg / procmail
index 7e72d39..15a8075 100644 (file)
@@ -1,24 +1,18 @@
-#!/bin/sh
-set -o errexit
+#!/bin/bash
 
-# First argument of this script is the package name
+hvbuild()
+{
+    cd ${LFS_TMP}/${PACKAGE}
+    make \
+        BASENAME=/usr \
+        LOCKINGTEST=/tmp \
+        install
+    make install-suid
+}
 
-# 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}
-make \
-    BASENAME=/usr \
-    LOCKINGTEST=/tmp \
-    install
-make install-suid
-
-cat > /etc/procmailrc << "EOF"
+hvbuild_post()
+{
+    cat > /etc/procmailrc << "EOF"
 # /etc/procmailrc
 #
 SHELL=/bin/sh
@@ -80,8 +74,7 @@ spam
 ${DEFAULT}
 EOF
 
-DOMAIN1=$(echo ${DOMAIN} | sed "s!\(.*\)\.\(.*\)!\1!")
-DOMAIN2=$(echo ${DOMAIN} | sed "s!\(.*\)\.\(.*\)!\2!")
-sed -i -e "s!_DOMAIN_!${DOMAIN1}\\\.${DOMAIN2}!g" /etc/procmailrc
-
-exit $?
+    DOMAIN1=$(echo ${DOMAIN} | sed "s!\(.*\)\.\(.*\)!\1!")
+    DOMAIN2=$(echo ${DOMAIN} | sed "s!\(.*\)\.\(.*\)!\2!")
+    sed -i -e "s!_DOMAIN_!${DOMAIN1}\\\.${DOMAIN2}!g" /etc/procmailrc
+}