]> git.ipfire.org Git - ipfire-3.x.git/blob - cups/cups.nm
python-setuputils: Update to 40.4.3
[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.2.4
8 release = 1
9
10 groups = Applications/Printing
11 url = http://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/releases/download/v%{version}/
21 sources = %{thisapp}-source.tar.gz
22
23 build
24 requires
25 autoconf
26 automake
27 avahi-devel
28 cyrus-sasl-devel
29 gcc-c++
30 gnutls-devel
31 libacl-devel
32 libgcrypt-devel
33 libjpeg-devel
34 libpng-devel
35 libtasn1-devel
36 libtiff-devel
37 libusb-devel
38 openldap-devel
39 openssl-devel
40 pam-devel
41 systemd-devel
42 zlib-devel
43 end
44
45 CFLAGS += -DLDAP_DEPRECATED=1
46
47 configure_options += \
48 --localedir=%{datadir}/locale \
49 --with-cupsd-file-perm=0755 \
50 --with-log-file-perm=0600 \
51 --with-docdir=%{datadir}/%{name}/www \
52 --with-dbusdir=%{sysconfdir}/dbus-1 \
53 --enable-pie \
54 --enable-relro \
55 --enable-avahi \
56 --enable-lspp \
57 --enable-threads \
58 --enable-gnutls \
59 --enable-webif \
60 --with-xinetd=no
61
62 prepare_cmds
63 aclocal -I config-scripts
64 autoconf -I config-scripts
65 end
66
67 install
68 make install BUILDROOT=%{BUILDROOT}
69
70 # Remove sysvinit scripts
71 rm -vfr %{BUILDROOT}/etc/init.d/cups %{BUILDROOT}/etc/rc*.d
72
73 # Install default config file.
74 mkdir -pv %{BUILDROOT}/etc/cups
75 cp -vf %{DIR_APP}/conf/cupsd.conf %{BUILDROOT}/etc/cups/
76
77 # Rename systemd service files.
78 mv %{BUILDROOT}%{unitdir}/org.cups.cupsd.path \
79 %{BUILDROOT}%{unitdir}/cups.path
80 mv %{BUILDROOT}%{unitdir}/org.cups.cupsd.service \
81 %{BUILDROOT}%{unitdir}/cups.service
82 mv %{BUILDROOT}%{unitdir}/org.cups.cupsd.socket \
83 %{BUILDROOT}%{unitdir}/cups.socket
84 mv %{BUILDROOT}%{unitdir}/org.cups.cups-lpd.socket \
85 %{BUILDROOT}%{unitdir}/cups-lpd.socket
86 mv %{BUILDROOT}%{unitdir}/org.cups.cups-lpd@.service \
87 %{BUILDROOT}%{unitdir}/cups-lpd@.service
88
89 sed -i -e "s,org.cups.cupsd,cups,g" \
90 %{BUILDROOT}%{unitdir}/cups.service
91
92 # Fix permissions
93 chown root:lp %{BUILDROOT}%{localstatedir}/run/cups
94 chmod 0755 %{BUILDROOT}%{localstatedir}/run/cups
95 end
96 end
97
98 packages
99 package %{name}
100 recomends
101 ghostscript
102 end
103
104 script postin
105 systemctl daemon-reload >/dev/null 2>&1 || :
106 systemctl --no-reload enable cups.path >/dev/null 2>&1 || :
107 end
108
109 script preun
110 systemctl --no-reload disable cups.path >/dev/null 2>&1 || :
111 systemctl --no-reload disable cupsd.socket >/dev/null 2>&1 || :
112 systemctl --no-reload disable cupsd.service >/dev/null 2>&1 || :
113 systemctl stop cupsd.socket >/dev/null 2>&1 || :
114 systemctl stop cupsd.service >/dev/null 2>&1 || :
115 systemctl stop cups.path >/dev/null 2>&1 || :
116 end
117
118 script postun
119 systemctl daemon-reload >/dev/null 2>&1 || :
120 end
121
122 script postup
123 systemctl daemon-reload >/dev/null 2>&1 || :
124 systemctl try-restart cups.path >/dev/null 2>&1 || :
125 systemctl try-restart cupsd.service >/dev/null 2>&1 || :
126 end
127 end
128
129 package %{name}-client
130 summary = CUPS printing system - client programs.
131 description
132 CUPS printing system provides a portable printing layer for
133 UNIX operating systems. This package contains command-line client
134 programs.
135 end
136
137 requires
138 %{name}-libs = %{thisver}
139 end
140
141 provides += \
142 lpr
143
144 files
145 %{sbindir}/lpc.cups
146 %{bindir}/cancel*
147 %{bindir}/lp*
148 %{mandir}/man1/lp*.1.gz
149 %{mandir}/man1/cancel-cups.1.gz
150 %{mandir}/man8/lpc-cups.8.gz
151 end
152 end
153
154 package %{name}-lpd
155 summary = CUPS printing system - lpd emulation.
156 description
157 CUPS printing system provides a portable printing layer for
158 UNIX operating systems. This is the package that provides standard
159 lpd emulation.
160 end
161
162 requires
163 %{name} = %{thisver}
164 %{name}-libs = %{thisver}
165 end
166
167 provides += \
168 lpd
169
170 files
171 %{unitdir}/cups-lpd.socket
172 %{unitdir}/cups-lpd@.service
173 %{prefix}/lib/daemon/cups-lpd
174 %{mandir}/man8/cups-lpd.8.gz
175 end
176
177 script postin
178 systemctl daemon-reload >/dev/null 2>&1 || :
179 end
180
181 script preun
182 systemctl --no-reload disable cups-lpd.socket >/dev/null 2>&1 || :
183 systemctl --no-reload disable cups-lpd@.service >/dev/null 2>&1 || :
184 systemctl stop cups-lpd.socket >/dev/null 2>&1 || :
185 systemctl stop cups-lpd@.service >/dev/null 2>&1 || :
186 end
187
188 script postun
189 systemctl daemon-reload >/dev/null 2>&1 || :
190 end
191
192 script postup
193 systemctl daemon-reload >/dev/null 2>&1 || :
194 systemctl try-restart cups-lpd@.service >/dev/null 2>&1 || :
195 end
196 end
197
198 package %{name}-devel
199 template DEVEL
200
201 requires += %{name}-libs=%{thisver}
202 end
203
204 package %{name}-libs
205 template LIBS
206 end
207
208 package %{name}-ipptool
209 summary = CUPS printing system - tool for performing IPP requests.
210 description
211 Sends IPP requests to the specified URI and tests and/or displays \
212 the results.
213 end
214
215 requires
216 %{name}-libs = %{thisver}
217 end
218
219 files
220 %{bindir}/ipptool
221 %{bindir}/ippfind
222 %{datadir}/cups/ipptool
223 %{datadir}/cups/ipptool/*
224 %{mandir}/man1/ipptool.1.gz
225 %{mandir}/man5/ipptoolfile.5.gz
226 end
227 end
228
229 package %{name}-debuginfo
230 template DEBUGINFO
231 end
232 end