Blob Blame History Raw
# unpack_module_source():
# we check if we should build a given package
# if so, we unpack sources and add entry to config
# %1 - source number
# %2 - subpackage name

%define unpack_module_source() \
%if %{with %2}\
%setup -q -D -T -a %1 -n kadu/modules\
sed "s#^module_%2=.#module_%2=m#" -i ../.config\
%endif\
%nil

# module_files():
# both internal and external modules have at least their .so, .ui,
# .desc and .qm files. In order to simplify things, this macro 
# creates a simple %files section
# %1 - module/subpackage name
# if parameter -d is specified, module owns its data dir
# 
# all modules have very similar directory and files structure, so
# this macro is created to make it possible to simplify %files
# sections. All modules have .desc and .so files, a lot of them
# has configurations and translations or data dirs. We use 
# respectively -c, -t and -d parameters to know which files
# a module owns.

%define module_files(d,c,t) \
%{_libdir}/kadu/modules/%1.so\
%{_datadir}/kadu/modules/%1.desc\
%if "%{-c}" \
%{_datadir}/kadu/modules/configuration/%1.ui\
%endif\
%if "%{-t}" \
%{_datadir}/kadu/modules/translations/%{1}*.qm\
%endif\
%if "%{-d}" \
%{_datadir}/kadu/modules/data/%1\
%endif\
%nil

# kadu.spec
# table to make it possible to find out quickly which
# subpackage has which source's number
# LAST NUMBER: 133
# 116 agent
# 101 amarok_mediaplayer
# 102 ao_sound
# 103 audacious_mediaplayer
# 104 dcopexport
# 117 falf_mediaplayer
# 105 filedesc
# 121 filtering
# 122 firewall
# 106 led_notify
# 118 mail
# 107 mediaplayer
# 108 miastoplusa_sms
# 119 mime_tex
# 120 mx610_notify
# 124 osdhints_notify
# 123 panelkadu
# 109 pcspeaker
# 110 profiles
# 111 screenshot
# 112 spellchecker
# 113 tabs
# 125 water_notify
# 114 weather
# 115 xmms_mediaplayer
# the modules above aren't all external modules
# so here's the full list
# agent
# alsa_sound
# amarok_mediaplayer
# anonymous_check
# antistring
# ao_sound
# arts_sound
# audacious_mediaplayer
# auto_hide
# cenzor
# dcopexport
# esd_sound
# filedesc
# filtering
# firewall
# led_notify
# mediaplayer
# miastoplusa_sms
# osdhints_notify
# panelkadu
# parser_extender
# pcspeaker
# powerkadu
# profiles
# screenshot
# spellchecker
# split_messages
# tabs
# water_notify
# weather
# word_fix
# xmms_mediaplayer

# whether we want to build certain subpackages or not
# by default, we want them all
%bcond_without agent
%bcond_without alsa_sound
%bcond_without amarok_mediaplayer
%bcond_without anonymous_check
%bcond_without antistring
%bcond_without ao_sound
%bcond_without arts_sound
%bcond_without audacious_mediaplayer
%bcond_without auto_hide
%bcond_without cenzor
%bcond_without dcopexport
%bcond_without esd_sound
%bcond_without falf_mediaplayer
%bcond_without filedesc
%bcond_without filtering
%bcond_without firewall
%bcond_without led_notify
%bcond_without mail
%bcond_without mediaplayer
%bcond_without mime_tex
%bcond_without miastoplusa_sms
%bcond_without mx610_notify
%bcond_without osdhints_notify
%bcond_without panelkadu
%bcond_without parser_extender
%bcond_without pcspeaker
%bcond_without powerkadu
%bcond_without profiles
%bcond_without screenshot
%bcond_without spellchecker
%bcond_without split_messages
%bcond_without tabs
%bcond_without water_notify
%bcond_without weather
%bcond_without word_fix
%bcond_without xmms_mediaplayer
%bcond_without existing_libgadu 

Name:		kadu
Version:	0.6.0
Release:	2%{?dist}
Summary:	An Gadu-Gadu client for online messaging
Summary(pl):	Klient Gadu-Gadu
Group:		Applications/Internet
License:	GPLv2
URL:		http://www.kadu.net
Source0:	http://www.kadu.net/download/stable/kadu-%{version}.tar.bz2
Source3:	kadu.desktop

