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