]> git.ipfire.org Git - ipfire-3.x.git/blob - cups/cups.nm
cups: Fix file permissions in /usr/include and drop /var/run
[ipfire-3.x.git] / cups / cups.nm
1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
5
6 name = cups
7 version = 2.3.6
8 release = 3
9
10 groups = Applications/Printing
11 url = https://cups.org/software.php
12 license = GPLv2+
13 summary = The common UNIX printing system
14
15 description
16 CUPS is the standards-based, open source printing system developed
17 by Apple Inc. for Mac OS(R) X and other UNIX(R)-like operating systems.
18 end
19
20 source_dl = https://github.com/apple/cups/archive/refs/tags/v%{version}.tar.gz#/
21 sources = %{thisapp}-source.tar.gz
22
23 build
24 requires
25 autoconf
26 automake
27 avahi-devel
28 cyrus-sasl-devel
29 dbus-devel
30 gcc-c++
31 gnutls-devel
32 libacl-devel
33 libgcrypt-devel
34 libjpeg-devel
35 libpng-devel
36 libtasn1-devel
37 libtiff-devel
38 libusb-devel
39 openldap-devel
40 pam-devel
41 systemd-devel
42 zlib-devel
43 end
44
45 configure_options += \
46 --localedir=%{datadir}/locale \
47 --with-cupsd-file-perm=0755 \
48 --with-log-file-perm=0600 \
49 --with-docdir=%{datadir}/%{name}/www \
50 --with-dbusdir=%{sysconfdir}/dbus-1 \
51 --enable-debug \
52 --enable-relro \
53 --enable-avahi \
54 --enable-threads \
55 --enable-gnutls \
56 --enable-webif \
57 --with-xinetd=no
58
59 make_install_targets += \
60 BUILDROOT=%{BUILDROOT}
61
62 install_cmds
63 # Install default config file.
64 mkdir -pv %{BUILDROOT}/etc/cups
65 cp -vf %{DIR_APP}/conf/cupsd.conf %{BUILDROOT}/etc/cups/
66
67 # Fix file permissions in /usr/include
68 find %{BUILDROOT}%{includedir} -type f -iname "*.h" \
69 -exec chmod 644 {} \;
70
71 # Drop /var/run
72 rm -rvf %{BUILDROOT}%{localstatedir}/run
73 end
74 end
75
76 packages
77 package %{name}
78 recomends
79 ghostscript
80 end
81
82 script postin
83 systemctl daemon-reload >/dev/null 2>&1 || :
84 systemctl --no-reload enable cups.path >/dev/null 2>&1 || :
85 end
86
87 script preun
88 systemctl --no-reload disable cups.path >/dev/null 2>&1 || :
89 systemctl --no-reload disable cupsd.socket >/dev/null 2>&1 || :
90 systemctl --no-reload disable cupsd.service >/dev/null 2>&1 || :
91 systemctl stop cupsd.socket >/dev/null 2>&1 || :
92 systemctl stop cupsd.service >/dev/null 2>&1 || :
93 systemctl stop cups.path >/dev/null 2>&1 || :
94 end
95
96 script postun
97 systemctl daemon-reload >/dev/null 2>&1 || :
98 end
99
100 script postup
101 systemctl daemon-reload >/dev/null 2>&1 || :
102 systemctl try-restart cups.path >/dev/null 2>&1 || :
103 systemctl try-restart cupsd.service >/dev/null 2>&1 || :
104 end
105 end
106
107 package %{name}-client
108 summary = CUPS printing system - client programs.
109 description
110 CUPS printing system provides a portable printing layer for
111 UNIX operating systems. This package contains command-line client
112 programs.
113 end
114
115 requires
116 %{name}-libs = %{thisver}
117 end
118
119 provides += \
120 lpr
121
122 files
123 %{sbindir}/lpc.cups
124 %{bindir}/cancel*
125 %{bindir}/lp*
126 %{mandir}/man1/lp*.1.gz
127 %{mandir}/man1/cancel-cups.1.gz
128 %{mandir}/man8/lpc-cups.8.gz
129 end
130 end
131
132 package %{name}-lpd
133 summary = CUPS printing system - lpd emulation.
134 description
135 CUPS printing system provides a portable printing layer for
136 UNIX operating systems. This is the package that provides standard
137 lpd emulation.
138 end
139
140 requires
141 %{name} = %{thisver}
142 %{name}-libs = %{thisver}
143 end
144
145 provides += \
146 lpd
147
148 files
149 %{unitdir}/cups-lpd.socket
150 %{unitdir}/cups-lpd@.service
151 %{prefix}/lib/daemon/cups-lpd
152 %{mandir}/man8/cups-lpd.8.gz
153 end
154
155 script postin
156 systemctl daemon-reload >/dev/null 2>&1 || :
157 end
158
159 script preun
160 systemctl --no-reload disable cups-lpd.socket >/dev/null 2>&1 || :
161 systemctl --no-reload disable cups-lpd@.service >/dev/null 2>&1 || :
162 systemctl stop cups-lpd.socket >/dev/null 2>&1 || :
163 systemctl stop cups-lpd@.service >/dev/null 2>&1 || :
164 end
165
166 script postun
167 systemctl daemon-reload >/dev/null 2>&1 || :
168 end
169
170 script postup
171 systemctl daemon-reload >/dev/null 2>&1 || :
172 systemctl try-restart cups-lpd@.service >/dev/null 2>&1 || :
173 end
174 end
175
176 package %{name}-devel
177 template DEVEL
178
179 requires += %{name}-libs=%{thisver}
180 end
181
182 package %{name}-libs
183 template LIBS
184 end
185
186 package %{name}-ipptool
187 summary = CUPS printing system - tool for performing IPP requests.
188 description
189 Sends IPP requests to the specified URI and tests and/or displays \
190 the results.
191 end
192
193 requires
194 %{name}-libs = %{thisver}
195 end
196
197 files
198 %{bindir}/ipptool
199 %{bindir}/ippfind
200 %{datadir}/cups/ipptool
201 %{datadir}/cups/ipptool/*
202 %{mandir}/man1/ipptool.1.gz
203 %{mandir}/man5/ipptoolfile.5.gz
204 end
205 end
206
207 package %{name}-debuginfo
208 template DEBUGINFO
209 end
210 end