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