]> git.pld-linux.org Git - packages/distcc.git/blob - distcc.spec
- rel 0.2; use distcc user instead of nobody
[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.2
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 "`/bin/id -u distcc 2>/dev/null`" ]; then
161         if [ "`/bin/id -u distcc`" != "137" ]; then
162                 echo "Error: user distcc doesn't have uid=137. Correct this before installing distccd server." 1>&2
163                 exit 1
164         fi
165 else
166         /usr/sbin/useradd -u 137 -d /tmp -s /bin/false -c "distcc user" -g distcc distcc 1>&2
167 fi
168
169 %post inetd
170 if [ -f /var/lock/subsys/rc-inetd ]; then
171         /etc/rc.d/init.d/rc-inetd reload 1>&2
172 else
173         echo "Type \"/etc/rc.d/init.d/rc-inetd start\" to start inet server" 1>&2
174 fi
175
176 %postun inetd
177 if [ -f /var/lock/subsys/rc-inetd ]; then
178         /etc/rc.d/init.d/rc-inetd reload
179 fi
180 if [ "$1" = "0" ]; then
181         %userremove distcc
182 fi
183
184 %pre standalone
185 if [ -n "`/bin/id -u distcc 2>/dev/null`" ]; then
186         if [ "`/bin/id -u distcc`" != "137" ]; then
187                 echo "Error: user distcc doesn't have uid=137. Correct this before installing distccd server." 1>&2
188                 exit 1
189         fi
190 else
191         /usr/sbin/useradd -u 137 -d /tmp -s /bin/false -c "distccd user" -g distcc distcc 1>&2
192 fi
193
194 %post standalone
195 /sbin/chkconfig --add distcc
196 if [ -f /var/lock/subsys/distccd ]; then
197         /etc/rc.d/init.d/distcc restart 1>&2
198 else
199         echo "Run \"/etc/rc.d/init.d/distcc start\" to start distcc daemon."
200 fi
201
202 %postun standalone
203 if [ "$1" = "0" ]; then
204         %userremove distcc
205 fi
206
207 %preun standalone
208 if [ "$1" = "0" ]; then
209         if [ -f /var/lock/subsys/distccd ]; then
210                 /etc/rc.d/init.d/distcc stop 1>&2
211         fi
212         /sbin/chkconfig --del distcc
213 fi
214
215 %files
216 %defattr(644,root,root,755)
217 %doc AUTHORS NEWS README *.txt
218 %attr(755,root,root) %{_bindir}/%{name}
219 %{_mandir}/man?/%{name}.*
220 %attr(755,root,root) /etc/profile.d/*sh
221
222 %files common
223 %defattr(644,root,root,755)
224 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/distccd
225 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/logrotate.d/distccd
226 %attr(755,root,root) %{_bindir}/%{name}d
227 %{_mandir}/man?/%{name}d.*
228 %attr(640,distcc,root) %ghost %{_var}/log/distcc
229
230 %files inetd
231 %defattr(644,root,root,755)
232 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/rc-inetd/distccd
233
234 %files standalone
235 %defattr(644,root,root,755)
236 %attr(754,root,root) /etc/rc.d/init.d/distcc
237
238 %files monitor
239 %defattr(644,root,root,755)
240 %attr(755,root,root) %{_bindir}/distccmon-text
241 %{_mandir}/man1/distccmon-text.*
242
243 %if %{with gnome}
244 %files monitor-gnome
245 %defattr(644,root,root,755)
246 %attr(755,root,root) %{_bindir}/distccmon-gnome
247 %{_desktopdir}/*.desktop
248 %{_pixmapsdir}/*.png
249 %endif
This page took 0.061007 seconds and 3 git commands to generate.