]> git.pld-linux.org Git - packages/gg.git/blob - gg.spec
0d0a8c3bb4f4c5b06a90454cf554402845bf71ba
[packages/gg.git] / gg.spec
1 #
2 # Conditional build:
3 #
4 # _without_gnome
5 # _without_gnome_applet
6 # _without_kde
7 # _without_wm_applet
8 # _without_sound
9
10 # This looks like overkill but some day we might have *everything* bconded :)
11 %{!?_without_gnome:%define _need_gnome  1}
12 %{!?_without_gnome:%define _need_esd   1}
13 %{!?_without_gnome_applet:%define       _need_gnome     1}
14 %{!?_without_gnome_applet:%define _nees_esd   1}
15 %{!?_without_kde:%define _need_arts     1}
16 %{!?_without_wm_applet:%define _need_esd        1}
17
18 Summary:        GNU Gadu - free talking
19 Summary(pl):    GNU Gadu - wolne gadanie
20 Name:           gg
21 Version:        1.0.0pre2
22 Release:        1
23 Epoch:          4
24 License:        GPL
25 Group:          Applications/Communications
26 Source0:        http://gadu.gnu.pl/%{name}-%{version}.tar.gz
27 Source1:        %{name}.png
28 Icon:           gg.xpm
29 URL:            http://gadu.gnu.pl
30 %{?_need_arts:BuildRequires:    arts-devel}
31 %if %{!?_without_sound:1}%{?_without_sound:0}
32 %{?_need_esd:BuildRequires:             esound-devel > 0.2.7}
33 %endif
34 %{?_need_gnome:BuildRequires:   gnome-libs-devel}
35 %{?_need_gnome:BuildRequires:   gnome-core-devel}
36 BuildRequires:  gtk+-devel > 1.2.8
37
38 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40 %define         _sysconfdir     /etc/X11/GNOME
41
42 %description
43 Gadu-Gadu client released on GNU/GPL.
44
45 %description -l pl
46 Klient Gadu-Gadu na licencji GNU/GPL.
47
48 %package common
49 Summary:        GNU Gadu - free talking - common files
50 Summary(pl):    GNU Gadu - wolne gadanie - wspólne pliki
51 Group:          Applications/Communications
52 Obsoletes:      gg =< 0.2.0
53
54 %description common
55 Gadu-Gadu client released on GNU/GPL.
56
57 %description common -l pl
58 Klient Gadu-Gadu na licencji GNU/GPL.
59
60 %package X11
61 Summary:        GNU Gadu - free talking
62 Summary(pl):    GNU Gadu - wolne gadanie
63 Group:          Applications/Communications
64 PreReq:         %{name}-common = %{epoch}:%{version}
65 Provides:       gg = %{epoch}:%{version}-%{release}
66
67 %description X11
68 Gadu-Gadu client released on GNU/GPL.
69
70 %description X11 -l pl
71 Klient Gadu-Gadu na licencji GNU/GPL. Wersja dla X11.
72
73 %package gnome
74 Summary:        GNU Gadu - free talking - GNOME version
75 Summary(pl):    GNU Gadu - wolne gadanie - wersja dla GNOME
76 Group:          Applications/Communications
77 PreReq:         %{name}-common = %{epoch}:%{version}
78 Provides:       gg = %{epoch}:%{version}-%{release}
79
80 %description gnome
81 Gadu-Gadu client released on GNU/GPL. GNOME version
82
83 %description gnome -l pl
84 Klient Gadu-Gadu na licencji GNU/GPL. Wersja dla GNOME.
85
86 %package gnome-applet
87 Summary:        GNU Gadu - free talking - GNOME dockable version
88 Summary(pl):    GNU Gadu - wolne gadanie - wersja dokowalna dla GNOME
89 Group:          Applications/Communications
90 PreReq:         %{name}-common = %{epoch}:%{version}
91 Provides:       gg = %{epoch}:%{version}-%{release}
92
93 %description gnome-applet
94 Gadu-Gadu client released on GNU/GPL. GNOME dockable version
95
96 %description gnome-applet -l pl
97 Klient Gadu-Gadu na licencji GNU/GPL. Wersja dokowalna dla gnome.
98
99 %package wm-applet
100 Summary:        GNU Gadu - free talking - WindowMaker dockable version
101 Summary(pl):    GNU Gadu - wolne gadanie - wersja dokowalna dla WindowMaker'a
102 Group:          Applications/Communications
103 PreReq:         %{name}-common = %{epoch}:%{version}
104 Provides:       gg = %{epoch}:%{version}-%{release}
105
106 %description wm-applet
107 Gadu-Gadu client released on GNU/GPL. WindowMaker dockable version
108
109 %description wm-applet -l pl
110 Klient Gadu-Gadu na licencji GNU/GPL. Wersja dokowalna dla
111 WindowMaker'a.
112
113 %package kde
114 Summary:        GNU Gadu - free talking - KDE version
115 Summary(pl):    GNU Gadu - wolne gadanie - wersja dla KDE
116 Group:          Applications/Communications
117 PreReq:         %{name}-common = %{epoch}:%{version}
118 Provides:       gg = %{epoch}:%{version}-%{release}
119
120 %description kde
121 Gadu-Gadu client released on GNU/GPL. KDE version
122
123 %description kde -l pl
124 Klient Gadu-Gadu na licencji GNU/GPL. Wersja dla KDE.
125
126 %prep
127 %setup -q -n %{name}-%{version}
128
129 %build
130 LDFLAGS=" -L%{_libdir} %{rpmldflags}"
131
132 %if %{!?_without_gnome_applet:1}%{?_without_gnome_applet:0}
133 %configure \
134         %{?_without_sound:--disable-esd} \
135         --enable-gnome \
136         --enable-panel
137 %{__make}
138 mv -f src/gg src/gg_applet
139 %{__make} clean
140 %endif
141
142 %if %{!?_without_gnome:1}%{?_without_gnome:0}
143 %configure \
144         %{?_without_sound:--disable-esd} \
145         --enable-gnome
146 %{__make}
147 mv -f src/gg src/gg_gnome
148 %{__make} clean
149 %endif
150
151 %if %{!?_without_wm_applet:1}%{?_without_wm_applet:0}
152 %configure \
153         %{?_without_sound:--disable-esd} \
154         --enable-dockapp
155 %{__make}
156 mv -f src/gg src/gg_wm
157 %{__make} clean
158 %endif
159
160 %if %{!?_without_kde:1}%{?_without_kde:0}
161 %configure \
162         --enable-docklet \
163         %{!?_without_sound:--enable-arts} \
164         --disable-esd
165 %{__make}
166 mv -f src/gg src/gg_kde
167 %{__make} clean
168 %endif
169
170 %configure %{?_without_sound:--disable-esd}
171 %{__make}
172
173 %install
174 rm -rf $RPM_BUILD_ROOT
175 install -d $RPM_BUILD_ROOT{%{_applnkdir}/Network/Communications,%{_pixmapsdir},%{_datadir}/applets/Network/}
176
177 %{__make} install DESTDIR=$RPM_BUILD_ROOT
178 %{!?_without_gnome_applet:install src/gg_applet $RPM_BUILD_ROOT%{_bindir}}
179 %{!?_without_gnome:install src/gg_gnome $RPM_BUILD_ROOT%{_bindir}}
180 %{!?_without_wm_applet:install src/gg_wm $RPM_BUILD_ROOT%{_bindir}}
181 %{!?_without_kde:install src/gg_kde $RPM_BUILD_ROOT%{_bindir}}
182
183 sed -e 's/xpm$/png/' src/GnuGadu.desktop \
184         > $RPM_BUILD_ROOT%{_applnkdir}/Network/Communications/GnuGadu.desktop
185 sed -e 's/xpm$/png/' -e 's/Exec=gg/Exec=gg_applet\ --activate-goad-server=gg/' \
186         src/GnuGadu.desktop > $RPM_BUILD_ROOT%{_datadir}/applets/Network/GnuGadu.desktop
187
188 install %{SOURCE1} $RPM_BUILD_ROOT%{_pixmapsdir}
189
190 install -d $RPM_BUILD_ROOT%{_sysconfdir}/CORBA/servers/
191 install src/GnuGadu.gnorba $RPM_BUILD_ROOT%{_sysconfdir}/CORBA/servers/
192
193 %clean
194 rm -rf $RPM_BUILD_ROOT
195
196 %post gnome
197 if [ ! -e /usr/X11R6/bin/gg ]; then
198         ln -sf /usr/X11R6/bin/gg_gnome /usr/X11R6/bin/gg
199 fi
200
201 %post gnome-applet
202 if [ ! -e /usr/X11R6/bin/gg ]; then
203         ln -sf /usr/X11R6/bin/gg_applet /usr/X11R6/bin/gg
204 fi
205
206 %post wm-applet
207 if [ ! -e /usr/X11R6/bin/gg ]; then
208         ln -sf /usr/X11R6/bin/gg_wm /usr/X11R6/bin/gg
209 fi
210
211 %post kde
212 if [ ! -e /usr/X11R6/bin/gg ]; then
213         ln -sf /usr/X11R6/bin/gg_kde /usr/X11R6/bin/gg
214 fi
215
216 %postun
217 if [ -L /usr/X11R6/bin/gg ]; then
218         rm -f /usr/X11R6/bin/gg
219 fi
220
221 %files common
222 %defattr(644,root,root,755)
223 %doc README ChangeLog TODO
224 %{_datadir}/gg
225 %{_pixmapsdir}/*
226
227 %files X11
228 %defattr(644,root,root,755)
229 %{_applnkdir}/Network/Communications/GnuGadu.desktop
230 %attr(755,root,root) %{_bindir}/gg
231
232 %if %{!?_without_gnome:1}%{?_without_gnome:0}
233 %files gnome
234 %defattr(644,root,root,755)
235 %attr(755,root,root) %{_bindir}/gg_gnome
236 %{_applnkdir}/Network/Communications/GnuGadu.desktop
237 %endif
238
239 %if %{!?_without_gnome_applet:1}%{?_without_gnome_applet:0}
240 %files gnome-applet
241 %defattr(644,root,root,755)
242 %attr(755,root,root) %{_bindir}/gg_applet
243 %{_datadir}/applets/Network/GnuGadu.desktop
244 %{_sysconfdir}/CORBA/servers/GnuGadu.gnorba
245 %endif
246
247 %if %{!?_without_wm_applet:1}%{?_without_wm_applet:0}
248 %files wm-applet
249 %defattr(644,root,root,755)
250 %attr(755,root,root) %{_bindir}/gg_wm
251 %{_datadir}/applets/Network/GnuGadu.desktop
252 %endif
253
254 %if %{!?_without_kde:1}%{?_without_kde:0}
255 %files kde
256 %defattr(644,root,root,755)
257 %attr(755,root,root) %{_bindir}/gg_kde
258 %{_applnkdir}/Network/Communications/GnuGadu.desktop
259 %endif
This page took 0.092134 seconds and 3 git commands to generate.