-
Notifications
You must be signed in to change notification settings - Fork 1
/
zebraprint.spec
60 lines (49 loc) · 1.79 KB
/
zebraprint.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
%global srcname zebraprint
%global cups_datadir %(/usr/bin/cups-config --datadir)
%global cups_filterdir %{_cups_serverbin}/filter
Name: {{{ git_dir_name }}}
Version: {{{ git_dir_version }}}
Release: 1%{?dist}
Summary: Zebra CPCL label printer support
License: GPLv2+
URL: http://github.com/unipartdigital/%{srcname}
VCS: {{{ git_dir_vcs }}}
Source: {{{ git_dir_pack }}}
BuildRequires: gcc
BuildRequires: libxml2-devel
BuildRequires: libxslt-devel
BuildRequires: cups-devel
%description
Zebra printers are supported by the CUPS printing system but only as
raster image devices. This means that documents to be printed are
sent to the printer as a large raster (bitmap) image. On some Zebra
printers, this can result in a delay of around 80 seconds before the
label is printed.
A more efficient method is to use the Comtec Printer Control Language
(CPCL). This is a page description language (analogous to PostScript)
that can be used to describe the page using built-in primitives for
text, barcodes, graphics, etc.
Installing this package will allow you to print CPCL or CPCL/XML
documents directly to your Zebra printer via CUPS.
%prep
%autosetup -n %{srcname}-%{version}
%build
%{make_build}
%install
mkdir -p $RPM_BUILD_ROOT{%{cups_datadir}/mime,%{cups_filterdir}}
%{make_install} CUPS_DATADIR=$RPM_BUILD_ROOT%{cups_datadir} \
CUPS_FILTERDIR=$RPM_BUILD_ROOT%{cups_filterdir}
%post
systemctl try-restart cups.path cups.socket cups.service &>/dev/null || :
%postun
systemctl try-restart cups.path cups.socket cups.service &>/dev/null || :
%files
%license COPYING
%dir %{cups_datadir}/zebraprint
%{cups_datadir}/zebraprint/cpcl.xsd
%{cups_datadir}/zebraprint/cpcl.xslt
%{cups_datadir}/mime/zebraprint.types
%{cups_datadir}/mime/zebraprint.convs
%{cups_filterdir}/xmltocpcl
%changelog
{{{ git_dir_changelog }}}