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