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