avatar
Rosa has added 39cf8c7a91
initial: add from SRPM
... ... --- /dev/null
... ... +++ b/.abf.yml
... ... @@ -0,0 +1,3 @@
1
sources:
2
  "lm1100maint.tar.bz2": 37d093cda976cccb5ee35c840aaaa9d9a8ed97f8
3
  "lxcontrol.tar.bz2": 7c66795a45417e2ccd2dd4e7ce370691d74a6bd9
view file @ 39cf8c7a91
... ... --- /dev/null
... ... +++ b/README.Lexmark-Maintenance
... ... @@ -0,0 +1,27 @@
1
2
Lexmark Printer Maintenance Tools
3
---------------------------------
4
5
Programs for maintanance of Lexmark inkjet printers: Moving out the print
6
head to change the cartridges, adjusting the print heads, cleaning the
7
nozzles ...
8
9
showcartridges
10
hidecartridges
11
headalign
12
headclean     - Command line programs for the Lexmark 5xxx and 7xxx
13
14
changecartridge - Another command line tool for changing the
15
                ink cartridges in the Lexmark 5xxx and 7xxx 
16
17
lm1100change,
18
lm1100back    - Command line tools for changing the cartridge in Lexmark
19
                1xxx printers
20
21
Since Lexmark will not release protocol specifications the authors had
22
to dissassemble the byte codes sent by their Windows printer maintenance
23
programs to create this.
24
25
26
27
view file @ 39cf8c7a91
... ... --- /dev/null
... ... +++ b/README.changecartridge
... ... @@ -0,0 +1,22 @@
1
2
changecartridge - a program for changing the ink cartridges
3
                  in the Lexmark 5xxx and 7xxx printers.
4
5
(C) 1999 Henryk Paluch, paluch@bimbo.fjfi.cvut.cz
6
7
To change the ink cartridges in a Lexmark printer you must move the
8
print head out of its parking corner, so that you can reach the
9
cartridges. Lexmark only provides a Windows program for doing this. To
10
not need to boot Windows for changing the cartridges there is this
11
script. Simply call it with:
12
13
   changecartridge
14
15
on the command line and follow the steps described on the screen.
16
The printer is assumed to be at the parallel port #1 (/dev/lp0), but
17
this setting can be changed by editing the definition of the PORT
18
variable in /usr/bin/changecartridge.
19
20
21
22
view file @ 39cf8c7a91
... ... --- /dev/null
... ... +++ b/changecartridge
... ... @@ -0,0 +1,25 @@
1
#!/bin/bash
2
#
3
# Sends escapes to Lexmark 5xxx, 7xxx to change cartridges
4
# (C) 1999 Henryk Paluch, paluch@bimbo.fjfi.cvut.cz
5
# $Id:$
6
#
7
PORT=/dev/lp0
8
9
echo "Lexmark(R) JetPrinter(TM) 5xxx,7xxx cartridge changer"
10
echo "Assuming printer on port $PORT"
11
echo
12
13
if [ ! -w $PORT ];then
14
 echo "Missing write permissions to printer port $PORT"
15
 exit 1
16
fi
17
18
echo "Press enter to load cartridge..."
19
read tmp
20
echo -ne '\245\000\005\100\340\012\035\160' > $PORT
21
echo "Insert cartridge and press enter..."
22
read tmp
23
echo -ne '\245\000\005\100\340\012\001\000' > $PORT
24
exit 0
25
... ... --- /dev/null
... ... +++ b/lx.control.sh
... ... @@ -0,0 +1,126 @@
1
#!/bin/bash
2
3
DIALOG=$(which dialog 2> /dev/null)
4
XDIALOG=$(which Xdialog 2> /dev/null)
5
KDIALOG=$(which kdialog 2> /dev/null)
6
LPC=$(which lpc 2> /dev/null)
7
NAME=Utils
8
TITLE='Lexmark $NAME'
9
BACKTITLE='$TITLE - Conectiva Linux'
10
ACTION=
11
12
mydialog()
13
{
14
	local args=$(eval "echo $MYARGS")
15
	eval "$DIALOG $args $@"
16
}
17
18
msgbox()
19
{
20
	local x=$2
21
	local y=$1
22
	shift; shift
23
	mydialog --msgbox "\"$@\"" $y $x
24
}
25
26
menu()
27
{
28
	local title="$1"
29
	shift
30
	if [ "$DIALOG" = "$KDIALOG" ]; then
31
		mydialog --menu "\"$title\"" ${1+"$@"}
32
	else
33
		mydialog --menu "\"$title\"" 15 60 8 ${1+"$@"}
34
	fi
35
}
36
37
if [ -n "$DISPLAY" -a -x "$KDIALOG" ]; then
38
	DIALOG=$KDIALOG
