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