]> git.pld-linux.org Git - packages/distcc.git/blob - distcc.spec
- up to 2.18.1
[packages/distcc.git] / distcc.spec
1 #
2 # Conditional build:
3 %bcond_without  gnome   # build without gnome(monitor) support
4 #
5 Summary:        Program to distribute compilation of C or C++
6 Summary(pl):    Program do rozdzielania kompilacji programów w C lub C++
7 Name:           distcc
8 Group:          Development/Languages
9 Version:        2.18.1
10 Release:        1
11 License:        GPL
12 Source0:        http://distcc.samba.org/ftp/distcc/%{name}-%{version}.tar.bz2
13 # Source0-md5:  c3ab3eec92d525f5f818fe7e00ed2227
14 # Source0-size: 339939
15 Source1:        %{name}.inetd
16 Source2:        %{name}.init
17 Source3:        %{name}.sh
18 Source4:        %{name}.csh
19 Source5:        %{name}.config
20 Source6:        %{name}.logrotate
21 Patch0:         %{name}-user.patch
22 URL:            http://distcc.samba.org/
23 BuildRequires:  autoconf >= 2.53
24 BuildRequires:  automake
25 %{?with_gnome:BuildRequires:    libgnomeui-devel >= 2.0}
26 BuildRequires:  pkgconfig
27 BuildRequires:  popt-devel
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30 %description
31 distcc is a program to distribute compilation of C or C++ code across
32 several machines on a network. distcc should always generate the same
33 results as a local compile, is simple to install and use, and is often
34 two or more times faster than a local compile.
35
36 %description -l pl
37 distcc jest programem pozwalaj±cym na dystrybucjê kompilacji C lub C++
38 na kilka maszyn w sieci. distcc powinien zawsze generowaæ takie same
39 rezultaty jak lokalna kompilacja, jest prosty w instalacji i u¿yciu
40 oraz bardzo czêsto dwa lub wiêcej razy szybszy ni¿ lokalna kompilacja.
41
42 %package common
43 Summary:        Common files for inetd and standalone versions of distcc
44 Summary(pl):    Pliki wspólne dla wersji inetd i standalone distcc
45 Group:          Daemons
46 Requires:       gcc
47 Requires:       gcc-c++
48 Requires(pre):  /bin/id
49 Requires(pre):  /usr/bin/getgid
50 Requires(pre):  /usr/sbin/groupadd
51 Requires(pre):  /usr/sbin/useradd
52 Requires(postun):       /usr/sbin/groupdel
53 Requires(postun):       /usr/sbin/userdel
54 Provides:       group(distcc)
55 Provides:       user(distcc)
56 Obsoletes:      distcc < 2.1-2
57
58 %description common
59 distcc is a program to distribute compilation of C or C++ code across
60 several machines on a network. distcc should always generate the same
61 results as a local compile, is simple to install and use, and is often
62 two or more times faster than a local compile.
63
64 %description common -l pl
65 distcc jest programem pozwalaj±cym na dystrybucjê kompilacji C lub C++
66 na kilka maszyn w sieci. distcc powinien zawsze generowaæ takie same
67 rezultaty jak lokalna kompilacja, jest prosty w instalacji i u¿yciu
68 oraz bardzo czêsto dwa lub wiêcej razy szybszy ni¿ lokalna kompilacja.
69
70 %package inetd
71 Summary:        inetd configs for distcc
72 Summary(pl):    Pliki konfiguracyjne do u¿ycia distcc poprzez inetd
73 Group:          Daemons
74 PreReq:         %{name}-common = %{version}-%{release}
75 PreReq:         rc-inetd
76 Obsoletes:      distcc < 2.1-2
77
78 %description inetd
79 distcc configs for running from inetd.
80
81 %description inetd -l pl
82 Pliki konfiguracyjna distcc do startowania demona poprzez inetd.
83
84 %package standalone
85 Summary:        Standalone daemon configs for distcc
86 Summary(pl):    Pliki konfiguracyjne do startowania distcc w trybie standalone
87 Group:          Daemons
88 PreReq:         %{name}-common = %{version}-%{release}
89 PreReq:         rc-scripts
90 Obsoletes:      distcc < 2.1-2
91
92 %description standalone
93 distcc configs for running as a standalone daemon.
94
95 %description standalone -l pl
96 Pliki konfiguracyjne distcc do startowania demona w trybie
97 standalone.
98
99 %package monitor
100 Summary:        Monitor for distcc
101 Summary(pl):    Monitor dla distcc
102 Group:          Applications
103
104 %description monitor
105 Monitor for distcc.
106
107 %description monitor -l pl
108 Monitor dla distcc.
109
110 %package monitor-gnome
111 Summary:        GTK+ monitor for distcc
112 Summary(pl):    Monitor GTK+ dla distcc
113 Group:          X11/Applications
114
115 %description monitor-gnome
116 GTK+ monitor for distcc.
117
118 %description monitor-gnome -l pl
119 Monitor GTK+ dla distcc.
120
121 %prep
122 %setup -q
123 %patch0 -p1
124
125 sed -i -e 's#PKGDATADIR#"%{_pixmapsdir}"#g' src/mon-gnome.c
126
127 %build
128 cp -f /usr/share/automake/config.* .
129 %{__autoconf}
130 %{__autoheader}
131 %configure \
132         --enable-rfc2553 \
133         %{?with_gnome:--with-gnome} 
134
135 %{__make}
136
137 %install
138 rm -rf $RPM_BUILD_ROOT
139 install -d $RPM_BUILD_ROOT/etc/{sysconfig/rc-inetd,rc.d/init.d,profile.d,logrotate.d} \
140         $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},%{_var}/log}
141
142 %{__make} install \
143         DESTDIR=$RPM_BUILD_ROOT
144
145 install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/distccd
146 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/distcc
147 install %{SOURCE3} %{SOURCE4} $RPM_BUILD_ROOT/etc/profile.d
148 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/distccd
149 install %{SOURCE6} $RPM_BUILD_ROOT/etc/logrotate.d/distccd
150
151 %if %{with gnome}
152 mv $RPM_BUILD_ROOT%{_datadir}/%{name}/distccmon-gnome.desktop \
153         $RPM_BUILD_ROOT%{_desktopdir}
154 mv $RPM_BUILD_ROOT%{_datadir}/%{name}/distccmon-gnome-icon.png \
155         $RPM_BUILD_ROOT%{_pixmapsdir}
156 %endif
157
158 touch $RPM_BUILD_ROOT%{_var}/log/distcc
159
160 %clean
161 rm -rf $RPM_BUILD_ROOT
162
163 %pre common
164 if [ -n "`/usr/bin/getgid distcc`" ]; then
165         if [ "`/usr/bin/getgid distcc`" != "137" ]; then
166                 echo "Error: group distcc doesn't have gid=137. Correct this before installing distccd." 1>&2
167                 exit 1
168         fi
169 else
170         /usr/sbin/groupadd -g 137 distcc 1>&2
171 fi
172 if [ -n "`/bin/id -u distcc 2>/dev/null`" ]; then
173         if [ "`/bin/id -u distcc`" != "137" ]; then
174                 echo "Error: user distcc doesn't have uid=137. Correct this before installing distccd server." 1>&2
175                 exit 1
176         fi
177 else
178         /usr/sbin/useradd -u 137 -d /tmp -s /bin/false -c "distcc user" \
179                 -g distcc distcc 1>&2
180 fi
181
182 %postun common
183 if [ "$1" = "0" ]; then
184         %userremove distcc
185         %groupremove distcc
186 fi
187
188 %post inetd
189 if [ -f /var/lock/subsys/rc-inetd ]; then
190         /etc/rc.d/init.d/rc-inetd reload 1>&2
191 else
192         echo "Type \"/etc/rc.d/init.d/rc-inetd start\" to start inet server" 1>&2
193 fi
194
195 %postun inetd
196 if [ -f /var/lock/subsys/rc-inetd ]; then
197         /etc/rc.d/init.d/rc-inetd reload
198 fi
199
200 %post standalone
201 /sbin/chkconfig --add distcc
202 if [ -f /var/lock/subsys/distccd ]; then
203         /etc/rc.d/init.d/distcc restart 1>&2
204 else
205         echo "Run \"/etc/rc.d/init.d/distcc start\" to start distcc daemon."
206 fi
207
208 %preun standalone
209 if [ "$1" = "0" ]; then
210         if [ -f /var/lock/subsys/distccd ]; then
211                 /etc/rc.d/init.d/distcc stop 1>&2
212         fi
213         /sbin/chkconfig --del distcc
214 fi
215
216 %files
217 %defattr(644,root,root,755)
218 %doc AUTHORS NEWS README *.txt
219 %attr(755,root,root) %{_bindir}/%{name}
220 %{_mandir}/man?/%{name}.*
221 %attr(755,root,root) /etc/profile.d/*sh
222
223 %files common
224 %defattr(644,root,root,755)
225 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/distccd
226 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/logrotate.d/distccd
227 %attr(755,root,root) %{_bindir}/%{name}d
228 %{_mandir}/man?/%{name}d.*
229 %attr(640,distcc,root) %ghost %{_var}/log/distcc
230
231 %files inetd
232 %defattr(644,root,root,755)
233 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/rc-inetd/distccd
234
235 %files standalone
236 %defattr(644,root,root,755)
237 %attr(754,root,root) /etc/rc.d/init.d/distcc
238
239 %files monitor
240 %defattr(644,root,root,755)
241 %attr(755,root,root) %{_bindir}/distccmon-text
242 %{_mandir}/man1/distccmon-text.*
243
244 %if %{with gnome}
245 %files monitor-gnome
246 %defattr(644,root,root,755)
247 %attr(755,root,root) %{_bindir}/distccmon-gnome
248 %{_desktopdir}/*.desktop
249 %{_pixmapsdir}/*.png
250 %endif
This page took 0.070752 seconds and 3 git commands to generate.