# package information Name: lprng Summary: Next-generation LPR software URL: http://www.lprng.com/ Vendor: Patrick Powell Packager: Matt Hoosier Distribution: PLUS Group: Servers License: Artistic Version: 3.8.27 Release: 20040812 # list of sources Source0: ftp://ftp.lprng.com/pub/LPRng/LPRng/LPRng-%{version}.tgz # build information Prefix: %{l_prefix} BuildRoot: %{l_buildroot} BuildPreReq: OpenPKG, openpkg, gcc, make PreReq: OpenPKG, openpkg AutoReq: no AutoReqProv: no %description LPRng is the Next Generation in LPR software. It supports the standard BSD lpr commands and also supports a System V interface. Other features include lightweight lpr, lpc, and lprm commands, dynamic redirection of print queues, automatic job holding, highly verbose diagnostics, multiple printers serving a single queue, client programs do not need to run SUID root, greatly enhanced security checks and a greatly improved permission and authorization mechanism. The default configuration provides a simple BSD LPR interface, but there are options to modify a wide variety of operational facilities. The companion IFHP print filter can interface to a wide variety of printers, from the latest netowrk based high speed to vintage legacy printers. %prep # unpack and patch distribution %setup -q -n LPRng-%{version} %build CC="%{l_cc}" \ CFLAGS="%{l_cflags -O}" \ CPPFLAGS="%{l_cppflags}" \ LDFLAGS="%{l_ldflags}" \ ./configure \ --prefix=%{l_prefix} \ --localstatedir=%{l_localstatedir}/lprng/run \ --sysconfdir=%{l_prefix}/etc/lprng \ --disable-shared \ --enable-static \ --disable-nls \ --with-included-gettext \ --disable-kerberos \ --disable-ssl \ --disable-setuid \ --with-unix_socket_path=%{l_localstatedir}/lprng/run/lprng.socket \ --with-lockfile=%{l_localstatedir}/lprng/run/lprng.lock \ --with-userid=%{l_musr} \ --with-groupid=%{l_mgrp} %{l_make} %{l_mflags} %install rm -rf $RPM_BUILD_ROOT # standard installation, sans invasive procedures %{l_make} %{l_mflags} install \ DESTDIR=$RPM_BUILD_ROOT POSTINSTALL=NO # install config _etcdir=${RPM_BUILD_ROOT}%{l_prefix}/etc/lprng _serverconfigdir="${_etcdir}/lpd" %{l_shtool} mkdir -p -m 755 ${_serverconfigdir} %{l_shtool} install -c -m 644 lpd.perms ${_serverconfigdir}/ %{l_shtool} install -c -m 644 lpd.conf ${_serverconfigdir}/ %{l_shtool} install -c -m 644 \ -e 's;/var/spool/lpd;%{l_localstatedir}/lprng/spool;g' \ printcap ${_etcdir}/ # make runtime dir %{l_shtool} mkdir \ -f -p \ -m 755 \ ${RPM_BUILD_ROOT}%{l_localstatedir}/lprng/run # daemon startup information %{l_shtool} mkdir -f -p -m 755 ${RPM_BUILD_ROOT}%{l_prefix}/etc/rc.d %{l_shtool} install -c -m 755 \ %{l_value -s -a} \ %{l_value -s l_rpmtool} \ %{SOURCE rc.lprng} ${RPM_BUILD_ROOT}%{l_prefix}/etc/rc.d/ # files list %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ %{l_files_std} \ '%config %{l_prefix}/etc/lprng/*' %files -f files %clean rm -rf $RPM_BUILD_ROOT %post # after upgrade, restart service [ $1 -eq 2 ] && { eval `%{l_rc} lprng status 2>/dev/null` [ ".$lprng_active" = ".yes" ] && %{l_rc} lprng restart exit 0 } %preun # before erase, stop service [ $1 -eq 0 ] && { %{l_rc} lprng stop 2>/dev/null exit 0 }