# external modules:
%if %{with agent}
Source116:	http://misiek.jah.pl/assets/2008/2/8/agent-0.4.4.tar.gz
%endif
%if %{with amarok_mediaplayer}
Source101:	http://www.kadu.net/download/modules_extra/amarok_mediaplayer/amarok_mediaplayer-20071220.tar.bz2
%endif
%if %{with anonymous_check}
Source126:	http://kadu.net/~patryk/anonymous_check/anonymous_check-0.2.tar.bz2
%endif
%if %{with antistring}
Source127:	http://www.kadu.net/~dorr/moduly/kadu-antistring-0.2.tar.bz2
%endif
%if %{with ao_sound}
Source102:	http://www.kadu.net/~joi/ao_sound/packages/ao_sound-20060424.tar.bz2
%endif
%if %{with audacious_mediaplayer}
Source103:	http://www.kadu.net/download/modules_extra/audacious_mediaplayer/audacious_mediaplayer-20080224.tar.bz2
%endif
%if %{with auto_hide}
Source128:	http://www.kadu.net/~dorr/moduly/kadu-auto_hide-0.2.1.tar.bz2
%endif
%if %{with cenzor}
Source129:	http://www.kadu.net/~dorr/moduly/kadu-cenzor-0.2.tar.bz2
%endif
%if %{with dcopexport}
Source104:	http://alan.umcs.lublin.pl/~pinkworm/dcopexport/dcopexport-0.11.3-20071129-0.6.0.tar.bz2
%endif
%if %{with falf_mediaplayer}
Source117:      http://www.kadu.net/download/modules_extra/falf_mediaplayer/falf_mediaplayer-20071225.tar.bz2
%endif
%if %{with filedesc}
Source105:	http://www.kadu.net/download/modules_extra/filedesc/filedesc-20080104.tar.bz2
%endif
%if %{with filtering}
Source121:	http://www.kadu.net/download/modules_extra/filtering/filtering-20080224.tar.bz2
%endif
%if %{with firewall}
Source122:	http://www.kadu.net/~dorr/moduly/kadu-firewall-0.7.5.tar.bz2
%endif
%if %{with led_notify}
Source106:	http://kadu.net/~blysk/led_notify-0.18.tar.bz2
%endif
%if %{with mail}
Source118:      http://www.kadu.net/~weagle/mail/mail-0.3.3.tar.bz2
%endif
%if %{with mediaplayer}
Source107:	http://www.kadu.net/download/modules_extra/mediaplayer/mediaplayer-20080224.tar.bz2
%endif
%if %{with miastoplusa_sms}
Source108:	http://kadu.net/~patryk/miastoplusa_sms/miastoplusa_sms-0.6-1.3.9.tar.gz
%endif
%if %{with mime_tex}
Source119:      http://kadu.net/~patryk/mime_tex/mime_tex-1.4.1.tar.bz2
%endif
%if %{with mx610_notify}
Source120:      http://kadu.jarzebski.pl/mx610_notify-0.3.1.tar.bz2
%endif
%if %{with osdhints_notify}
Source124:	http://www.kadu.net/~dorr/moduly/kadu-osdhints_notify-0.4.0.11.tar.bz2
%endif
%if %{with panelkadu}
Source123:	http://www.ultr.pl/kadu/panelkadu-0.6-beta3.tar.gz
%endif
%if %{with parser_extender}
Source130:	http://www.kadu.net/~dorr/moduly/kadu-parser_extender-0.1.1.tar.bz2
%endif
%if %{with pcspeaker}
Source109:	http://kadu.net/~dorr/moduly/kadu-pcspeaker-0.6.0.3.tar.bz2
%endif
%if %{with powerkadu}
Source131:	http://www.kadu.net/~dorr/moduly/kadu-powerkadu-2.0.1.tar.bz2
%endif
%if %{with profiles}
Source110:	http://www.kadu.net/~dorr/moduly/kadu-profiles-0.3.1.tar.bz2
%endif
%if %{with screenshot}
Source111:	http://www.kadu.net/download/modules_extra/screenshot/screenshot-20080104.tar.bz2
%endif
%if %{with spellchecker}
Source112:	http://www.kadu.net/download/modules_extra/spellchecker/spellchecker-20071230.tar.bz2
%endif
%if %{with split_messages}
Source132:	http://www.kadu.net/~dorr/moduly/kadu-split_messages-0.2.tar.bz2
%endif
%if %{with tabs}
Source113:	http://www.kadu.net/~arvenil/tabs/download/0.6.0/kadu-tabs-1.1.5.tar.bz2
%endif
%if %{with water_notify}
Source125:	http://kadu.jarzebski.pl/water_notify-0.1.1-try2.tar.bz2
%endif
%if %{with weather}
Source114:	http://kadu.net/~blysk/weather-3.13.tar.bz2
%endif
%if %{with word_fix}
Source133:	http://www.kadu.net/~dorr/moduly/kadu-word_fix-0.3.tar.bz2
%endif
%if %{with xmms_mediaplayer}
Source115:	http://www.kadu.net/download/modules_extra/xmms_mediaplayer/xmms_mediaplayer-20080116.tar.bz2
%endif

#Patch0:		kadu-0.6.0-xmmsfix.patch
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:	libpng-devel libsndfile-devel openssl-devel
%if %fedora < 9
BuildRequires:	qt-devel
%else
BuildRequires:	qt3-devel
%endif
%if %{with existing_libgadu}
BuildRequires:	libgadu-devel
%endif
Obsoletes:	kadu-ext_info < 0.6.0-0.1.alpha1
Obsoletes:	kadu-iwait4u < 0.6.0-0.1.alpha1
Obsoletes:	kadu-wmaker_docking < 0.6.0-0.1.alpha1
Obsoletes:	kadu-advanced_userlist < 0.6.0-0.1.alpha1
Provides:	kadu-advanced_userlist = %{version}-%{release}
Obsoletes:	kadu-exec_notify < 0.6.0-0.1.alpha1
Provides:	kadu-exec_notify = %{version}-%{release}

%description
Kadu is a dynamically evolving instant messenger compatible with the Gadu-Gadu
protocol.

%description -l pl
Kadu to dynamicznie rozwijający się komunikator internetowy kompatybilny z
protokołem Gadu-Gadu.

%package devel
Summary:	Development headers for Kadu
Summary(pl):	Pliki nagłówkowe dla Kadu
Group:		Development/Libraries
Requires:	%{name} = %{version}-%{release}
Requires:	qt-devel
Requires:	pkgconfig
%description devel
Kadu is a dynamically evolving instant messenger compatible with the Gadu-Gadu
protocol.
This package contains develpoment headers for Kadu.
%description devel -l pl
Kadu to dynamicznie rozwijający się komunikator internetowy kompatybilny z
protokołem Gadu-Gadu.
Ten pakiet zawiera pliki nagłówkowe dla Kadu.

%if %{with agent}
%package agent
Summary:	Who has me on userlist
Summary(pl):	Kto ma mnie na liście użytkowników
Group:		Applications/Internet
Requires:	%{name} = %{version}-%{release}
%description agent
Agent is a module to let an user find out who has him on userlist.

%description agent -l pl
Agent to moduł umożliwiający dowiedzenie się użytkownikowi kto go ma na
swojej liście kontaktów.

%endif

%if %{with alsa_sound}
%package alsa_sound
Summary:	ALSA sound support
Summary(pl):	Obsługa dźwięku przez ALSA
Group:		Applications/Internet
Requires:	%{name} = %{version}-%{release}
BuildRequires:	alsa-lib-devel
%description alsa_sound
Alsa_sound is a module to support sound with ALSA.

%description alsa_sound -l pl
Alsa_sound to moduł umożliwiający obsługę dźwięku przez ALSA.

