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