39
	MYARGS="--title \\\"\"$TITLE\"\\\""
40
else
41
	if [ -n "$DISPLAY" -a -x "$XDIALOG" ]; then
42
		DIALOG=$XDIALOG
43
		MYARGS="--title \\\"\"$TITLE\"\\\" --backtitle \\\"\"$BACKTITLE\"\\\" --stdout --cr-wrap"
44
	elif [ ! -t 1 -o ! -t 0 ]; then
45
		if [ -n "$DISPLAY" ]; then
46
			xterm=$(which xterm 2> /dev/null)
47
			if [ -n "$xterm" ]; then
48
				xterm -c $0 xterm
49
				exit 1
50
			fi
51
		fi
52
		echo "Can't run under X11 without a terminal!"
53
		exit 1
54
	else
55
		MYARGS="--title \\\"\"$TITLE\"\\\" --backtitle \\\"\"$BACKTITLE\"\\\" --stdout --cr-wrap"
56
	fi
57
fi
58
59
if [ -z "$DIALOG" ]; then
60
	echo "Sorry, you must have at least [Xk]dialog installed."
61
	exit 1
62
fi
63
64
if [ -z "$LPC" ]; then
65
	msgbox 10 60 "Sorry, couldn't find lpc command."
66
	exit 1
67
fi
68
69
case "$0" in
70
	*headalign*)
71
		ACTION=headalign
72
		NAME="Head Alignment"
73
		;;
74
	*headclean*)
75
		ACTION=headclean
76
		NAME="Head Cleaner"
77
		;;
78
	*showcartridges*)
79
		ACTION=showcartridges
80
		NAME="Show Cartridges"
81
		;;
82
	*hidecartridges*)
83
		ACTION=hidecartridges
84
		NAME="Hide Cartridges"
85
		;;
86
	*)
87
		msgbox 7 60 "You shouldn't call this directly, sorry."
88
		exit 1
89
		;;
90
esac
91
92
ACTION=$(which $ACTION 2> /dev/null)
93
94
if [ -z "$ACTION" ]; then
95
	msgbox 11 60 "Sorry, you must have lxcontrol package installed.\nYou may want to install it by using\napt-get install task-printer-lexmark"
96
	exit 1
97
fi
98
99
# Check if CUPS is running
100
lpstat -r >& /dev/null
101
if [ "$?" -ne "0" ]; then
102
	msgbox 10 60 "CUPS server is stopped.\nYou must start it and then run this program again."
103
	exit 1
104
fi
105
106
# Get printers list
107
if [ "$DIALOG" = "$KDIALOG" ]; then
108
	printers=$(echo $($LPC status | sort | sed -ne 's/\(.\+\):$/"\1" "\1"/p'))
109
else
110
	printers=$(echo $($LPC status | sort | sed -ne 's/\(.\+\):$/"\1" ""/p'))
111
fi
112
113
# Show them to the user, and get the selected one
114
printer=$(menu 'Please, select the printer:' $printers)
115
[ "$?" -eq "1" ] && exit 1
116
117
# Print it.
118
$ACTION $printer
119
if [ "$?" -eq "1" -o -z "$printer" ]; then
120
	msgbox 11 60 "Something wicked happen while sending the command.\nPlease, take a look at /var/log/cups/error_log\nand report it at http://bugzilla.conectiva.com.br/"
121
	exit 1
122
else
123
	msgbox 9 60 "Command sent successfully!"
124
fi
125
126
exit 0
view file @ 39cf8c7a91
... ... --- /dev/null
... ... +++ b/lxcontrol-lx.control-cups.patch
... ... @@ -0,0 +1,11 @@
1
--- lxcontrol/lx.control.ol	2004-03-01 09:15:02.633838664 -0300
2
+++ lxcontrol/lx.control	2004-03-01 09:15:19.035345256 -0300
3
@@ -113,7 +113,7 @@
4
 exit 1
5
 fi
6
 LPCLPD=/usr/sbin/lpc-lpd
7
-LPCCUPS=/usr/sbin/lpc-cups
8
+LPCCUPS=/usr/sbin/lpc
9
 AUXDIR=/usr/share/lxcontrol
10
 SHOW=$AUXDIR/showcart.out
11
 HIDE=$AUXDIR/hidecart.out