%endif

%if %{with amarok_mediaplayer}
%package amarok_mediaplayer
Summary:	Amarok support in mediaplayer module
Summary(pl):	Wsparcie dla Amaroka w module mediaplayer
Group:		Applications/Internet
Requires:	%{name} = %{version}-%{release}
Requires:	kadu-mediaplayer = %{version}-%{release}
Obsoletes:	kadu-amarok < 0.6.0-0.1.alpha1
Provides:	kadu-amarok = %{version}-%{release}
BuildRequires:	kdelibs3-devel
%description amarok_mediaplayer
Amarok_mediaplayer is a module to put title of current song from Amarok in
your status.

%description amarok_mediaplayer -l pl
Amarok_mediaplayer to moduł umożliwiający umieszczenie tytułu aktualnie
słuchanej piosenki w Amaroku w opisie.

%endif

%if %{with anonymous_check}
%package anonymous_check
Summary:        Automatic lookup of an interlocutor in public directory
Summary(pl):    Automatyczne wyszukiwanie nieznajomych w katalogu
Group:          Applications/Internet
Requires:       %{name} = %{version}-%{release}

%description anonymous_check
Anonymous_check is a module to automatic lookup who is an interlocutor
when (s)he starts talking to you.

%description anonymous_check -l pl
Anonymous_check to moduł, która automatycznie sprawdza dane w publicznym
katalogu nieznajomego, gdy ten zagada.

%endif

%if %{with antistring}
%package antistring
Summary:        Protection against chain letters
Summary(pl):    Ochrona przed łańcuszkami
Group:          Applications/Internet
Requires:       %{name} = %{version}-%{release}

%description antistring
Antistring is a module to protect an user against chain letters.

%description antistring -l pl
Antistring to moduł służący do ochrony przed łańcuszkami.

%endif

%if %{with ao_sound}
%package ao_sound
Summary:	AO library sound module
Summary(pl):	Moduł obsługujący dźwięk przy pomocy libao
Group:		Applications/Internet
Requires:	%{name} = %{version}-%{release}
BuildRequires:	libao-devel
%description ao_sound
Ao_sound is a module to support sound using libao.

%description ao_sound -l pl
Ao_sound to moduł umożliwiający obsługę dźwięku przy użyciu libao.

%endif

%if %{with arts_sound}
%package arts_sound
Summary:	ARts sound support
Summary(pl):	Obsługa dźwięku przez aRts
Group:		Applications/Internet
Requires:	%{name} = %{version}-%{release}
BuildRequires:	arts-devel

%description arts_sound
Alsa_sound is a module to support sound with aRts.

%description arts_sound -l pl
Alsa_sound to moduł umożliwiający obsługę dźwięku przez aRts.

%endif

%if %{with audacious_mediaplayer}
%package audacious_mediaplayer
Summary:	Audacious support in mediaplayer module
Summary(pl):	Wsparcie dla Audacious w module mediaplayer
Group:		Applications/Internet
BuildRequires:	audacious-devel dbus-glib-devel
Requires:	%{name} = %{version}-%{release}
Requires:	kadu-mediaplayer = %{version}-%{release}

%description audacious_mediaplayer
Audacious_mediaplayer is a module to put title of current song from 
Audacious in your status.

%description audacious_mediaplayer -l pl
Audacious_mediaplayer to moduł umożliwiający umieszczenie tytułu aktualnie
słuchanej piosenki w Audacious w opisie.

%endif

%if %{with auto_hide}
%package auto_hide
Summary:        Auto hide Kadu window
Summary(pl):    Automatyczne ukrywanie okna Kadu
Group:          Applications/Internet
Requires:       %{name} = %{version}-%{release}

%description auto_hide
Auto hide Kadu window.

%description auto_hide -l pl
Automatyczne ukrywanie okna kadu.

%endif

%if %{with cenzor}
%package cenzor
Summary:        Censor
Summary(pl):    Cenzor
Group:          Applications/Internet
Requires:       %{name} = %{version}-%{release}

%description cenzor
Censor.

%description cenzor -l pl
Cenzor.

%endif

%if %{with dcopexport}
%package dcopexport
Summary:	Export some functions via DCOP
Summary(pl):	Eksport kilku funkcji poprzez DCOP
Group:		Applications/Internet
Requires:	%{name} = %{version}-%{release}
BuildRequires:	kdelibs3-devel
%description dcopexport
Dcopexport is a module to export some Kadu functions using DCOP, e.g.
it allows you to use gg://xxx links.

%description dcopexport -l pl
Dcopexport to moduł eksportujący część funkcji Kadu poprzez DCOP, m. in.
umożliwia obsługę linków typu gg://xxx.

%endif

%if %{with esd_sound}
%package esd_sound
Summary:	ESD sound support
Summary(pl):	Obsługa dźwięku przez ESD
Group:		Applications/Internet
Requires:	%{name} = %{version}-%{release}
BuildRequires:	esound-devel
%description esd_sound
Alsa_sound is a module to support sound with ESD.

%description esd_sound -l pl
Alsa_sound to moduł umożliwiający obsługę dźwięku przez ESD.

%endif

%if %{with falf_mediaplayer}
%package falf_mediaplayer
Summary:	FALF support in mediaplayer module
Summary(pl):	Wsparcie dla FALF w module mediaplayer
Group:          Applications/Internet
Requires:       %{name} = %{version}-%{release}
%description falf_mediaplayer
Falf_mediaplayer is a module to put title of current song from
FALF in your status

%description falf_mediaplayer -l pl
Falf_mediaplayer to moduł umożliwiający umieszczenie tytułu aktualnie
słuchanej piosenki w FALF w opisie.

%endif

%if %{with filedesc}
%package filedesc
Summary:	Get status from file
Summary(pl):	Pobieranie opisów z pliku
Group:		Applications/Internet
Requires:	%{name} = %{version}-%{release}
%description filedesc
Filedesc is a module to get your status text from a given file.

%description filedesc -l pl
Filedesc to moduł umożliwiający pobieranie tekstu opisu z pliku.

