]> git.ipfire.org Git - ipfire-3.x.git/blame - cups/cups.nm
python-setuputils: Update to 40.4.3
[ipfire-3.x.git] / cups / cups.nm
CommitLineData
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 6name = cups
39cb5386 7version = 2.2.4
3d567fd8 8release = 1
c1243c0f 9
802ea3af
MT
10groups = Applications/Printing
11url = http://cups.org/software.php
12license = GPLv2+
13summary = The common UNIX printing system.
c1243c0f 14
802ea3af 15description
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
18end
19
e133a268 20source_dl = https://github.com/apple/cups/releases/download/v%{version}/
d9157db9 21sources = %{thisapp}-source.tar.gz
802ea3af
MT
22
23build
24 requires
802ea3af
MT
25 autoconf
26 automake
27 avahi-devel
28 cyrus-sasl-devel
29 gcc-c++
802ea3af 30 gnutls-devel
e133a268 31 libacl-devel
802ea3af
MT
32 libgcrypt-devel
33 libjpeg-devel
34 libpng-devel
802ea3af
MT
35 libtasn1-devel
36 libtiff-devel
e133a268 37 libusb-devel
802ea3af 38 openldap-devel
78c413ce 39 openssl-devel
802ea3af 40 pam-devel
e133a268 41 systemd-devel
802ea3af
MT
42 zlib-devel
43 end
44
e133a268
SS
45 CFLAGS += -DLDAP_DEPRECATED=1
46
802ea3af 47 configure_options += \
e133a268
SS
48 --localedir=%{datadir}/locale \
49 --with-cupsd-file-perm=0755 \
802ea3af 50 --with-log-file-perm=0600 \
e133a268
SS
51 --with-docdir=%{datadir}/%{name}/www \
52 --with-dbusdir=%{sysconfdir}/dbus-1 \
802ea3af
MT
53 --enable-pie \
54 --enable-relro \
55 --enable-avahi \
56 --enable-lspp \
57 --enable-threads \
e133a268
SS
58 --enable-gnutls \
59 --enable-webif \
60 --with-xinetd=no
802ea3af
MT
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
e133a268 73 # Install default config file.
802ea3af
MT
74 mkdir -pv %{BUILDROOT}/etc/cups
75 cp -vf %{DIR_APP}/conf/cupsd.conf %{BUILDROOT}/etc/cups/
76
e133a268
SS
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
802ea3af
MT
95 end
96end
97
802ea3af
MT
98packages
99 package %{name}
e133a268
SS
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
802ea3af 196 end
1f9bc2f0 197
802ea3af
MT
198 package %{name}-devel
199 template DEVEL
98cf9989
MT
200
201 requires += %{name}-libs=%{thisver}
802ea3af 202 end
1f9bc2f0 203
802ea3af
MT
204 package %{name}-libs
205 template LIBS
206 end
1f9bc2f0 207
e133a268
SS
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
1f9bc2f0
MT
229 package %{name}-debuginfo
230 template DEBUGINFO
231 end
802ea3af 232end