]> git.pld-linux.org Git - packages/distcc.git/blob - distcc.spec
- up to 3.4
[packages/distcc.git] / distcc.spec
1 # TODO
2 # - unpackaged files:
3 #   /etc/distcc/clients.allow
4 #   /etc/distcc/commands.allow.sh
5 #   /etc/distcc/hosts
6 #
7 # Conditional build:
8 %bcond_with     gnome   # build without gnome(monitor) support
9
10 Summary:        Program to distribute compilation of C or C++
11 Summary(pl.UTF-8):      Program do rozdzielania kompilacji programów w C lub C++
12 Name:           distcc
13 Version:        3.4
14 Release:        1
15 License:        GPL
16 Group:          Development/Languages
17 Source0:        https://github.com/distcc/distcc/archive/v%{version}/%{name}-%{version}.tar.gz
18 # Source0-md5:  00523fd05f4cd9dd968e4e0ec09d774d
19 Source1:        %{name}.inetd
20 Source2:        %{name}.init
21 Source3:        %{name}.sh
22 Source4:        %{name}.csh
23 Source5:        %{name}.config
24 Source6:        %{name}.logrotate
25 Patch0:         %{name}-user.patch
26 URL:            http://www.distcc.org/
27 BuildRequires:  autoconf >= 2.53
28 BuildRequires:  automake
29 %{?with_gnome:BuildRequires:    libgnomeui-devel >= 2.0}
30 BuildRequires:  pkgconfig
31 BuildRequires:  popt-devel
32 BuildRequires:  python3-devel
33 BuildRequires:  python3-devel-tools
34 BuildRequires:  rpm-pythonprov
35 BuildRequires:  rpmbuild(macros) >= 1.268
36 BuildRequires:  sed >= 4.0
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 %description
40 distcc is a program to distribute compilation of C or C++ code across
41 several machines on a network. distcc should always generate the same
42 results as a local compile, is simple to install and use, and is often
43 two or more times faster than a local compile.
44
45 %description -l pl.UTF-8
46 distcc jest programem pozwalającym na dystrybucję kompilacji C lub C++
47 na kilka maszyn w sieci. distcc powinien zawsze generować takie same
48 rezultaty jak lokalna kompilacja, jest prosty w instalacji i użyciu
49 oraz bardzo często dwa lub więcej razy szybszy niż lokalna kompilacja.
50
51 %package common
52 Summary:        Common files for inetd and standalone versions of distcc
53 Summary(pl.UTF-8):      Pliki wspólne dla wersji inetd i standalone distcc
54 Group:          Daemons
55 Requires(postun):       /usr/sbin/groupdel
56 Requires(postun):       /usr/sbin/userdel
57 Requires(pre):  /bin/id
58 Requires(pre):  /usr/bin/getgid
59 Requires(pre):  /usr/sbin/groupadd
60 Requires(pre):  /usr/sbin/useradd
61 Suggests:       gcc
62 Suggests:       gcc-c++
63 Provides:       group(distcc)
64 Provides:       user(distcc)
65 Obsoletes:      distcc < 2.1-2
66
67 %description common
68 distcc is a program to distribute compilation of C or C++ code across
69 several machines on a network. distcc should always generate the same
70 results as a local compile, is simple to install and use, and is often
71 two or more times faster than a local compile.
72
73 %description common -l pl.UTF-8
74 distcc jest programem pozwalającym na dystrybucję kompilacji C lub C++
75 na kilka maszyn w sieci. distcc powinien zawsze generować takie same
76 rezultaty jak lokalna kompilacja, jest prosty w instalacji i użyciu
77 oraz bardzo często dwa lub więcej razy szybszy niż lokalna kompilacja.
78
79 %package include_server
80 Summary:        Conservative approximation of include dependencies for C/C++
81 Summary(pl.UTF-8):      Konserwatywna aproksymacja zależności nagłówków dla C/C++
82 Group:          Daemons
83
84 %description include_server
85 include_server.py starts an include server process. This process
86 answers queries from distcc(1) clients about what files to include in
87 C/C++ compilations. The include_server.py command itself terminates as
88 soon as the include server has been spawned.
89
90 %description include_server -l pl.UTF-8
91 include_server.py wywołuje proces serwera include. Proces ten
92 odpowiada na zapytania klientów distcc(1) dotyczące plików, które
93 należy dołączyć na etapie kompilacji C/C++. Polecenie
94 incluse_server.py kończy działanie jak tylko wywołany zostanie proces
95 serwera.
96
97 %package inetd
98 Summary:        inetd configs for distcc
99 Summary(pl.UTF-8):      Pliki konfiguracyjne do użycia distcc poprzez inetd
100 Group:          Daemons
101 Requires:       %{name}-common = %{version}-%{release}
102 Requires:       rc-inetd
103 Obsoletes:      distcc < 2.1-2
104
105 %description inetd
106 distcc configs for running from inetd.
107
108 %description inetd -l pl.UTF-8
109 Pliki konfiguracyjna distcc do startowania demona poprzez inetd.
110
111 %package standalone
112 Summary:        Standalone daemon configs for distcc
113 Summary(pl.UTF-8):      Pliki konfiguracyjne do startowania distcc w trybie standalone
114 Group:          Daemons
115 Requires(post,preun):   /sbin/chkconfig
116 Requires:       %{name}-common = %{version}-%{release}
117 Requires:       rc-scripts
118 Obsoletes:      distcc < 2.1-2
119
120 %description standalone
121 distcc configs for running as a standalone daemon.
122
123 %description standalone -l pl.UTF-8
124 Pliki konfiguracyjne distcc do startowania demona w trybie standalone.
125
126 %package monitor
127 Summary:        Monitor for distcc
128 Summary(pl.UTF-8):      Monitor dla distcc
129 Group:          Applications
130
131 %description monitor
132 Monitor for distcc.
133
134 %description monitor -l pl.UTF-8
135 Monitor dla distcc.
136
137 %package monitor-gnome
138 Summary:        GTK+ monitor for distcc
139 Summary(pl.UTF-8):      Monitor GTK+ dla distcc
140 Group:          X11/Applications
141
142 %description monitor-gnome
143 GTK+ monitor for distcc.
144
145 %description monitor-gnome -l pl.UTF-8
146 Monitor GTK+ dla distcc.
147
148 %prep
149 %setup -q
150 %patch0 -p1
151
152 %{__sed} -i -e 's#PKGDATADIR#"%{_pixmapsdir}"#g' src/mon-gnome.c
153
154
155 %{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+python3(\s|$),#!%{__python3}\1,' \
156         update-distcc-symlinks.py
157
158 %build
159 %{__aclocal}
160 %{__autoconf}
161 %{__autoheader}
162 %configure \
163         --enable-rfc2553 \
164         %{?with_gnome:--with-gnome}
165
166 %{__make} \
167         WERROR_CFLAGS="" \
168         CC="%{__cc}"
169
170 %install
171 rm -rf $RPM_BUILD_ROOT
172 install -d $RPM_BUILD_ROOT/etc/{sysconfig/rc-inetd,rc.d/init.d,profile.d,logrotate.d} \
173         $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},%{_var}/log}
174
175 %{__make} install \
176         DESTDIR=$RPM_BUILD_ROOT
177
178 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/distccd
179 install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/distcc
180 cp -p %{SOURCE3} %{SOURCE4} $RPM_BUILD_ROOT/etc/profile.d
181 %{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/default/distcc
182 cp -p %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/distccd
183 cp -p %{SOURCE6} $RPM_BUILD_ROOT/etc/logrotate.d/distccd
184
185 #%py3_comp $RPM_BUILD_ROOT%{py_sitedir}
186
187 %if %{with gnome}
188 mv $RPM_BUILD_ROOT%{_datadir}/%{name}/distccmon-gnome.desktop \
189         $RPM_BUILD_ROOT%{_desktopdir}
190 mv $RPM_BUILD_ROOT%{_datadir}/%{name}/distccmon-gnome-icon.png \
191         $RPM_BUILD_ROOT%{_pixmapsdir}
192 %endif
193
194 touch $RPM_BUILD_ROOT%{_var}/log/distcc
195 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
196
197 %clean
198 rm -rf $RPM_BUILD_ROOT
199
200 %pre common
201 %groupadd -P %{name}-common -g 137 distcc
202 %useradd -P %{name}-common -u 137 -d /tmp -s /bin/false -c "distcc user" -g distcc distcc
203
204 %postun common
205 if [ "$1" = "0" ]; then
206         %userremove distcc
207         %groupremove distcc
208 fi
209
210 %post inetd
211 %service -q rc-inetd reload
212
213 %postun inetd
214 if [ "$1" = 0 ]; then
215         %service -q rc-inetd reload
216 fi
217
218 %post standalone
219 /sbin/chkconfig --add distcc
220 %service distcc restart "distcc daemon"
221
222 %preun standalone
223 if [ "$1" = "0" ]; then
224         %service distcc stop
225         /sbin/chkconfig --del distcc
226 fi
227
228 %files
229 %defattr(644,root,root,755)
230 %doc AUTHORS NEWS README *.txt
231 %attr(755,root,root) %{_bindir}/%{name}
232 %attr(755,root,root) %{_bindir}/lsdistcc
233 %attr(755,root,root) %{_bindir}/pump
234 %attr(755,root,root) %{_sbindir}/update-distcc-symlinks
235 %{_mandir}/man?/%{name}.*
236 %{_mandir}/man1/pump.1*
237 %{_mandir}/man1/lsdistcc.1*
238 %attr(755,root,root) /etc/profile.d/*sh
239
240 %files common
241 %defattr(644,root,root,755)
242 %dir /etc/distcc
243 /etc/distcc/clients.allow
244 /etc/distcc/commands.allow.sh
245 /etc/distcc/hosts
246 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/distccd
247 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/distccd
248 %attr(755,root,root) %{_bindir}/%{name}d
249 %{_mandir}/man?/%{name}d.*
250 %attr(640,distcc,root) %ghost %{_var}/log/distcc
251
252 %files include_server
253 %defattr(644,root,root,755)
254 %{py3_sitedir}/include_server
255 %{py3_sitedir}/include_server-*.egg-info
256 %{_mandir}/man1/include_server.1*
257
258 %files inetd
259 %defattr(644,root,root,755)
260 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/distccd
261
262 %files standalone
263 %defattr(644,root,root,755)
264 %attr(754,root,root) /etc/rc.d/init.d/distcc
265
266 %files monitor
267 %defattr(644,root,root,755)
268 %attr(755,root,root) %{_bindir}/distccmon-text
269 %{_mandir}/man1/distccmon-text.*
270
271 %if %{with gnome}
272 %files monitor-gnome
273 %defattr(644,root,root,755)
274 %attr(755,root,root) %{_bindir}/distccmon-gnome
275 %{_desktopdir}/*.desktop
276 %{_pixmapsdir}/*.png
277 %endif
This page took 0.082766 seconds and 3 git commands to generate.