%endif

%if %{with filtering}
%package filtering
Summary:	User list filtering
Summary(pl):	Filtrowanie listy kontaktów
Group:		Applications/Internet
Requires:	%{name} = %{version}-%{release}
%description filtering
Filtering is a module to filter visible contacts in user list.

%description filtering -l pl
Filtering to moduł umożliwiający filtrowanie widocznych
kontaktów na liście.

%endif

%if %{with firewall}
%package firewall
Summary:	Protection against unwanted chats
Summary(pl):	Ochrona przed niechcianymi rozmowami
Group:          Applications/Internet
Requires:       %{name} = %{version}-%{release}
%description firewall
Firewall is a module to ask a simple question to unknown
interlocutor.

%description firewall -l pl
Firwall to moduł zadający proste, zdefiniowane pytanie
nieznajomym rozmówcom.

%endif

%if %{with led_notify}
%package led_notify
Summary:	Notification by Scroll Lock LED
Summary(pl):	Powiadamianie diodą Scroll Lock
Group:		Applications/Internet
Requires:	%{name} = %{version}-%{release}
%description led_notify
Led_notify is a module to notify user of some events using Scroll Lock
LED.


%description led_notify -l pl
Led_notify to moduł umożliwiający powiadamianie użytkownika o pewnych
zdarzenia przy użyciu diody Scroll Lock.

%endif

%if %{with mail}
%package mail
Summary:	Mail checking module
Summary(pl):	Moduł do sprawdzania poczty
Group:          Applications/Internet
Requires:       %{name} = %{version}-%{release}
%description mail
Mail is a module to check whether there are new mails.

%description mail -l pl
Mail to moduł do sprawdzania czy są nowe maile.

%endif

%if %{with mediaplayer}
%package mediaplayer
Summary:	Put a current song name in status
Summary(pl):	Wstawianie tytułu słuchanej piosenki w opisie
Group:		Applications/Internet
Requires:	%{name} = %{version}-%{release}
%description mediaplayer
Mediaplayer is a module to put title of current song in status.

%description mediaplayer -l pl
Mediaplayer to moduł umożliwiający umieszczenie tytułu obecnie słuchanej
piosenki w opisie.

%endif

%if %{with miastoplusa_sms}
%package miastoplusa_sms
Summary:	Miasto Plusa SMS gateway support
Summary(pl):	Obsługa bramki SMS Miasto Plusa
Group:		Applications/Internet
Requires:	%{name} = %{version}-%{release}
BuildRequires:	curl-devel
%description miastoplusa_sms
Miastoplusa_sms is a module to support Miasto Plusa SMS Gateway.

%description miastoplusa_sms -l pl
Miastoplusa_sms to moduł umożliwiający obsługę bramki SMS-owej "Miasto
Plusa".

%endif

%if %{with mime_tex}
%package mime_tex
Summary:	TeX formulas support
Summary(pl):	Obsługa formuł matematycznych TeX
Group:          Applications/Internet
Requires:       %{name} = %{version}-%{release}
%description mime_tex
Mime_tex is a module to edit TeX mathematic formulas in chat window.

%description mime_tex -l pl
Mime_tex to moduł umożliwiający edycję formuł matematycznych TeX
w oknie rozmowy.

%endif

%if %{with mx610_notify}
%package mx610_notify
Summary:	Notify with LED on Logitech MX610 mouse
Summary(pl):	Powiadamianie diodami LED w myszce Logitech MX610
Group:          Applications/Internet
Requires:       %{name} = %{version}-%{release}
%description mx610_notify
Mx610_notify is a module to notify user of some events using LED
on Logitech MX610 mouse.

%description mx610_notify -l pl
Mx610_notify to moduł umożliwiający powiadamianie użytkownika
o pewnych zdarzeniach przy pomocy diod LED myszki Logitech MX610.

%endif

%if %{with osdhints_notify}
%package osdhints_notify
Summary:	Notification by OSD-like hints
Summary(pl):	Powiadamanie o zdarzeniach przy pomocy dymków typu OSD
Group:          Applications/Internet
Requires:       %{name} = %{version}-%{release}
%description osdhints_notify
Osdhints_notify is a module to notify users about some events
with OSD-like hints.

%description osdhints_notify -l pl
Osdhints_notify to moduł umożliwiający powiadamianie użytkownika
o pewnych zdarzeniach przy pomocy dymków typu OSD.

%endif


%if %{with panelkadu}
%package panelkadu
Summary:	Makes a panel from Kadu main window
Summary(pl):	Zamienia Kadu w panel na skraju ekranu
Group:          Applications/Internet
Requires:       %{name} = %{version}-%{release}
%description panelkadu
Panelkadu is a module to make a panel from Kadu main window.

%description panelkadu -l pl
Panelkadu to moduł zamieniający kadu w panel na skraju ekranu.

%endif


%if %{with parser_extender}
%package parser_extender
Summary:        Extends Kadu Parser
Summary(pl):    Rozszerza możliwości parsera Kadu
Group:          Applications/Internet
Requires:       %{name} = %{version}-%{release}

%description parser_extender
Extends Kadu Parser.

%description parser_extender -l pl
Rozszerza możliwość parsera Kadu.

%endif

%if %{with pcspeaker}
%package pcspeaker
Summary:	Notify by PC Speaker
Summary(pl):	Powiadamianie przy pomocy PC Speakera
Group:		Applications/Internet
Requires:	%{name} = %{version}-%{release}
%description pcspeaker
Pcspeaker is a module to notify user of some events using PC Speaker.


%description pcspeaker -l pl
Pcspeaker to moduł umożliwiający powiadamianie użytkownika o pewnych
zdarzeniach przy pomocy PC Speakera.

%endif

