Request 157 was acted upon. _________________________________________________________________________
URL: https://rt.openpkg.org/id/157 Ticket: [OpenPKG #157] Subject: lprng/ifhp packaged, needs review Requestors: [EMAIL PROTECTED] Queue: openpkg Owner: Nobody Status: new Transaction: Ticket created by rse Time: Thu Jun 12 19:16:52 2003 _________________________________________________________________________ ----- Forwarded message from Matt Hoosier <[EMAIL PROTECTED]> ----- Delivered-To: [EMAIL PROTECTED] Delivered-To: [EMAIL PROTECTED] Subject: lprng / ifhp packaged From: Matt Hoosier <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Date: 11 Jun 2003 12:50:26 -0500 Reply-To: [EMAIL PROTECTED] Precedence: list I've packaged LPRng and the corresponding print filter, ifhp. Is there any interesting in integrating these into the main distribution? -- Matt Hoosier CIS Accounts Manager Kansas State University # package information Name: ifhp Summary: Printer filter for HP LaserJet printers URL: http://www.astart.com/lprng/LPRng.html Vendor: Patrick Howell Packager: CIS Distribution: OpenPKG [PLUS] Group: Services License: Artistic Version: 3.5.10 Release: cis1 # list of sources Source0: ftp://ftp.lprng.com/pub/LPRng/ifhp/ifhp-%{version}.tgz # build information Prefix: %{l_prefix} BuildRoot: %{l_buildroot} BuildPreReq: OpenPKG, openpkg, gcc, make, file, a2ps, ghostscript PreReq: OpenPKG, openpkg, file, a2ps, ghostscript AutoReq: no AutoReqProv: no %description The ifhp filter is a general purpose print filter that can handle a wide variety of text, PostScript, PCL, and PJL printers. These include all known HP printers, PostScript supporting printers, as well as a wide variety of Tektronix, QMS, Epson, etc. The filter provides support for error message reporting, diagnostics, and format conversions, as well as a vast variety of options that can be used to deal with difficult or vintage printers. %prep %setup -q %build CFLAGS="-I%{l_prefix}/include" CPPFLAGS="-I%{l_prefix}/include" LDFLAGS="-L%{l_prefix}/lib" export CFLAGS CPPFLAGS LDFLAGS ./configure \ --prefix=%{l_prefix} \ --sysconfdir=%{l_prefix}/etc/ifhp \ --disable-gscheck %{l_make} %{l_mflags} %install rm -rf $RPM_BUILD_ROOT %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ %{l_files_std} \ '%config %{l_prefix}/etc/ifhp*' %files -f files %clean rm -rf $RPM_BUILD_ROOT # package information Name: lprng Summary: Next-generation LPR software URL: http://www.lprng.com/ Vendor: Patrick Powell Packager: CIS Distribution: PLUS Group: Servers License: Artistic Version: 3.8.10 Release: cis4 # package options %option with_user %{l_musr} %option with_group %{l_mgrp} # 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 %if "%{with_user}" == "root" printf "Please think twice about making LPRng run as %s:%s\n" \ "%{with_user}:%{with_group}" | %{l_rpmtool} msg -b %endif %if "%{with_group}" == "root" printf "Please think twice about making LPRng run as %s:%s\n" \ "%{with_user}:%{with_group}" | %{l_rpmtool} msg -b %endif %setup -q -n LPRng-%{version} %build CC="%{l_cc}" CFLAGS="%{l_cflags -O}" CPPFLAGS="-I%{l_prefix}/include" LDFLAGS="-L%{l_prefix}/lib" export CC CFLAGS CPPFLAGS LDFLAGS ./configure \ --prefix=%{l_prefix} \ --localstatedir=%{l_prefix}/var/lprng/run \ --sysconfdir=%{l_prefix}/etc/lprng \ --disable-shared \ --enable-static \ --disable-nls \ --with-unix_socket_path=%{l_prefix}/var/lprng/run/lprng.socket \ --with-lockfile=%{l_prefix}/var/lprng/run/lprng.lock \ --with-userid=%{with_user} \ --with-groupid=%{with_group} \ --with-included-gettext %{l_make} %{l_mflags} %install rm -rf $RPM_BUILD_ROOT # fix up installation so that chown() isn't attempted %{l_shtool} subst \ -e 's;$(SUID_ROOT_PERMS);$(NORM_PERMS);g' src/Makefile # 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 %{l_shtool} install -m 644 lpd.perms ${_etcdir}/ %{l_shtool} install -m 644 lpd.conf ${_etcdir}/ %{l_shtool} install -c -m 644 \ -e 's;/var/spool/lpd;%{l_prefix}/var/lprng/spool;g' \ printcap ${_etcdir}/ # make runtime dir %{l_shtool} mkdir -f -p -m 755 ${RPM_BUILD_ROOT}%{l_prefix}/var/lprng/run # OpenPKG metadata %{l_shtool} mkdir -f -p -m 755 ${RPM_BUILD_ROOT}%{l_prefix}/etc/rc.d %{l_shtool} install -c -m 755 \ -e 's;@l_prefix@;%{l_prefix};g' \ -e 's;@lprng_user@;%{with_user};g' \ -e 's;@lprng_group@;%{with_group};g' \ %{SOURCE rc.lprng} ${RPM_BUILD_ROOT}%{l_prefix}/etc/rc.d/ # Snarf 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 [EMAIL PROTECTED]@/lib/openpkg/bash @l_prefix@/etc/rc ## ## rc.lprng -- Run-Commands for LPRng daemon ## %config lprng_enable="yes" lprng_rotatelogs_enable="yes" lprng_user="@lprng_user@" lprng_group="@lprng_group@" lprng_rotate_numfiles="10" lprng_rotate_minsize="1M" lprng_rotate_complevel="9" lprng_logfile_name="log" %common PID_FILES="`echo @l_prefix@/var/lprng/run/lprng.lock*`" lock_files_exist() { if [ "${PID_FILES}" = "@l_prefix@/var/lprng/run/lprng.lock*" ] ; then return 1 else return 0 fi } start() { if lock_files_exist ; then echo "PID files found. Is LPRng already running?" return 1 fi @l_prefix@/sbin/lpd } stop() { if lock_files_exist ; then : else echo "No PID files found" return 1 fi kill -TERM `cat ${PID_FILES}` rm -f ${PID_FILES} || true } restart() { stop sleep 2 start } rotate_logs() { # rotate log files for log_file in @l_prefix@/var/lprng/spool/*/${lprng_logfile_name} ; do # bail out if wildcard didn't expand [ ".${log_file}" = \ "[EMAIL PROTECTED]@/var/lprng/spool/*/${lprng_logfile_name}" ] && \ continue shtool rotate \ --force \ --num-files ${lprng_rotate_numfiles} \ --size ${lprng_rotate_minsize} \ --delay \ --compress ${lprng_rotate_complevel} \ --owner ${lprng_user} \ --group ${lprng_group} \ --mode 644 \ "${log_file}" done } %start -p 200 -u root opServiceEnabled lprng || exit 0 start %stop -p 200 -u root opServiceEnabled lprng || exit 0 stop %restart -u root opServiceEnabled lprng || exit 0 restart %daily -u root opServiceEnabled lprng || exit 0 opServiceEnabled lprng_rotatelogs && ( rotate_logs ; restart ) ----- End forwarded message ----- Ralf S. Engelschall [EMAIL PROTECTED] www.engelschall.com