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