%if %{with powerkadu}
%package powerkadu
Summary:        PowerKadu
Summary(pl):    PowerKadu
Group:          Applications/Internet
Requires:       %{name} = %{version}-%{release}
Requires:	kadu-anonymous_check = %{version}-%{release}
Requires:	kadu-antistring = %{version}-%{release}
Requires:	kadu-auto_hide = %{version}-%{release}
Requires:	kadu-cenzor = %{version}-%{release}
Requires:	kadu-parser_extender = %{version}-%{release}
Requires:	kadu-split_messages = %{version}-%{release}
Requires:	kadu-word_fix = %{version}-%{release}

%description powerkadu
PowerKadu is a metapackage which contains modules known from the "old"
powerkadu.

%description powerkadu -l pl
PowerKadu to teraz metapakiet, który zawiera moduły znane ze "starego"
powerkadu.

%endif

%if %{with profiles}
%package profiles
Summary:	Profiles support
Summary(pl):	Obsługa profili
Group:		Applications/Internet
Requires:	%{name} = %{version}-%{release}
%description profiles
Profiles is a module to quick and comfortable support of multiple
profiles.

%description profiles -l pl
Profiles to moduł umożliwiający szybką i wygodnę obsługę wielu
profili.

%endif

%if %{with screenshot}
%package screenshot
Summary:	Make a screenshot and send it
Summary(pl):	Tworzenie zrzutu ekranu i wysłanie go
Group:		Applications/Internet
Requires:	%{name} = %{version}-%{release}
%description screenshot
Screenshot is a module to select a part of the screen and send an
image with its content.

%description screenshot -l pl
Screenshot to moduł umożliwiający zaznaczenie części ekranu
i wysłania obrazka z jego zawartością.

%endif

%if %{with spellchecker}
%package spellchecker
Summary:	Spellchecking in chat window
Summary(pl):	Sprawdzanie pisowni w oknie rozmowy
Group:		Applications/Internet
Requires:	%{name} = %{version}-%{release}
BuildRequires:	aspell-devel
%description spellchecker
Spellchecker is a module to check spelling in chat window.

%description spellchecker -l pl
Spellchecker to moduł umożliwiający sprawdzanie pisowni w oknie
rozmowy.

%endif

%if %{with split_messages}
%package split_messages
Summary:        Split too long messages
Summary(pl):    Dzielenie zbyt długich wiadomości
Group:          Applications/Internet
Requires:       %{name} = %{version}-%{release}

%description split_messages
Split_messages is a module to split a message to smaller parts
if it's too long.

%description split_messages -l pl
Split_messages to moduł dzielący wiadomość na mniejsze części,
jeśli jest za długa.

%endif

%if %{with tabs}
%package tabs
Summary:	Tabbed chat dialog
Summary(pl):	Okno rozmowy z zakładkami
Group:		Applications/Internet
Requires:	%{name} = %{version}-%{release}
%description tabs
Tabs is a module to add a feature to use one window to talk with all
people and use cards to switch them.

%description tabs -l pl
Tabs to moduł dodający możliwość prowadzenia rozmów w jednym oknie,
w którym pomiędzy poszczególnymi rozmówcami przełącza się przy pomocy
zakładek.

%endif

%if %{with water_notify}
%package water_notify
Summary:	Notifications by Water Compiz plugin
Summary(pl):	Powiadomienia kroplami wody w Compiz
Group:          Applications/Internet
Requires:       %{name} = %{version}-%{release}
BuildRequires:	dbus-devel
%description water_notify
Water_notify is a module to notify user about some events with
Water Compiz plugin.

%description water_notify -l pl
Water_notify to moduł umożliwiający powiadamianie użytkownika
o pewnych zdarzeniach przy użyciu wtyczki Woda z Compiza.

%endif


%if %{with weather}
%package weather
Summary:	Weather checking
Summary(pl):	Sprawdzanie pogody
Group:		Applications/Internet
Requires:	%{name} = %{version}-%{release}
%description weather
Weather is a module to check weather forecast for a few nearest days.
It also allows to check weather for people in contact list and any other
city that is available.

%description weather -l pl
Moduł pobiera i wyświetla informacje pogodowe oraz prognozę na następne
dni. Umożliwia wyświetlenie pogody dla wybranego kontaktu na liście
kontaktów oraz dla dowolnego miasta, dla którego dostępna jest prognoza.

%endif

%if %{with word_fix}
%package word_fix
Summary:        Automatic word replacement
Summary(pl):    Automatyczna zamiana słów
Group:          Applications/Internet
Requires:       %{name} = %{version}-%{release}

%description word_fix
Automatic word replacement

%description word_fix -l pl
Automatyczna zamiana słów

%endif

%if %{with xmms_mediaplayer}
%package xmms_mediaplayer
Summary:	Xmms support in mediaplayer module
Summary(pl):	Wsparcie dla Xmms w module mediaplayer
Group:		Applications/Internet
BuildRequires:	xmms-devel
Requires:	%{name} = %{version}-%{release}
Requires:	kadu-mediaplayer = %{version}-%{release}
Obsoletes:	kadu-xmms < 0.6.0-0.1.alpha1
Provides:	kadu-xmms = %{version}-%{release}
%description xmms_mediaplayer
Xmms_mediaplayer is a module to put title of current song from xmms in
your status.

%description xmms_mediaplayer -l pl
Xmms_mediaplayer to moduł umożliwiający umieszczenie tytułu aktualnie
słuchanej piosenki w xmms w opisie.

%endif


%prep
%setup -q -n kadu
#%setup -q -D -T -a 101 -a 102 -a 103 -a 104 -a 105 -a 106 -a 107 -a 108 -a 109 -n kadu/modules
%unpack_module_source 101 amarok_mediaplayer
%unpack_module_source 102 ao_sound
%unpack_module_source 103 audacious_mediaplayer
%unpack_module_source 104 dcopexport
%unpack_module_source 105 filedesc
%unpack_module_source 106 led_notify
%unpack_module_source 107 mediaplayer
%unpack_module_source 108 miastoplusa_sms
%unpack_module_source 109 pcspeaker
%unpack_module_source 110 profiles
%unpack_module_source 111 screenshot
%unpack_module_source 112 spellchecker
%unpack_module_source 113 tabs
%unpack_module_source 114 weather
%unpack_module_source 115 xmms_mediaplayer
%unpack_module_source 116 agent
%unpack_module_source 117 falf_mediaplayer
%unpack_module_source 118 mail
%unpack_module_source 119 mime_tex
%unpack_module_source 120 mx610_notify
%unpack_module_source 121 filtering
%unpack_module_source 122 firewall
%unpack_module_source 123 panelkadu
%unpack_module_source 124 osdhints_notify
%unpack_module_source 125 water_notify
%unpack_module_source 126 anonymous_check
%unpack_module_source 127 antistring
%unpack_module_source 128 auto_hide
%unpack_module_source 129 cenzor
%unpack_module_source 130 parser_extender
%unpack_module_source 131 powerkadu
%unpack_module_source 132 split_messages
%unpack_module_source 133 word_fix
%setup -q -D -T -n kadu

