]> git.pld-linux.org Git - packages/distcc.git/blob - distcc.spec
- rel 0.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 Group:          Development/Languages
9 Version:        2.17
10 Release:        0.2
11 License:        GPL
12 Source0:        http://distcc.samba.org/ftp/distcc/%{name}-%{version}.tar.bz2
13 # Source0-md5:  8ac5c032cde68c525afe9f53eae5cbf7
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}-dcc_dis.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 Obsoletes:      distcc < 2.1-2
69
70 %description inetd
71 distcc configs for running from inetd.
72
73 %description inetd -l pl
74 Pliki konfiguracyjna distcc do startowania demona poprzez inetd.
75
76 %package standalone
77 Summary:        Standalone daemon configs for distcc
78 Summary(pl):    Pliki konfiguracyjne do startowania distcc w trybie standalone
79 Group:          Daemons
80 PreReq:         %{name}-common = %{version}-%{release}
81 PreReq:         rc-scripts
82 Requires(post,preun):   /sbin/chkconfig
83 Obsoletes:      distcc < 2.1-2
84
85 %description standalone
86 distcc configs for running as a standalone daemon.
87
88 %description standalone -l pl
89 Pliki konfiguracyjne distcc do startowania demona w trybie
90 standalone.
91
92 %package monitor
93 Summary:        Monitor for distcc
94 Summary(pl):    Monitor dla distcc
95 Group:          Applications
96
97 %description monitor
98 Monitor for distcc.
99
100 %description monitor -l pl
101 Monitor dla distcc.
102
103 %package monitor-gnome
104 Summary:        gtk monitor for distcc
105 Summary(pl):    Monitor gtk dla distcc
106 Group:          X11/Applications
107
108 %description monitor-gnome
109 gtk monitor for distcc.
110
111 %description monitor-gnome -l pl
112 Monitor gtk dla distcc.
113
114 %prep
115 %setup -q
116 %patch0 -p1
117 %patch1 -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 %post inetd
158 if [ -f /var/lock/subsys/rc-inetd ]; then
159         /etc/rc.d/init.d/rc-inetd reload 1>&2
160 else
161         echo "Type \"/etc/rc.d/init.d/rc-inetd start\" to start inet server" 1>&2
162 fi
163
164 %postun inetd
165 if [ -f /var/lock/subsys/rc-inetd ]; then
166         /etc/rc.d/init.d/rc-inetd reload
167 fi
168
169 %post standalone
170 /sbin/chkconfig --add distcc
171 if [ -f /var/lock/subsys/distccd ]; then
172         /etc/rc.d/init.d/distcc restart 1>&2
173 else
174         echo "Run \"/etc/rc.d/init.d/distcc start\" to start distcc daemon."
175 fi
176
177 %preun standalone
178 if [ "$1" = "0" ]; then
179         if [ -f /var/lock/subsys/distccd ]; then
180                 /etc/rc.d/init.d/distcc stop 1>&2
181         fi
182         /sbin/chkconfig --del distcc
183 fi
184
185 %files
186 %defattr(644,root,root,755)
187 %doc AUTHORS NEWS README *.txt
188 %attr(755,root,root) %{_bindir}/%{name}
189 %{_mandir}/man?/%{name}.*
190 %attr(755,root,root) /etc/profile.d/*sh
191
192 %files common
193 %defattr(644,root,root,755)
194 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/distccd
195 %attr(640,root,root) /etc/logrotate.d/distccd
196 %attr(755,root,root) %{_bindir}/%{name}d
197 %{_mandir}/man?/%{name}d.*
198 %attr(640,nobody,root) %ghost %{_var}/log/distcc
199
200 %files inetd
201 %defattr(644,root,root,755)
202 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/rc-inetd/distccd
203
204 %files standalone
205 %defattr(644,root,root,755)
206 %attr(754,root,root) /etc/rc.d/init.d/distcc
207
208 %files monitor
209 %defattr(644,root,root,755)
210 %attr(755,root,root) %{_bindir}/distccmon-text
211 %{_mandir}/man1/distccmon-text.*
212
213 %if %{with gnome}
214 %files monitor-gnome
215 %defattr(644,root,root,755)
216 %attr(755,root,root) %{_bindir}/distccmon-gnome
217 %{_desktopdir}/*.desktop
218 %{_pixmapsdir}/*.png
219 %endif
This page took 0.086034 seconds and 3 git commands to generate.