-#!/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"