%if %{with alsa_sound}
sed "s#^module_alsa_sound=.#module_alsa_sound=m#" -i .config
%endif
%if %{with arts_sound}
sed "s#^module_arts_sound=.#module_arts_sound=m#" -i .config
%endif
%if %{with esd_sound}
sed "s#^module_esd_sound=.#module_esd_sound=m#" -i .config
%endif 

%if %{with audacious_mediaplayer}
pushd modules/audacious_mediaplayer
sed 's#cflags`#cflags` -I/usr/include/dbus-1.0#' -i spec
# above adds missing include path
popd
%endif

%build
%if %{with existing_libgadu}
%define _with_existing_libgadu 1
%endif
unset QTDIR || : ; . /etc/profile.d/qt.sh
%configure --enable-debug \
	%{?_with_existing_libgadu:--with-existing-libgadu}
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
rm -rf $RPM_BUILD_ROOT%{_datadir}/applnk/Internet/kadu.desktop
##==change permissions of .so files:
for binary in `find $RPM_BUILD_ROOT -type f -name *.so`; do
chmod a+x $binary
done
#+
desktop-file-install --vendor fedora				\
	--dir ${RPM_BUILD_ROOT}%{_datadir}/applications		\
	%{SOURCE3}
%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)

%doc COPYING
%{_bindir}/kadu
%{_bindir}/kadu-mozilla
%{_datadir}/applications/fedora-kadu.desktop
%dir %{_libdir}/kadu
%dir %{_libdir}/kadu/modules
%dir %{_libdir}/kadu/modules/bin
%dir %{_datadir}/kadu
%{_datadir}/kadu/syntax
%{_datadir}/kadu/AUTHORS
%{_datadir}/kadu/ChangeLog
%{_datadir}/kadu/COPYING
%{_datadir}/kadu/HISTORY
%{_datadir}/kadu/README
%{_datadir}/kadu/THANKS
%{_datadir}/kadu/configuration
%dir %{_datadir}/kadu/modules
%dir %{_datadir}/kadu/modules/configuration
%dir %{_datadir}/kadu/modules/data
%dir %{_datadir}/kadu/modules/translations
%dir %{_datadir}/kadu/themes
%dir %{_datadir}/kadu/themes/emoticons
%{_datadir}/kadu/themes/emoticons/penguins
%dir %{_datadir}/kadu/themes/icons
%{_datadir}/kadu/themes/icons/default
%dir %{_datadir}/kadu/themes/sounds
%{_datadir}/kadu/themes/sounds/default
%{_datadir}/kadu/translations
%{_datadir}/pixmaps/kadu*.png
%{_datadir}/kadu/modules/docking.desc
%{_datadir}/kadu/modules/configuration/docking.ui
%{_datadir}/kadu/modules/translations/docking_*.qm
%{_datadir}/kadu/modules/notify.desc
%{_datadir}/kadu/modules/configuration/notify.ui
%{_datadir}/kadu/modules/translations/notify_*.qm
%{_datadir}/kadu/modules/sound.desc
%{_datadir}/kadu/modules/configuration/sound.ui
%{_datadir}/kadu/modules/translations/sound_*.qm
%if ! %{with existing_libgadu}
%exclude %{_libdir}/libgadu*a
%endif

# internal modules:
%module_files account_management -t
%module_files advanced_userlist -ct
%module_files autoaway -ct
%module_files autoresponder -ct
%module_files config_wizard -td
%module_files dcc -ct
%module_files default_sms -ct
%module_files dsp_sound -ct
%module_files encryption -ct
%module_files exec_notify -t
%module_files ext_sound -ct
%module_files hints -ct
%module_files history -ct
%module_files migration -t
%module_files sms -ct
%module_files voice -ct
%module_files window_notify -t
%module_files x11_docking -t

%files devel
%defattr(-,root,root,-)
%{_bindir}/kadu-config
%{_includedir}/kadu
%if ! %{with existing_libgadu}
%exclude %{_includedir}/libgadu.h
%exclude %{_libdir}/pkgconfig/libgadu.pc
%exclude %{_libdir}/libgadu*
%endif
# external modules:

%if %{with agent}
%files agent
%defattr(-, root, root, -)
%module_files agent -t
%endif

%if %{with amarok_mediaplayer}
%files amarok_mediaplayer
%defattr(-, root, root, -)
%module_files amarok_mediaplayer
%endif

%if %{with alsa_sound}
%files alsa_sound
%defattr(-, root, root, -)
%module_files alsa_sound -ct
%endif

%if %{with anonymous_check}
%files anonymous_check
%defattr(-, root, root, -)
%module_files anonymous_check -ct
%endif

%if %{with antistring}
%files antistring
%defattr(-, root, root, -)
%module_files antistring -cdt
%endif

%if %{with ao_sound}
%files ao_sound
%defattr(-, root, root, -)
%module_files ao_sound
%endif

%if %{with arts_sound}
%files arts_sound
%defattr(-, root, root, -)
%module_files arts_sound
%{_libdir}/kadu/modules/bin/arts_sound
%endif

%if %{with audacious_mediaplayer}
%files audacious_mediaplayer
%defattr(-, root, root, -)
%module_files audacious_mediaplayer
%endif