view file @ 39cf8c7a91
... ... --- /dev/null
... ... +++ b/lxcontrol.spec
... ... @@ -0,0 +1,221 @@
1
Summary:	Lexmark printer management commands
2
Name:		lxcontrol
3
Version:	1.3 
4
Release:	%mkrel 10
5
License:	GPL
6
Group:		System/Printing
7
Source:		http://www.powerup.com.au/~pbwest/lexmark/lexmark.html/lxcontrol.tar.bz2
8
Source1:	http://209.233.17.85/lexmark/lm1100maint.tar.bz2
9
Source2:	http://bimbo.fjfi.cvut.cz/~paluch/l7kdriver/changecartridge
10
Source3:	README.changecartridge
11
Source4:	README.Lexmark-Maintenance
12
Source5:	lx.control.sh
13
Patch0:		lxcontrol-lx.control-cups.patch
14
Requires:	cups
15
Conflicts:	printer-utils = 2007
16
Conflicts:	printer-filters = 2007
17
BuildRoot:	%{_tmppath}/%{name}-%{version}-root
18
19
%description
20
Tools for show and hide catridges, and align and clean heads in a Lexmark
21
printer. Used with Lexmark 5xxx, 7xxx and 11xx, possible with others.
22
23
%prep
24
25
%setup -q -n %{name}
26
%setup -q -n %{name} -a 1 -T -D
27
cp %{SOURCE2} changecartridge
28
mv README.Lexmark README.Lexmark5xxx_7xxx
29
mv lm1100maint/README README.Lexmark1xxx
30
cp %{SOURCE3} .
31
cp %{SOURCE4} .
32
%patch0 -p1
33
34
%build
35
36
%install
37
rm -rf %{buildroot}
38
39
install -d %{buildroot}%{_bindir}
40
install -d %{buildroot}%{_datadir}/lxcontrol
41
install -d %{buildroot}%{_datadir}/lm1100maint
42
install -d %{buildroot}%{_datadir}/applications
43
44
# Lexmark printer maintenance
45
# Program and data files
46
install -m 755 lx.control %{buildroot}%{_bindir}/
47
install -m 755 %{_sourcedir}/lx.control.sh %{buildroot}%{_bindir}/
48
install -m 755 lm1100maint/lm1100change %{buildroot}%{_bindir}/
49
install -m 755 lm1100maint/lm1100back %{buildroot}%{_bindir}/
50
install -m 755 changecartridge %{buildroot}%{_bindir}/
51
cp -f *.out %{buildroot}%{_datadir}/lxcontrol/
52
( cd %{buildroot}%{_bindir}
53
  ln -s lx.control headclean
54
  ln -s lx.control headalign
55
  ln -s lx.control showcartridges
56
  ln -s lx.control hidecartridges
57
  ln -s lx.control.sh headclean.sh
58
  ln -s lx.control.sh headalign.sh
59
  ln -s lx.control.sh showcartridges.sh
60
  ln -s lx.control.sh hidecartridges.sh
61
)
62
cp -f lm1100maint/lexmark* \
63
	%{buildroot}%{_datadir}/lm1100maint/
