]> git.pld-linux.org Git - packages/distcc.git/blob - distcc.spec
- build gtk based distccmon-gnome
[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_without  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.1
14 Release:        1
15 License:        GPL
16 Group:          Development/Languages
17 Source0:        http://distcc.googlecode.com/files/%{name}-%{version}.tar.bz2
18 # Source0-md5:  a1a9d3853df7133669fffec2a9aab9f3
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:  python-devel
33 BuildRequires:  python-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 %build
155 %{__aclocal}
156 %{__autoconf}
157 %{__autoheader}
158 %configure \
159         --enable-rfc2553 \
160         %{?with_gnome:--with-gnome}
161
162 %{__make} \
163         WERROR_CFLAGS="" \
164         CC="%{__cc}"
165
166 %install
167 rm -rf $RPM_BUILD_ROOT
168 install -d $RPM_BUILD_ROOT/etc/{sysconfig/rc-inetd,rc.d/init.d,profile.d,logrotate.d} \
169         $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},%{_var}/log}
170
171 %{__make} install \
172         DESTDIR=$RPM_BUILD_ROOT
173
174 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/distccd
175 install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/distcc
176 cp -p %{SOURCE3} %{SOURCE4} $RPM_BUILD_ROOT/etc/profile.d
177 %{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/default/distcc
178 cp -p %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/distccd
179 cp -p %{SOURCE6} $RPM_BUILD_ROOT/etc/logrotate.d/distccd
180
181 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
182 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
183 %py_postclean
184
185 %if %{with gnome}
186 mv $RPM_BUILD_ROOT%{_datadir}/%{name}/distccmon-gnome.desktop \
187         $RPM_BUILD_ROOT%{_desktopdir}
188 mv $RPM_BUILD_ROOT%{_datadir}/%{name}/distccmon-gnome-icon.png \
189         $RPM_BUILD_ROOT%{_pixmapsdir}
190 %endif
191
192 touch $RPM_BUILD_ROOT%{_var}/log/distcc
193 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
194
195 %clean
196 rm -rf $RPM_BUILD_ROOT
197
198 %pre common
199 %groupadd -P %{name}-common -g 137 distcc
200 %useradd -P %{name}-common -u 137 -d /tmp -s /bin/false -c "distcc user" -g distcc distcc
201
202 %postun common
203 if [ "$1" = "0" ]; then
204         %userremove distcc
205         %groupremove distcc
206 fi
207
208 %post inetd
209 %service -q rc-inetd reload
210
211 %postun inetd
212 if [ "$1" = 0 ]; then
213         %service -q rc-inetd reload
214 fi
215
216 %post standalone
217 /sbin/chkconfig --add distcc
218 %service distcc restart "distcc daemon"
219
220 %preun standalone
221 if [ "$1" = "0" ]; then
222         %service distcc stop
223         /sbin/chkconfig --del distcc
224 fi
225
226 %files
227 %defattr(644,root,root,755)
228 %doc AUTHORS NEWS README *.txt
229 %attr(755,root,root) %{_bindir}/%{name}
230 %attr(755,root,root) %{_bindir}/lsdistcc
231 %attr(755,root,root) %{_bindir}/pump
232 %{_mandir}/man?/%{name}.*
233 %{_mandir}/man1/pump.1*
234 %attr(755,root,root) /etc/profile.d/*sh
235
236 %files common
237 %defattr(644,root,root,755)
238 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/distccd
239 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/distccd
240 %attr(755,root,root) %{_bindir}/%{name}d
241 %{_mandir}/man?/%{name}d.*
242 %attr(640,distcc,root) %ghost %{_var}/log/distcc
243
244 %files include_server
245 %defattr(644,root,root,755)
246 %{py_sitedir}/include_server
247 %if "%{py_ver}" > "2.4"
248 %{py_sitedir}/include_server-*.egg-info
249 %endif
250 %{_mandir}/man1/include_server.1*
251
252 %files inetd
253 %defattr(644,root,root,755)
254 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/distccd
255
256 %files standalone
257 %defattr(644,root,root,755)
258 %attr(754,root,root) /etc/rc.d/init.d/distcc
259
260 %files monitor
261 %defattr(644,root,root,755)
262 %attr(755,root,root) %{_bindir}/distccmon-text
263 %{_mandir}/man1/distccmon-text.*
264
265 %if %{with gnome}
266 %files monitor-gnome
267 %defattr(644,root,root,755)
268 %attr(755,root,root) %{_bindir}/distccmon-gnome
269 %{_desktopdir}/*.desktop
270 %{_pixmapsdir}/*.png
271 %endif
This page took 0.095964 seconds and 3 git commands to generate.