%if %{with auto_hide}
%files auto_hide
%defattr(-, root, root, -)
%module_files auto_hide -ct
%endif

%if %{with cenzor}
%files cenzor
%defattr(-, root, root, -)
%module_files cenzor -cdt
%endif

%if %{with dcopexport}
%files dcopexport
%defattr(-, root, root, -)
%module_files dcopexport -dt
%{_libdir}/kadu/modules/bin/dcopexport
%endif

%if %{with esd_sound}
%files esd_sound
%defattr(-, root, root, -)
%module_files esd_sound
%endif

%if %{with falf_mediaplayer}
%files falf_mediaplayer
%defattr(-, root, root, -)
%module_files falf_mediaplayer
%endif

%if %{with filedesc}
%files filedesc
%defattr(-, root, root, -)
%module_files filedesc -cdt
%endif

%if %{with filtering}
%files filtering
%defattr(-, root, root, -)
%module_files filtering -cdt
%endif

%if %{with firewall}
%files firewall
%defattr(-, root, root, -)
%module_files firewall -ct
%endif

%if %{with led_notify}
%files led_notify
%defattr(-, root, root, -)
%module_files led_notify -ct
%endif

%if %{with mail}
%files mail
%defattr(-, root, root, -)
%module_files mail -ct
%endif

%if %{with mediaplayer}
%files mediaplayer
%defattr(-, root, root, -)
%module_files mediaplayer -cdt
%endif

%if %{with miastoplusa_sms}
%files miastoplusa_sms
%defattr(-, root, root, -)
%module_files miastoplusa_sms -cdt
%endif

%if %{with mime_tex}
%files mime_tex
%defattr(-, root, root, -)
%module_files mime_tex -cdt
%{_libdir}/kadu/modules/bin/mime_tex
%endif

%if %{with mx610_notify}
%files mx610_notify
%defattr(-, root, root, -)
%module_files mx610_notify -ct
%endif

%if %{with osdhints_notify}
%files osdhints_notify
%defattr(-, root, root, -)
%module_files osdhints_notify -cdt
%endif

%if %{with panelkadu}
%files panelkadu
%defattr(-, root, root, -)
%module_files panelkadu -ct
%endif

%if %{with parser_extender}
%files parser_extender
%defattr(-, root, root, -)
%module_files parser_extender -ct
%endif

%if %{with pcspeaker}
%files pcspeaker
%defattr(-, root, root, -)
%module_files pcspeaker -ct
%endif

%if %{with powerkadu}
%files powerkadu
%defattr(-, root, root, -)
%module_files powerkadu -dt
%endif

%if %{with profiles}
%files profiles
%defattr(-, root, root, -)
%module_files profiles -t
%endif

%if %{with screenshot}
%files screenshot
%defattr(-, root, root, -)
%module_files screenshot -cdt
%endif

%if %{with spellchecker}
%files spellchecker
%defattr(-, root, root, -)
%module_files spellchecker -cdt
%endif

%if %{with split_messages}
%files split_messages
%defattr(-, root, root, -)
%module_files split_messages -ct
%endif

%if %{with tabs}
%files tabs
%defattr(-, root, root, -)
%module_files tabs -ct
%endif

%if %{with water_notify}
%files water_notify
%defattr(-, root, root, -)
%module_files water_notify -ct
%endif


%if %{with weather}
%files weather
%defattr(-, root, root, -)
%module_files weather -cdt
%endif

%if %{with word_fix}
%files word_fix
%defattr(-, root, root, -)
%module_files word_fix -cdt
%endif

%if %{with xmms_mediaplayer}
%files xmms_mediaplayer
%defattr(-, root, root, -)
%module_files xmms_mediaplayer
%endif


%changelog
* Wed Mar 12 2008 Michał Bentkowski <mr.ecik at gmail.com> - 0.6.0-2
- Fix bugs 436574 (f8) and 436575 (f7)
- New versions of tabs and osdhints_notify
- New modules: anonymous_check antistring auto_hide cenzor parser_extender 
powerkadu split_messages word_fix


* Thu Feb 28 2008 Michał Bentkowski <mr.ecik at gmail.com> - 0.6.0-1
- Stable
- New versions of osdhints_notify, audacious_mediaplayer, filtering,
mediaplayer and panelkadu

* Mon Feb 18 2008 Michał Bentkowski <mr.ecik at gmail.com> - 0.6.0-0.12.rc4
- rc4
- Add modules: water_notify, osdhints_notify, panelkadu

* Wed Feb 13 2008 Michał Bentkowski <mr.ecik at gmail.com> - 0.6.0-0.11.rc3
- rc3
- New firewall module
- New versions of some modules

* Sun Feb 03 2008 Michał Bentkowski <mr.ecik at gmail.com> - 0.6.0-0.10.rc2.try2
- rc2-try2

* Sun Feb 03 2008 Michał Bentkowski <mr.ecik at gmail.com> - 0.6.0-0.9.rc2
- rc2
- New versions of led_notify, weather, pcspeaker, mime_tex, tabs,
mediaplayer, xmms_mediaplayer and mail modules
- Add filtering module
- Get rid of xmmsfix patch
- Fix mail module

* Sun Jan 13 2008 Michał Bentkowski <mr.ecik at gmail.com> - 0.6.0-0.8.rc1
- rc1
- New mx610_notify, falf_mediaplayer, mail and mime_tex modules.
- New versions of some modules

* Sun Jan 06 2008 Michał Bentkowski <mr.ecik at gmail.com> - 0.6.0-0.7.beta2
- Fix bug 427679 (add forgotten %% symbol in one place)

* Sun Jan 06 2008 Michał Bentkowski <mr.ecik at gmail.com> - 0.6.0-0.6.beta2
- Now forgot to include that one source changed its name

* Sun Jan 06 2008 Michał Bentkowski <mr.ecik at gmail.com> - 0.6.0-0.5.beta2
- Forgot to upload some sources...

* Sat Jan 05 2008 Michał Bentkowski <mr.ecik at gmail.com> - 0.6.0-0.4.beta2
- beta2
- Add kadu-agent