64
65
# XDG menu
66
install -d %{buildroot}%{_datadir}/applications
67
68
cat > %{buildroot}%{_datadir}/applications/mandriva-headalign.desktop << EOF
69
[Desktop Entry]
70
Name=Lexmark headalign
71
Comment=Lexmark Lexmark 5xxx, 7xxx and 11xx Head Aligner
72
Exec=%{_bindir}/headalign.sh
73
Icon=printmgr
74
Terminal=false
75
Type=Application
76
Categories=X-MandrivaLinux-System-Configuration-Printing;
77
EOF
78
79
cat > %{buildroot}%{_datadir}/applications/mandriva-headclean.desktop << EOF
80
[Desktop Entry]
81
Name=Lexmark headclean
82
Comment=Lexmark Lexmark 5xxx, 7xxx and 11xx Head Cleaner
83
Exec=%{_bindir}/headclean.sh
84
Icon=printmgr
85
Terminal=false
86
Type=Application
87
Categories=X-MandrivaLinux-System-Configuration-Printing;
88
EOF
89
90
cat > %{buildroot}%{_datadir}/applications/mandriva-hidecartridges.desktop << EOF
91
[Desktop Entry]
92
Name=Lexmark hidecartridges
93
Comment=Lexmark Lexmark 5xxx, 7xxx and 11xx Cartridges Hider
94
Exec=%{_bindir}/hidecartridges.sh
95
Icon=printmgr
96
Terminal=false
97
Type=Application
98
Categories=X-MandrivaLinux-System-Configuration-Printing;
99
EOF
100
101
cat > %{buildroot}%{_datadir}/applications/mandriva-showcartridges.desktop << EOF
102
[Desktop Entry]
103
Name=Lexmark showcartridges
104
Comment=Lexmark Lexmark 5xxx, 7xxx and 11xx Cartridges Viewer
105
Exec=%{_bindir}/showcartridges.sh
106
Icon=printmgr
107
Terminal=false
108
Type=Application
109
Categories=X-MandrivaLinux-System-Configuration-Printing;
110
EOF
111
112
%if %mdkversion < 200900
113
%post
114
%update_menus
115
%endif
116
117
%if %mdkversion < 200900
118
%postun
119
%clean_menus
120
%endif
121
122
%clean
123
rm -rf %{buildroot}
124
125
%files
126
%defattr(0644,root,root,0755)
127
%attr(0755,root,root) %{_bindir}/*
128
%{_datadir}/lm1100maint
129
%{_datadir}/lxcontrol
130
%{_datadir}/applications/*
131
132
133
%changelog
134
* Wed May 04 2011 Oden Eriksson <oeriksson@mandriva.com> 1.3-10mdv2011.0
135
+ Revision: 666110
136
- mass rebuild
137
138
* Fri Dec 03 2010 Oden Eriksson <oeriksson@mandriva.com> 1.3-9mdv2011.0
139
+ Revision: 606436
140
- rebuild
141
142
* Tue Mar 16 2010 Oden Eriksson <oeriksson@mandriva.com> 1.3-8mdv2010.1
143
+ Revision: 521149
144
- rebuilt for 2010.1
145
146
* Thu Sep 03 2009 Christophe Fergeau <cfergeau@mandriva.com> 1.3-7mdv2010.0
147
+ Revision: 426020
148
- rebuild
149
150
* Tue Jun 17 2008 Thierry Vignaud <tv@mandriva.org> 1.3-6mdv2009.0
151
+ Revision: 223135
152
- rebuild
153
154
  + Pixel <pixel@mandriva.com>
155
    - rpm filetriggers deprecates update_menus/update_scrollkeeper/update_mime_database/update_icon_cache/update_desktop_database/post_install_gconf_schemas
156
157
* Tue Jan 15 2008 Thierry Vignaud <tv@mandriva.org> 1.3-5mdv2008.1
158
+ Revision: 152888
159
- rebuild
160
161
* Tue Jan 15 2008 Thierry Vignaud <tv@mandriva.org> 1.3-4mdv2008.1
162
+ Revision: 152887
163
- rebuild
164
- kill re-definition of %%buildroot on Pixel's request
165
166
  + Olivier Blin <oblin@mandriva.com>
167
    - restore BuildRoot
168
169
* Thu Aug 30 2007 Oden Eriksson <oeriksson@mandriva.com> 1.3-3mdv2008.0
170
+ Revision: 75343
171
- fix deps (pixel)
172
173
* Thu Aug 16 2007 Oden Eriksson <oeriksson@mandriva.com> 1.3-2mdv2008.0
174
+ Revision: 64163
175
- use the new System/Printing RPM GROUP
176
177
* Fri Aug 10 2007 Oden Eriksson <oeriksson@mandriva.com> 1.3-1mdv2008.0
178
+ Revision: 61614
179
- Import lxcontrol
180
181
182
183
* Fri Aug 10 2007 Oden Eriksson <oeriksson@mandriva.com> 0.4.3-1mdv2008.0
184
- initial Mandriva package
185
186
* Thu May 27 2004 Marcelo Ricardo Leitner <mrl@conectiva.com.br>
187
+ 2004-05-27 11:18:35 (61474)
188
- Fix translations.
189
190
* Thu May 27 2004 Marcelo Ricardo Leitner <mrl@conectiva.com.br>
191
+ 2004-05-27 10:47:52 (61470)
192
- Fix buildroot.
193
194
* Thu May 27 2004 Marcelo Ricardo Leitner <mrl@conectiva.com.br>
195
+ 2004-05-27 10:45:24 (61469)
196
- Updated .desktop Comment's so that they inform the printer the util is
197
  built for.
198
199
* Thu May 27 2004 Marcelo Ricardo Leitner <mrl@conectiva.com.br>
200
+ 2004-05-27 10:39:29 (61468)
201
- Added graphical interface to the tools. Closes: #12216
202
203
* Sat May 08 2004 Marcelo Ricardo Leitner <mrl@conectiva.com.br>
204
+ 2004-05-08 19:14:24 (59811)
205
- Put back %%{_bindir} to %%files section.
206
207
* Fri May 07 2004 Wanderlei Antonio Cavassin <cavassin@conectiva.com.br>
208
+ 2004-05-07 21:49:31 (59766)
209
- Removed old menu support
210
211
* Mon Mar 01 2004 Marcelo Ricardo Leitner <mrl@conectiva.com.br>
212
+ 2004-03-01 09:24:44 (50559)
213
- Added patch lx.control-cups, which makes lx.control correctly see
214
  our cups' lpc command.
215
- Removed the Requires for printer-utils
216
- Added Requires to cups, since it's the only required package to this
217
  one works.
218
219
* Thu Aug 29 2002 Gustavo Niemeyer <niemeyer@conectiva.com>
220
+ 2002-08-29 18:19:33 (8651)
221
- Imported package from 8.0.

Comments