rpms/oki4linux/devel oki4linux-a4.patch, NONE, 1.1 oki4linux-daemon.patch, NONE, 1.1 oki4linux.init, NONE, 1.1 oki4linux.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
Dominik Mierzejewski (rathann)
fedora-extras-commits at redhat.com
Tue Oct 17 20:43:46 UTC 2006
Author: rathann
Update of /cvs/extras/rpms/oki4linux/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20541/devel
Modified Files:
.cvsignore sources
Added Files:
oki4linux-a4.patch oki4linux-daemon.patch oki4linux.init
oki4linux.spec
Log Message:
auto-import oki4linux-2.1gst-1 on branch devel from oki4linux-2.1gst-1.src.rpm
oki4linux-a4.patch:
--- NEW FILE oki4linux-a4.patch ---
diff -Nura oki4linux.bef/src/main.c oki4linux/src/main.c
--- oki4linux.bef/src/main.c 2004-03-07 23:58:13.000000000 +0100
+++ oki4linux/src/main.c 2004-03-07 23:59:30.000000000 +0100
@@ -98,7 +98,7 @@
* Global data set up by command line options.
*/
static int verbose = 0;
-static int size_index = 4; /* Letter paper is default */
+static int size_index = 0; /* A4 paper is default */
static char *output_name = NULL; /* default output device file */
static enum {
diff -Nura oki4linux.bef/src/oki4daemon oki4linux/src/oki4daemon
--- oki4linux.bef/src/oki4daemon 2004-03-07 23:58:13.000000000 +0100
+++ oki4linux/src/oki4daemon 2004-03-08 00:01:29.000000000 +0100
@@ -97,7 +97,7 @@
my ($papersize, $darkness, $paperweight, $graphics, $manual);
# override default in oki4drv
- $papersize = 'letter';
+ $papersize = 'a4';
# Step 2: read beginning of job, until no @FAKEOKI options
my $firstline;
oki4linux-daemon.patch:
--- NEW FILE oki4linux-daemon.patch ---
diff -Nura oki4linux.dupa/src/oki4daemon oki4linux/src/oki4daemon
--- oki4linux.dupa/src/oki4daemon 2004-03-06 04:25:04.000000000 +0100
+++ oki4linux/src/oki4daemon 2004-03-06 04:28:27.000000000 +0100
@@ -1,4 +1,4 @@
-#! /usr/bin/perl
+#!/usr/bin/perl
# Simple named pipe daemon for oki4drv.
@@ -18,7 +18,7 @@
# below...
# If not in path
-my $oki4drv = '/usr/local/sbin/oki4drv';
+my $oki4drv = '/usr/sbin/oki4drv';
# contents of 8min.rip from distribution. You could use immediate.rip.
my $sleepstring = '%-98765XBb
@@ -36,10 +36,13 @@
$fifo = $opt_f if ($opt_f);
if (! -p $fifo) {
- system("mkfifo $fifo 0600") == 0
+ system("mkfifo $fifo -m0660") == 0
or die "Unable to make named pipe $fifo";
}
+#system("chown lp.sys $fifo; chmod 660 $fifo") == 0
+# or die "Unable to set ownerships/permissions for named pipe $fifo";
+
# Step 1.5: dissociate, daemonize, &c...
# TODO: Connect stderr/stdout to logger or something similar, and/or
@@ -48,7 +51,7 @@
fork and exit;
use Sys::Syslog qw(:DEFAULT setlogsock);
-setlogsock('unix'); # change to 'inet' for network logging
+setlogsock('inet'); # change to 'inet' for network logging
openlog ('oki4daemon', 'pid,cons,ndelay', 'lpr')
or die 'Unable to open syslog';
diff -Nura oki4linux.dupa/src/oki4daemon oki4linux/src/oki4daemon
--- oki4linux.dupa/src/oki4daemon 2004-03-06 05:34:04.000000000 +0100
+++ oki4linux/src/oki4daemon 2004-03-06 05:34:26.000000000 +0100
@@ -40,8 +40,8 @@
or die "Unable to make named pipe $fifo";
}
-#system("chown lp.sys $fifo; chmod 660 $fifo") == 0
-# or die "Unable to set ownerships/permissions for named pipe $fifo";
+system("chown root:lp $fifo; chmod 660 $fifo") == 0
+ or die "Unable to set ownerships/permissions for named pipe $fifo";
# Step 1.5: dissociate, daemonize, &c...
--- NEW FILE oki4linux.init ---
#!/bin/sh
#
# oki4daemon oki4daemon - printer driver daemon
#
# chkconfig: 2345 11 89
#
# description: oki4daemon - daemon developed by Grant Taylor to \
# support the OKI 4w and compatible winprinters. \
# These printers have high requirements concerning \
# timing and therefore one cannot use their driver \
# directly out of a printer spooler (CUPS, LPD). To \
# solve this problem, one lets the spooler send the \
# job to this deamon. Activate this daemon when you \
# have one of these printers and set up a CUPS queue \
# for your printer with "oki4w_install". Do not \
# connect an OKI winprinter to a machine with high \
# loads or high security demands.
#
# Source function library
. /etc/rc.d/init.d/functions
# Get service config - may override defaults
[ -f /etc/sysconfig/oki4daemon ] && . /etc/sysconfig/oki4daemon
# See how we were called.
case "$1" in
start)
# Check if the service is already running?
if [ ! -f /var/lock/subsys/oki4daemon ]; then
echo -n $"Starting oki4daemon: "
daemon oki4daemon
RETVAL=$?
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/oki4daemon
echo
fi
;;
stop)
if [ -f /var/lock/subsys/oki4daemon ]; then
# Stop daemons.
echo -n $"Stopping oki4daemon: "
killproc oki4daemon
rm -f /var/lock/subsys/oki4daemon
echo
fi
;;
restart)
$0 stop
$0 start
exit $?
;;
reload)
if [ -f /var/lock/subsys/oki4daemon ]; then
echo -n $"Reloading oki4daemon: "
killproc oki4daemon -HUP
RETVAL=$?
echo
fi
;;
force-reload)
# if program allows reloading without stopping
$0 reload
# or if it doesn't
$0 restart
exit $?
;;
status)
status oki4daemon
RETVAL=$?
;;
*)
msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
exit 3
esac
exit $RETVAL
# This must be last line !
# vi:syntax=sh:tw=78:ts=8:sw=4
--- NEW FILE oki4linux.spec ---
Summary: OKIPAGE (4w, 4w Plus, 6w, 8w, 8w Lite, 8z), OL400w printer driver
Summary(pl): Sterownik do drukarek OKIPAGE (4w, 4w Plus, 6w, 8w, 8w Lite, 8z), OL400w
Name: oki4linux
Version: 2.1gst
Release: 1%{?dist}
License: BSD
Group: System Environment/Daemons
URL: http://www.linuxprinting.org/show_driver.cgi?driver=oki4drv
Source0: http://www.linuxprinting.org/download/printing/%{name}-%{version}.tar.gz
# Source0-md5: 54c85488d2489d2431ce518916b20515
Source1: %{name}.init
Patch0: %{name}-daemon.patch
Patch1: %{name}-a4.patch
Requires: initscripts
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/chkconfig
Requires: ghostscript
BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(id -u -n)
%description
User space based driver for OKIPAGE (4w, 4w Plus, 6w, 8w, 8w Lite, 8z), OL400w
printers.
%description -l pl
Sterownik do drukarek OKIPAGE (4w, 4w Plus, 6w, 8w, 8w Lite, 8z), OL400w
zaimplementowany w przestrzeni użytkownika.
%prep
%setup -q -n %{name}
%patch0 -p1
%patch1 -p1
%build
pushd src
make clean
make CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}
popd
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{_sbindir},%{_initrddir},%{_mandir}/man1,/dev}
install -pm755 src/oki4drv $RPM_BUILD_ROOT%{_sbindir}
install -pm755 src/oki4daemon $RPM_BUILD_ROOT%{_sbindir}
install -pm644 src/oki4drv.man $RPM_BUILD_ROOT%{_mandir}/man1/oki4drv.1
install -pm644 src/README.oki4daemon ./
install -pm644 src/readback.c doc/
install -pm755 %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/oki4daemon
touch $RPM_BUILD_ROOT/dev/oki4drv
%clean
rm -rf $RPM_BUILD_ROOT
%post
/sbin/chkconfig --add oki4daemon
if [ -f /var/lock/subsys/oki4daemon ]; then
/etc/rc.d/init.d/oki4daemon restart 1>&2
else
echo "Run \"/etc/rc.d/init.d/oki4daemon start\" to start oki4daemon daemon."
fi
%preun
if [ "$1" = "0" ]; then
if [ -f /var/lock/subsys/oki4daemon ]; then
/etc/rc.d/init.d/oki4daemon stop 1>&2
fi
/sbin/chkconfig --del oki4daemon
fi
%files
%defattr(644,root,root,755)
%doc ChangeLog COPYING README README.oki4daemon crack doc samples
%attr(755,root,root) %{_sbindir}/oki4d*
%attr(755,root,root) /etc/rc.d/init.d/oki4daemon
%{_mandir}/man1/oki4drv.1*
%attr(660,root,lp) %ghost /dev/oki4drv
%changelog
* Thu Oct 05 2006 Dominik Mierzejewski <rpm at greysector.net> 2.1gst-1
- adapted PLD spec
- FE compliance
Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/oki4linux/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 17 Oct 2006 20:41:37 -0000 1.1
+++ .cvsignore 17 Oct 2006 20:43:16 -0000 1.2
@@ -0,0 +1 @@
+oki4linux-2.1gst.tar.gz
Index: sources
===================================================================
RCS file: /cvs/extras/rpms/oki4linux/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources 17 Oct 2006 20:41:37 -0000 1.1
+++ sources 17 Oct 2006 20:43:16 -0000 1.2
@@ -0,0 +1 @@
+54c85488d2489d2431ce518916b20515 oki4linux-2.1gst.tar.gz
More information about the scm-commits
mailing list