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