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