]> git.pld-linux.org Git - packages/distcc.git/blob - distcc.spec
- use %useradd/%groupadd macros
[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.3
10 Release:        1
11 License:        GPL
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.202
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:       gcc
48 Requires:       gcc-c++
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(postun):       /usr/sbin/groupdel
54 Requires(postun):       /usr/sbin/userdel
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 PreReq:         %{name}-common = %{version}-%{release}
76 PreReq:         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 PreReq:         %{name}-common = %{version}-%{release}
90 PreReq:         rc-scripts
91 Requires(post,preun):   /sbin/chkconfig
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
99 standalone.
100
101 %package monitor
102 Summary:        Monitor for distcc
103 Summary(pl):    Monitor dla distcc
104 Group:          Applications
105
106 %description monitor
107 Monitor for distcc.
108
109 %description monitor -l pl
110 Monitor dla distcc.
111
112 %package monitor-gnome
113 Summary:        GTK+ monitor for distcc
114 Summary(pl):    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
121 Monitor GTK+ dla distcc.
122
123 %prep
124 %setup -q
125 %patch0 -p1
126
127 sed -i -e 's#PKGDATADIR#"%{_pixmapsdir}"#g' src/mon-gnome.c
128
129 %build
130 cp -f /usr/share/automake/config.* .
131 %{__autoconf}
132 %{__autoheader}
133 %configure \
134         --enable-rfc2553 \
135         %{?with_gnome:--with-gnome} 
136
137 %{__make}
138
139 %install
140 rm -rf $RPM_BUILD_ROOT
141 install -d $RPM_BUILD_ROOT/etc/{sysconfig/rc-inetd,rc.d/init.d,profile.d,logrotate.d} \
142         $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},%{_var}/log}
143
144 %{__make} install \
145         DESTDIR=$RPM_BUILD_ROOT
146
147 install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/distccd
148 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/distcc
149 install %{SOURCE3} %{SOURCE4} $RPM_BUILD_ROOT/etc/profile.d
150 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/distccd
151 install %{SOURCE6} $RPM_BUILD_ROOT/etc/logrotate.d/distccd
152
153 %if %{with gnome}
154 mv $RPM_BUILD_ROOT%{_datadir}/%{name}/distccmon-gnome.desktop \
155         $RPM_BUILD_ROOT%{_desktopdir}
156 mv $RPM_BUILD_ROOT%{_datadir}/%{name}/distccmon-gnome-icon.png \
157         $RPM_BUILD_ROOT%{_pixmapsdir}
158 %endif
159
160 touch $RPM_BUILD_ROOT%{_var}/log/distcc
161
162 %clean
163 rm -rf $RPM_BUILD_ROOT
164
165 %pre common
166 %groupadd -P %{name}-common -g 137 distcc
167 %useradd -P %{name}-common -u 137 -d /tmp -s /bin/false -c "distcc user" -g distcc distcc
168
169 %postun common
170 if [ "$1" = "0" ]; then
171         %userremove distcc
172         %groupremove distcc
173 fi
174
175 %post inetd
176 if [ -f /var/lock/subsys/rc-inetd ]; then
177         /etc/rc.d/init.d/rc-inetd reload 1>&2
178 else
179         echo "Type \"/etc/rc.d/init.d/rc-inetd start\" to start inet server" 1>&2
180 fi
181
182 %postun inetd
183 if [ -f /var/lock/subsys/rc-inetd ]; then
184         /etc/rc.d/init.d/rc-inetd reload
185 fi
186
187 %post standalone
188 /sbin/chkconfig --add distcc
189 if [ -f /var/lock/subsys/distccd ]; then
190         /etc/rc.d/init.d/distcc restart 1>&2
191 else
192         echo "Run \"/etc/rc.d/init.d/distcc start\" to start distcc daemon."
193 fi
194
195 %preun standalone
196 if [ "$1" = "0" ]; then
197         if [ -f /var/lock/subsys/distccd ]; then
198                 /etc/rc.d/init.d/distcc stop 1>&2
199         fi
200         /sbin/chkconfig --del distcc
201 fi
202
203 %files
204 %defattr(644,root,root,755)
205 %doc AUTHORS NEWS README *.txt
206 %attr(755,root,root) %{_bindir}/%{name}
207 %{_mandir}/man?/%{name}.*
208 %attr(755,root,root) /etc/profile.d/*sh
209
210 %files common
211 %defattr(644,root,root,755)
212 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/distccd
213 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/logrotate.d/distccd
214 %attr(755,root,root) %{_bindir}/%{name}d
215 %{_mandir}/man?/%{name}d.*
216 %attr(640,distcc,root) %ghost %{_var}/log/distcc
217
218 %files inetd
219 %defattr(644,root,root,755)
220 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/rc-inetd/distccd
221
222 %files standalone
223 %defattr(644,root,root,755)
224 %attr(754,root,root) /etc/rc.d/init.d/distcc
225
226 %files monitor
227 %defattr(644,root,root,755)
228 %attr(755,root,root) %{_bindir}/distccmon-text
229 %{_mandir}/man1/distccmon-text.*
230
231 %if %{with gnome}
232 %files monitor-gnome
233 %defattr(644,root,root,755)
234 %attr(755,root,root) %{_bindir}/distccmon-gnome
235 %{_desktopdir}/*.desktop
236 %{_pixmapsdir}/*.png
237 %endif
This page took 0.048969 seconds and 4 git commands to generate.