]>
Commit | Line | Data |
---|---|---|
ac9e77da | 1 | # |
2 | # Conditional build: | |
23795b41 | 3 | %bcond_without gnome # build without gnome(monitor) support |
5fac6119 | 4 | # |
6aad4547 | 5 | Summary: Program to distribute compilation of C or C++ |
363c8ff8 | 6 | Summary(pl.UTF-8): Program do rozdzielania kompilacji programów w C lub C++ |
6aad4547 | 7 | Name: distcc |
7449d803 | 8 | Version: 2.18.3 |
701d6c64 | 9 | Release: 3 |
6aad4547 | 10 | License: GPL |
e6318e62 | 11 | Group: Development/Languages |
cffa23f3 | 12 | Source0: http://distcc.samba.org/ftp/distcc/%{name}-%{version}.tar.bz2 |
7449d803 | 13 | # Source0-md5: 0d6b80a1efc3a3d816c4f4175f63eaa2 |
6aad4547 | 14 | Source1: %{name}.inetd |
953fcc0d | 15 | Source2: %{name}.init |
16 | Source3: %{name}.sh | |
17 | Source4: %{name}.csh | |
fc307e5b | 18 | Source5: %{name}.config |
9d35c6e8 | 19 | Source6: %{name}.logrotate |
454bf4cb | 20 | Patch0: %{name}-user.patch |
64398e83 | 21 | Patch1: %{name}-as-needed.patch |
cf3c1b61 | 22 | URL: http://distcc.samba.org/ |
4ff4770e | 23 | BuildRequires: autoconf >= 2.53 |
6e659ed6 | 24 | BuildRequires: automake |
55a0572b | 25 | %{?with_gnome:BuildRequires: libgnomeui-devel >= 2.0} |
54448e74 | 26 | BuildRequires: pkgconfig |
cf3c1b61 | 27 | BuildRequires: popt-devel |
e6318e62 | 28 | BuildRequires: rpmbuild(macros) >= 1.268 |
29c8cd62 | 29 | BuildRequires: sed >= 4.0 |
6aad4547 AM |
30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
31 | ||
32 | %description | |
33 | distcc is a program to distribute compilation of C or C++ code across | |
34 | several machines on a network. distcc should always generate the same | |
35 | results as a local compile, is simple to install and use, and is often | |
36 | two or more times faster than a local compile. | |
37 | ||
06d40241 JR |
38 | %description -l pl.UTF-8 |
39 | distcc jest programem pozwalającym na dystrybucję kompilacji C lub C++ | |
40 | na kilka maszyn w sieci. distcc powinien zawsze generować takie same | |
41 | rezultaty jak lokalna kompilacja, jest prosty w instalacji i użyciu | |
42 | oraz bardzo często dwa lub więcej razy szybszy niż lokalna kompilacja. | |
6aad4547 | 43 | |
953fcc0d | 44 | %package common |
725fa96f | 45 | Summary: Common files for inetd and standalone versions of distcc |
363c8ff8 | 46 | Summary(pl.UTF-8): Pliki wspólne dla wersji inetd i standalone distcc |
0e630aaf | 47 | Group: Daemons |
e6318e62 ER |
48 | Requires(postun): /usr/sbin/groupdel |
49 | Requires(postun): /usr/sbin/userdel | |
1f47eaf4 | 50 | Requires(pre): /bin/id |
51 | Requires(pre): /usr/bin/getgid | |
52 | Requires(pre): /usr/sbin/groupadd | |
47a5d923 | 53 | Requires(pre): /usr/sbin/useradd |
e6318e62 ER |
54 | Requires: gcc |
55 | Requires: gcc-c++ | |
1f47eaf4 | 56 | Provides: group(distcc) |
57 | Provides: user(distcc) | |
55a0572b | 58 | Obsoletes: distcc < 2.1-2 |
953fcc0d | 59 | |
953fcc0d | 60 | %description common |
61 | distcc is a program to distribute compilation of C or C++ code across | |
62 | several machines on a network. distcc should always generate the same | |
63 | results as a local compile, is simple to install and use, and is often | |
64 | two or more times faster than a local compile. | |
65 | ||
06d40241 JR |
66 | %description common -l pl.UTF-8 |
67 | distcc jest programem pozwalającym na dystrybucję kompilacji C lub C++ | |
68 | na kilka maszyn w sieci. distcc powinien zawsze generować takie same | |
69 | rezultaty jak lokalna kompilacja, jest prosty w instalacji i użyciu | |
70 | oraz bardzo często dwa lub więcej razy szybszy niż lokalna kompilacja. | |
953fcc0d | 71 | |
953fcc0d | 72 | %package inetd |
73 | Summary: inetd configs for distcc | |
363c8ff8 | 74 | Summary(pl.UTF-8): Pliki konfiguracyjne do użycia distcc poprzez inetd |
0e630aaf | 75 | Group: Daemons |
e6318e62 ER |
76 | Requires: %{name}-common = %{version}-%{release} |
77 | Requires: rc-inetd | |
55a0572b | 78 | Obsoletes: distcc < 2.1-2 |
953fcc0d | 79 | |
80 | %description inetd | |
81 | distcc configs for running from inetd. | |
82 | ||
06d40241 | 83 | %description inetd -l pl.UTF-8 |
953fcc0d | 84 | Pliki konfiguracyjna distcc do startowania demona poprzez inetd. |
85 | ||
86 | %package standalone | |
8a419537 | 87 | Summary: Standalone daemon configs for distcc |
363c8ff8 | 88 | Summary(pl.UTF-8): Pliki konfiguracyjne do startowania distcc w trybie standalone |
953fcc0d | 89 | Group: Daemons |
cf89e5cf | 90 | Requires(post,preun): /sbin/chkconfig |
e6318e62 ER |
91 | Requires: %{name}-common = %{version}-%{release} |
92 | Requires: rc-scripts | |
55a0572b | 93 | Obsoletes: distcc < 2.1-2 |
953fcc0d | 94 | |
95 | %description standalone | |
96 | distcc configs for running as a standalone daemon. | |
97 | ||
06d40241 | 98 | %description standalone -l pl.UTF-8 |
47a5d923 | 99 | Pliki konfiguracyjne distcc do startowania demona w trybie standalone. |
953fcc0d | 100 | |
51fb516c | 101 | %package monitor |
1f47eaf4 | 102 | Summary: Monitor for distcc |
363c8ff8 | 103 | Summary(pl.UTF-8): Monitor dla distcc |
1f47eaf4 | 104 | Group: Applications |
51fb516c AM |
105 | |
106 | %description monitor | |
107 | Monitor for distcc. | |
108 | ||
06d40241 | 109 | %description monitor -l pl.UTF-8 |
51fb516c AM |
110 | Monitor dla distcc. |
111 | ||
112 | %package monitor-gnome | |
1f47eaf4 | 113 | Summary: GTK+ monitor for distcc |
363c8ff8 | 114 | Summary(pl.UTF-8): Monitor GTK+ dla distcc |
1f47eaf4 | 115 | Group: X11/Applications |
51fb516c AM |
116 | |
117 | %description monitor-gnome | |
c8eab2f6 | 118 | GTK+ monitor for distcc. |
51fb516c | 119 | |
06d40241 | 120 | %description monitor-gnome -l pl.UTF-8 |
c8eab2f6 | 121 | Monitor GTK+ dla distcc. |
51fb516c | 122 | |
6aad4547 AM |
123 | %prep |
124 | %setup -q | |
fc00bbf7 | 125 | %patch0 -p1 |
64398e83 | 126 | %patch1 -p1 |
454bf4cb | 127 | |
8ec2d073 | 128 | sed -i -e 's#PKGDATADIR#"%{_pixmapsdir}"#g' src/mon-gnome.c |
6e659ed6 JB |
129 | |
130 | %build | |
131 | cp -f /usr/share/automake/config.* . | |
e3949423 | 132 | %{__autoconf} |
133 | %{__autoheader} | |
ac9e77da | 134 | %configure \ |
c5869176 | 135 | --enable-rfc2553 \ |
47a5d923 | 136 | %{?with_gnome:--with-gnome} |
ac9e77da | 137 | |
6aad4547 AM |
138 | %{__make} |
139 | ||
140 | %install | |
141 | rm -rf $RPM_BUILD_ROOT | |
9d35c6e8 | 142 | install -d $RPM_BUILD_ROOT/etc/{sysconfig/rc-inetd,rc.d/init.d,profile.d,logrotate.d} \ |
6e659ed6 | 143 | $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},%{_var}/log} |
6aad4547 | 144 | |
87073c74 PG |
145 | %{__make} install \ |
146 | DESTDIR=$RPM_BUILD_ROOT | |
953fcc0d | 147 | |
6aad4547 | 148 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/distccd |
953fcc0d | 149 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/distcc |
150 | install %{SOURCE3} %{SOURCE4} $RPM_BUILD_ROOT/etc/profile.d | |
fc3f3536 | 151 | install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/distccd |
9d35c6e8 | 152 | install %{SOURCE6} $RPM_BUILD_ROOT/etc/logrotate.d/distccd |
6aad4547 | 153 | |
5fac6119 | 154 | %if %{with gnome} |
865c00be | 155 | mv $RPM_BUILD_ROOT%{_datadir}/%{name}/distccmon-gnome.desktop \ |
55a0572b | 156 | $RPM_BUILD_ROOT%{_desktopdir} |
865c00be | 157 | mv $RPM_BUILD_ROOT%{_datadir}/%{name}/distccmon-gnome-icon.png \ |
e3949423 | 158 | $RPM_BUILD_ROOT%{_pixmapsdir} |
159 | %endif | |
160 | ||
5fac6119 | 161 | touch $RPM_BUILD_ROOT%{_var}/log/distcc |
e3949423 | 162 | |
725fa96f JB |
163 | %clean |
164 | rm -rf $RPM_BUILD_ROOT | |
165 | ||
9536ab6c | 166 | %pre common |
6e7561ad ER |
167 | %groupadd -P %{name}-common -g 137 distcc |
168 | %useradd -P %{name}-common -u 137 -d /tmp -s /bin/false -c "distcc user" -g distcc distcc | |
607bc1af | 169 | |
9536ab6c AM |
170 | %postun common |
171 | if [ "$1" = "0" ]; then | |
1f47eaf4 | 172 | %userremove distcc |
173 | %groupremove distcc | |
9536ab6c AM |
174 | fi |
175 | ||
953fcc0d | 176 | %post inetd |
e6318e62 | 177 | %service -q rc-inetd reload |
6aad4547 | 178 | |
953fcc0d | 179 | %postun inetd |
48f922ca ER |
180 | if [ "$1" = 0 ]; then |
181 | %service -q rc-inetd reload | |
182 | fi | |
6aad4547 | 183 | |
953fcc0d | 184 | %post standalone |
185 | /sbin/chkconfig --add distcc | |
e6318e62 | 186 | %service distcc restart "distcc daemon" |
953fcc0d | 187 | |
188 | %preun standalone | |
189 | if [ "$1" = "0" ]; then | |
e6318e62 | 190 | %service distcc stop |
a6d80f15 | 191 | /sbin/chkconfig --del distcc |
953fcc0d | 192 | fi |
193 | ||
51fb516c | 194 | %files |
6aad4547 | 195 | %defattr(644,root,root,755) |
e35de25d | 196 | %doc AUTHORS NEWS README *.txt |
51fb516c | 197 | %attr(755,root,root) %{_bindir}/%{name} |
5fac6119 | 198 | %{_mandir}/man?/%{name}.* |
32cbd1d6 | 199 | %attr(755,root,root) /etc/profile.d/*sh |
953fcc0d | 200 | |
51fb516c AM |
201 | %files common |
202 | %defattr(644,root,root,755) | |
47a5d923 ER |
203 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/distccd |
204 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/distccd | |
51fb516c | 205 | %attr(755,root,root) %{_bindir}/%{name}d |
5fac6119 | 206 | %{_mandir}/man?/%{name}d.* |
607bc1af | 207 | %attr(640,distcc,root) %ghost %{_var}/log/distcc |
51fb516c | 208 | |
953fcc0d | 209 | %files inetd |
5fac6119 | 210 | %defattr(644,root,root,755) |
47a5d923 | 211 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/distccd |
953fcc0d | 212 | |
213 | %files standalone | |
5fac6119 | 214 | %defattr(644,root,root,755) |
6a436b6c | 215 | %attr(754,root,root) /etc/rc.d/init.d/distcc |
51fb516c AM |
216 | |
217 | %files monitor | |
64cd2051 | 218 | %defattr(644,root,root,755) |
51fb516c | 219 | %attr(755,root,root) %{_bindir}/distccmon-text |
865c00be | 220 | %{_mandir}/man1/distccmon-text.* |
8ec2d073 | 221 | |
5fac6119 | 222 | %if %{with gnome} |
8ec2d073 | 223 | %files monitor-gnome |
55a0572b | 224 | %defattr(644,root,root,755) |
e3949423 | 225 | %attr(755,root,root) %{_bindir}/distccmon-gnome |
55a0572b JB |
226 | %{_desktopdir}/*.desktop |
227 | %{_pixmapsdir}/*.png | |
e3949423 | 228 | %endif |