Skip to content

Commit b62ff0e

Browse files
committed
Bring over commands from cups-commands, man pages, and docos.
1 parent 603d804 commit b62ff0e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+12951
-5
lines changed

.gitignore

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/commands/cancel
2+
/commands/cupsaccept
3+
/commands/cupsenable
4+
/commands/lp
5+
/commands/lpadmin
6+
/commands/lpc
7+
/commands/lpmove
8+
/commands/lpoptions
9+
/commands/lpq
10+
/commands/lpr
11+
/commands/lprm
12+
/commands/lpstat
13+
/config.h
14+
/config.log
15+
/config.status
16+
/configure~
17+
/daemon/cups-locald
18+
/Makedefs

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@ CUPS Local Server v3 (cups-local)
55
![Apache 2.0](https://img.shields.io/github/license/OpenPrinting/cups-local)
66
[![Build and Test](https://github.com/OpenPrinting/cups-local/workflows/Build%20and%20Test/badge.svg)](https://github.com/OpenPrinting/cups-local/actions/workflows/build.yml)
77
[![Coverity Scan](https://img.shields.io/coverity/scan/NNNNN)](https://scan.coverity.com/projects/OpenPrinting-cups-local)
8-
[![LGTM Grade](https://img.shields.io/lgtm/grade/cpp/github/OpenPrinting/cups-local)](https://lgtm.com/projects/g/OpenPrinting/cups-local/?mode=list)
98

10-
> *Note:* This project is intended to be paired with the "libcups",
11-
> "cups-commands", and "cups-sharing" projects. Right now all of this code
12-
> should be considered alpha-quality for testing purposes only!
9+
> *Note:* This project is intended to be paired with the "libcups", and
10+
> "cups-sharing" projects. Right now all of this code should be considered
11+
> alpha-quality for testing purposes only!
1312
1413
The CUPS Local Server provides a local, per-user spooler that handles conversion
1514
of print files and communications with IPP printers. This project is part of
@@ -37,7 +36,7 @@ The `man` subdirectory contains the manual pages for each of the commands.
3736
Legal Stuff
3837
-----------
3938

40-
Copyright © 2020-2022 by OpenPrinting.
39+
Copyright © 2020-2023 by OpenPrinting.
4140

4241
Copyright © 2007-2020 by Apple Inc.
4342

commands/Dependencies

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

commands/Makefile

Lines changed: 239 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,239 @@
1+
#
2+
# Commands makefile for the CUPS commands.
3+
#
4+
# Copyright © 2022 by OpenPrinting.
5+
#
6+
# Licensed under Apache License v2.0. See the file "LICENSE" for more
7+
# information.
8+
#
9+
10+
include ../Makedefs
11+
12+
13+
TARGETS = \
14+
cancel \
15+
cupsaccept \
16+
lp \
17+
lpadmin \
18+
lpc \
19+
lpmove \
20+
lpoptions \
21+
lpq \
22+
lpr \
23+
lprm \
24+
lpstat
25+
OBJS = \
26+
cancel.o \
27+
cupsaccept.o \
28+
lp.o \
29+
lpadmin.o \
30+
lpc.o \
31+
lpmove.o \
32+
lpoptions.o \
33+
lpq.o \
34+
lpr.o \
35+
lprm.o \
36+
lpstat.o
37+
38+
39+
#
40+
# Make all targets...
41+
#
42+
43+
all: $(TARGETS)
44+
45+
46+
#
47+
# Make unit tests...
48+
#
49+
50+
test:
51+
52+
53+
#
54+
# Clean all object files...
55+
#
56+
57+
clean:
58+
$(RM) $(OBJS) $(TARGETS)
59+
$(RM) cupsdisable cupsenable cupsreject
60+
61+
62+
#
63+
# Update dependencies (without system header dependencies...)
64+
#
65+
66+
depend:
67+
$(CC) -MM $(CPPFLAGS) $(OBJS:.o=.c) >Dependencies
68+
69+
70+
#
71+
# Install all targets...
72+
#
73+
74+
install:
75+
echo Installing admin commands to $(BUILDROOT)$(sbindir)
76+
$(INSTALL_DIR) -m 755 $(BUILDROOT)$(sbindir)
77+
$(INSTALL_BIN) cupsaccept $(BUILDROOT)$(sbindir)
78+
$(INSTALL_BIN) lpadmin $(BUILDROOT)$(sbindir)
79+
$(INSTALL_BIN) lpc $(BUILDROOT)$(sbindir)
80+
$(INSTALL_BIN) lpmove $(BUILDROOT)$(sbindir)
81+
$(RM) $(BUILDROOT)$(sbindir)/cupsdisable
82+
$(LN) cupsaccept $(BUILDROOT)$(sbindir)/cupsdisable
83+
$(RM) $(BUILDROOT)$(sbindir)/cupsenable
84+
$(LN) cupsaccept $(BUILDROOT)$(sbindir)/cupsenable
85+
$(RM) $(BUILDROOT)$(sbindir)/cupsreject
86+
$(LN) cupsaccept $(BUILDROOT)$(sbindir)/cupsreject
87+
echo Installing user commands tp $(BUILDROOT)$(bindir)
88+
$(INSTALL_DIR) -m 755 $(BUILDROOT)$(bindir)
89+
$(INSTALL_BIN) cancel $(BUILDROOT)$(bindir)
90+
$(INSTALL_BIN) lp $(BUILDROOT)$(bindir)
91+
$(INSTALL_BIN) lpoptions $(BUILDROOT)$(bindir)
92+
$(INSTALL_BIN) lpq $(BUILDROOT)$(bindir)
93+
$(INSTALL_BIN) lpr $(BUILDROOT)$(bindir)
94+
$(INSTALL_BIN) lprm $(BUILDROOT)$(bindir)
95+
$(INSTALL_BIN) lpstat $(BUILDROOT)$(bindir)
96+
97+
98+
#
99+
# Uninstall all targets...
100+
#
101+
102+
uninstall:
103+
$(RM) $(BUILDROOT)$(bindir)/cancel
104+
$(RM) $(BUILDROOT)$(bindir)/lp
105+
$(RM) $(BUILDROOT)$(bindir)/lpoptions
106+
$(RM) $(BUILDROOT)$(bindir)/lpq
107+
$(RM) $(BUILDROOT)$(bindir)/lpr
108+
$(RM) $(BUILDROOT)$(bindir)/lprm
109+
$(RM) $(BUILDROOT)$(bindir)/lpstat
110+
-$(RMDIR) $(BUILDROOT)$(bindir)
111+
$(RM) $(BUILDROOT)$(sbindir)/cupsaccept
112+
$(RM) $(BUILDROOT)$(sbindir)/cupsdisable
113+
$(RM) $(BUILDROOT)$(sbindir)/cupsenable
114+
$(RM) $(BUILDROOT)$(sbindir)/cupsreject
115+
$(RM) $(BUILDROOT)$(sbindir)/lpadmin
116+
$(RM) $(BUILDROOT)$(sbindir)/lpc
117+
$(RM) $(BUILDROOT)$(sbindir)/lpmove
118+
-$(RMDIR) $(BUILDROOT)$(sbindir)
119+
120+
121+
#
122+
# cancel
123+
#
124+
125+
cancel: cancel.o
126+
echo Linking $@...
127+
$(CC) $(LDFLAGS) -o cancel cancel.o $(LIBS)
128+
$(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
129+
130+
131+
#
132+
# cupsaccept
133+
#
134+
135+
cupsaccept: cupsaccept.o
136+
echo Linking $@...
137+
$(CC) $(LDFLAGS) -o cupsaccept cupsaccept.o $(LIBS)
138+
$(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
139+
for file in cupsenable cupsdisable cupsreject; do \
140+
$(RM) $$file; \
141+
$(LN) cupsaccept $$file; \
142+
done
143+
144+
145+
#
146+
# lp
147+
#
148+
149+
lp: lp.o
150+
echo Linking $@...
151+
$(CC) $(LDFLAGS) -o lp lp.o $(LIBS)
152+
$(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
153+
154+
155+
#
156+
# lpadmin
157+
#
158+
159+
lpadmin: lpadmin.o
160+
echo Linking $@...
161+
$(CC) $(LDFLAGS) -o lpadmin lpadmin.o $(LIBS)
162+
$(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
163+
164+
165+
#
166+
# lpc
167+
#
168+
169+
lpc: lpc.o
170+
echo Linking $@...
171+
$(CC) $(LDFLAGS) -o lpc lpc.o $(LIBS)
172+
$(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
173+
174+
175+
#
176+
# lpmove
177+
#
178+
179+
lpmove: lpmove.o
180+
echo Linking $@...
181+
$(CC) $(LDFLAGS) -o lpmove lpmove.o $(LIBS)
182+
$(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
183+
184+
185+
#
186+
# lpoptions
187+
#
188+
189+
lpoptions: lpoptions.o
190+
echo Linking $@...
191+
$(CC) $(LDFLAGS) -o lpoptions lpoptions.o $(LIBS)
192+
$(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
193+
194+
195+
#
196+
# lpq
197+
#
198+
199+
lpq: lpq.o
200+
echo Linking $@...
201+
$(CC) $(LDFLAGS) -o lpq lpq.o $(LIBS)
202+
$(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
203+
204+
205+
#
206+
# lpr
207+
#
208+
209+
lpr: lpr.o
210+
echo Linking $@...
211+
$(CC) $(LDFLAGS) -o lpr lpr.o $(LIBS)
212+
$(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
213+
214+
215+
#
216+
# lprm
217+
#
218+
219+
lprm: lprm.o
220+
echo Linking $@...
221+
$(CC) $(LDFLAGS) -o lprm lprm.o $(LIBS)
222+
$(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
223+
224+
225+
#
226+
# lpstat
227+
#
228+
229+
lpstat: lpstat.o
230+
echo Linking $@...
231+
$(CC) $(LDFLAGS) -o lpstat lpstat.o $(LIBS)
232+
$(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
233+
234+
235+
#
236+
# Dependencies...
237+
#
238+
239+
include Dependencies

0 commit comments

Comments
 (0)