Upgrade to atk-2.14.0 and atkmm-2.22.7
[hvlinux.git] / stage5 / pkg / cups
index 667abfe..41da956 100644 (file)
@@ -1,30 +1,24 @@
-#!/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
-
-PACKAGE=${1}
-shift
-CONFIGURE_OPTS=${*}
-
-# Applying patches (if any)
-apply_patches ${PACKAGE}
-
-hv_useradd -c "Print_Service_User" -d /dev/null -g lp -s /bin/false -u 9 lp
-
-cd ${LFS_TMP}/${PACKAGE}
-./configure
-make
-make install
-
-if [ -n "${CUPS_SERVER}" ]; then
-    # Configuring for connection to a remote CUPS print server
-    cat > /etc/cups/client.conf << "EOF"
+#!/bin/bash
+
+hvconfig_pre()
+{
+    hv_useradd --system -c "Print_Service_User" -d /dev/null -g lp \
+               -s /bin/false lp
+
+    groupadd --system -f lpadmin
+
+    CONFIGURE_OPTS=" \
+        --libdir=/usr/lib \
+        --disable-systemd \
+        --with-rcdir=/tmp/cupsinit \
+        --with-system-groups=lpadmin"
+}
+
+hvbuild_post()
+{
+    if [ -n "${CUPS_SERVER}" ]; then
+        # Configuring for connection to a remote CUPS print server
+        cat > /etc/cups/client.conf << "EOF"
 ########################################################################
 #                                                                      #
 # This is the CUPS client configuration file.  This file is used to    #
@@ -41,15 +35,14 @@ if [ -n "${CUPS_SERVER}" ]; then
 # and possibly polling.
 #
 EOF
-    echo "ServerName ${CUPS_SERVER}" >> /etc/cups/client.conf
-else
-    # Configuring for a CUPS print server
-    sed -i -e 's@Listen localhost:631@Listen \*:631@' /etc/cups/cupsd.conf
-fi
-
-install -v -m740 ${SCRDIR}/bootscripts/cups /etc/rc.d/init.d
+        echo "ServerName ${CUPS_SERVER}" >> /etc/cups/client.conf
+    else
+        # Configuring for a CUPS print server
+        sed -i -e 's@Listen localhost:631@Listen \*:631@' /etc/cups/cupsd.conf
+    fi
 
-# script-name start stop
-bootscript_add_rc3 cups 40 50
+    install -v -m740 ${SCRDIR}/bootscripts/cups /etc/rc.d/init.d
 
-exit $?
+    # script-name start stop
+    bootscript_add_rc3 cups 40 50
+}