* Fri Dec 21 2007 Michał Bentkowski <mr.ecik at gmail.com> - 0.6.0-0.3.beta1
- 0.6.0-beta1
- Changes of almost everything, spec file has been completely rewritten
- Get rid of stupid macros including %%{_kadudir} and %%{_modtrans}
- Make it possible to build any subpackages whoever wants, no need to build
all
- Add Polish descriptions to all subpackages and change English ones
- There are too many changes to list all of them ;-)
- Hope it's now much more readable and user-friendly

* Wed Dec 19 2007 Michał Bentkowski <mr.ecik at gmail.com> - 0.6.0-0.2.alpha2
- 0.6.0-alpha2
- New pcspeaker module
- New version of miastoplusa_sms, profiles, dcopexport

* Sat Dec 01 2007 Michał Bentkowski <mr.ecik at gmail.com> - 0.6.0-0.1.alpha1
- 0.6.0-alpha1
- remove xmms, amarok, mail, extinfo, iwait4u, powerkadu, advanced_userlist, osdhints_notify, screenshot, firewall, filedesc
- update spellchecker, weather, dcopexport, miastopolusa_sms, tabs, led_notify, filtering
- get rid of tabs patch
- add filedesc, spellchecker and firewall patches
- exec_notify is now built-in

* Fri Aug 24 2007 Michał Bentkowski <mr.ecik at gmail.com> - 0.5.0-4
- Fix desktop file

* Fri Aug 24 2007 Michał Bentkowski <mr.ecik at gmail.com> - 0.5.0-3
- BuildID rebuild
- Fix License tag

* Thu Apr 05 2007 Michał Bentkowski <mr.ecik at gmail.com> - 0.5.0-2
- Own %%{_datadir}/kadu/modules/data (BZ: 233855)

* Tue Jan 02 2007 Michał Bentkowski <mr.ecik at gmail.com> - 0.5.0-1
- Finally a stable release

* Mon Dec 25 2006 Michał Bentkowski <mr.ecik at gmail.com> - 0.5.0-0.21.rc2
- Bump to RC2

* Mon Nov 14 2006 Michał Bentkowski <mr.ecik at gmail.com> - 0.5.0-0.20.rc1
- Add advanced_userlist, osdhints_notify and screenshot modules

* Wed Nov 08 2006 Michał Bentkowski <mr.ecik at gmail.com> - 0.5.0-0.19.rc1
- Update kadu to RC1
- Update ext_info module to 2.0beta9
- Update powerkadu module to 20061026
- Update xmms module to 1.32
- Update amarok module to 1.19
- Amarok builds on all architectures again
- Add tabs patch

* Thu Nov 02 2006 Michał Bentkowski <mr.ecik at gmail.com> - 0.5.0-0.18.20060915svn
- Come back to 20060915

* Sun Oct 29 2006 Michał Bentkowski <mr.ecik at gmail.com> - 0.5.0-0.17.20061029svn
- Disabling kadu-amarok on ppc arch

* Sun Oct 29 2006 Michał Bentkowski <mr.ecik at gmail.com> - 0.5.0-0.16.20061029svn
- Bump cvs snapshot to 20061029

* Tue Oct 10 2006 Michał Bentkowski <mr.ecik at gmail.com> - 0.5.0-0.15.20060915svn
- Another fix to not rebuilding kadu-amarok

* Sat Oct 07 2006 Michał Bentkowski <mr.ecik at gmail.com> - 0.5.0-0.14.20060915svn
- It really shoud work now

* Sat Oct 07 2006 Michał Bentkowski <mr.ecik at gmail.com> - 0.5.0-0.13.20060915svn
- It should work now

* Fri Oct 06 2006 Michał Bentkowski <mr.ecik at gmail.com> - 0.5.0-0.12.20060915svn
- Yet another fix...

* Fri Oct 06 2006 Michał Bentkowski <mr.ecik at gmail.com> - 0.5.0-0.11.20060915svn
- Rpmbuild build error workaround.

* Fri Oct 06 2006 Michał Bentkowski <mr.ecik at gmail.com> - 0.5.0-0.10.20060915svn
- Not rebuilding kadu-amarok on some archs

* Sat Sep 16 2006 Michał Bentkowski <mr.ecik at gmail.com> - 0.5.0-0.9.20060915svn
- Update upstream to 20060915
- Move themes to external spec file
- Link to existing libgadu

* Mon Sep 04 2006 Michał Bentkowski <mr.ecik at gmail.com> - 0.5.0-0.8.20006808svn
- FC6 rebuild

* Fri Aug 11 2006 Michał Bentkowski <mr.ecik at gmail.com> - 0.5.0-0.7.20060808svn
- Update upstream to 20060808
- Add firewall and wmaker_docking modules

* Sun Jul 30 2006 Michał Bentkowski <mr.ecik at gmail.com> - 0.5.0-0.6.20060730svn
- Update upstream do 20060730, with fixed x64 bugs
- Add mail module and emots theme

* Thu Jul 27 2006 Michał Bentkowski <mr.ecik at gmail.com> - 0.5.0-0.5.20060727svn
- Delete qt dependency
- Exclude libgadu.a file
- Add powerkadu, filtering and profiles modules

* Mon Jul 24 2006 Michał Bentkowski <mr.ecik at gmail.com> - 0.5.0-0.4.20060716svn
- Add COPYING file to doc

* Sun Jul 23 2006 Michał Bentkowski <mr.ecik at gmail.com> - 0.5.0-0.3.20060716svn
- Yet another fix permissions of .so files

* Sun Jul 23 2006 Michał Bentkowski <mr.ecik at gmail.com> - 0.5.0-0.2.20060716svn
- Fix Source0 address
- Fix permissions of .so files
- Remove libsndfile require
- Fix some descriptions of subpackages
- Add --enable-debug and --disable-dependency-tracking options to configure

* Thu Jul 20 2006 Michał Bentkowski <mr.ecik at gmail.com> - 0.5.0-0.1.20060716svn
- Another first release