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