Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37569854
en ru br
Репозитории ALT
S:1.8.2-alt4
D:1.3.5-alt2.1
5.1: 1.3.9-alt0.M51.1
4.1: 1.3.6-alt1.M41.1
4.0: 1.3.5-alt3.M40.1
3.0: 1.3.2-alt3
www.altlinux.org/Changes

Группа :: Сети/Мгновенные сообщения
Пакет: licq

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

%define lIF_ver_gt() %if "%(rpmvercmp '%1' '%2')" > "0"
%define lIF_ver_gteq() %if "%(rpmvercmp '%1' '%2')" >= "0"
%define lIF_ver_lt() %if "%(rpmvercmp '%2' '%1')" > "0"
%define lIF_ver_lteq() %if "%(rpmvercmp '%2' '%1')" >= "0"
%ifndef _qt3dir
%define _qt3dir %_libdir/qt3
%endif

# define names and paths of QT/KDE packages

%define libqt libqt3
%define qtdir %_qt3dir
%define kdelibs kdelibs
%define kdedir %prefix
%define glibc_core_ver %{get_version glibc-core}

%define socks 0
%define cvs 0
%define no_some_docs 1

%define with_email 1
%define with_console 0
%define with_auto_reply 1
%define with_rms 1
%define with_qt 1
%define with_kde 1
%define with_gtk 1
%define with_osd 1
%define with_gpg 1
%define with_msn 1

# name-version-release

%define rname licq
%define ver 1.3.5
%define rlz alt2.1
%define beta %nil

%if "%beta" != "%nil"
%define ver 1.3.5
%endif
Name: %rname
Version: %ver
%if "%beta" == "%nil"
Release: %rlz
%else
Release: %rlz.%beta
%endif

# Automatically added by buildreq on Wed Jan 08 2003

BuildRequires: xorg-x11-devel freetype2-devel gcc-c++ chrpath
BuildRequires: libart_lgpl-devel libexpat-devel libjpeg-devel
BuildRequires: liblcms-devel libmng-devel
BuildRequires: libncurses-devel libssl-devel libstdc++-devel libtinfo-devel url_handler
BuildRequires: %libqt-devel
BuildRequires: rpm-utils
%if %with_console
BuildRequires: libcdk-devel
%endif
%if %with_kde
BuildRequires: %kdelibs-devel
%endif
%if %socks
BuildRequires: libdante-devel
%endif
%if %with_gtk
BuildRequires: libgtk+2-devel
%endif
%if %with_osd
BuildRequires: libxosd-devel cvs
%endif
%if %with_gpg
BuildRequires: libgpgme-devel libgpg-error-devel
%endif

########################

%if "%beta" == "%nil"
Source: ftp://ftp.licq.org/pub/licq/srcs/%name-%version.tar.bz2
%else
Source: ftp://ftp.licq.org/pub/licq/srcs/%name-%version-%beta.tar.bz2
%endif
%if %with_auto_reply
#Source1: ftp://ftp.licq.org/pub/licq/plugins/%name-auto-reply-%%cvsdate.tar.bz2
%endif
%if %with_email
#Source4: ftp://ftp.licq.org/pub/licq/plugins/%name-email-%%cvsdate.tar.bz2
%endif
%if %with_gtk
Source5: ftp://ftp.licq.org/pub/licq/plugins/icqnd-0.1.9.6.tar.bz2
%endif
%if %with_osd
Source6: ftp://ftp.licq.org/pub/licq/plugins/osd_1.3.2.2.tar.bz2
%endif

########################


Source9: licq-tracepath.utility
Source10: licq-viewurl.sh
Source21: %name.16.xpm.bz2
Source22: %name.32.xpm.bz2
Source23: %name.48.xpm.bz2

Patch2: licq-1.3.4-alt-xvt.patch
#
Patch4: licq-1.3.0-conf.patch
#
Patch9: licq-1.2.0a-qt-gui-1.2.0-translation.patch
#
Patch13: licq-1.3.5-qtgui_def_ru_enc.patch
Patch14: licq-1.3.5-charset_icon_visibile.patch
Patch15: licq-1.3.4-alt-urlview.patch
Patch16: licq-1.3.2-wrap_qt_malloc.patch
Patch17: licq_osd_plugin-1.2.7.3a-defaults.patch
Patch18: licq-1.3.5-qt-gui.conf.h.patch
Patch19: licq-1.3.2-rtld_lazy.patch
#
Patch21: licq-1.3.2-kde-makefile.patch
#
Patch23: licq-1.3.2-alt-find-kdelibs.patch
Patch24: licq-1.3.2-alt-lib64.patch
Patch25: licq-1.3.5-logonfix.patch
Patch200: licq-1.2.7-remove-pidfile.patch

#package licq

Group: Networking/Instant messaging
Summary: ICQ clone written in C++
License: GPL
%if %with_osd
Requires: %name-osd = %version-%release
%endif
%if %with_kde
Requires: %name-kde = %version-%release
%else
Requires: %name-ui
%endif

%package maxi
Group: Networking/Instant messaging
Summary: ICQ clone written in C++
%if %with_msn
Requires: %name-msn = %version-%release
%endif
%if %with_email
Requires: %name-email = %version-%release
%endif
%if %with_auto_reply
Requires: %name-autoreply = %version-%release
%endif
%if %with_rms
Requires: %name-rms = %version-%release
%endif
%if %with_osd
Requires: %name-osd = %version-%release
%endif
%if %with_qt
Requires: %name-qt = %version-%release
%else
Requires: %name-ui
%endif
%if %with_kde
Requires: %name-kde = %version-%release
%else
Requires: %name-ui
%endif
%if %with_gtk
Requires: %name-gtk = %version-%release
%else
Requires: %name-ui
%endif
%if %with_console
Requires: %name-console = %version-%release
%else
Requires: %name-ui
%endif

%package mini
Group: Networking/Instant messaging
Summary: ICQ clone written in C++
%if %with_qt
Requires: %name-qt = %version-%release
%else
Requires: %name-ui
%endif

%package common
Summary: Common binaries and data files  for Licq
Group: Networking/Instant messaging
Obsoletes: %name-ssl %name-data %name-update-hosts
Provides: %name-base = %version-release
Obsoletes: %name-base
Requires: sound_handler

%package kde
Group: Networking/Instant messaging
Summary: ICQ clone written in C++, and the default plugin for KDE
Url: http://www.licq.org/
Provides: %name-plugin %name-ui
Requires: %name-common = %version-%release
Requires: %kdelibs >= %{get_version %kdelibs}
Provides: %name-kde3 = %version-%release
Obsoletes: %name-kde3
#Provides: %name-kde = %version-%release
#Obsoletes: %name-kde

%package qt
Summary: Qt based GUI plugin  for %name
Group: Networking/Instant messaging
Provides: %name-plugin %name-ui
Requires: %name-common = %version-%release
Requires: %libqt >= %{get_version %libqt}

%package gtk
Summary: GTK+ based GUI plugin  for %name
Group: Networking/Instant messaging
Provides: %name-plugin %name-ui
Requires: %name-common = %version-%release

%package console
Summary: Console based plugin for %name that uses ncurses
Group: Networking/Instant messaging
Provides: %name-plugin %name-ui
Requires: %name-common = %version-%release

%package email
Summary: Email forwarder plugin for %name
Group: Networking/Instant messaging
Provides: %name-plugin, %name-forwarder = %version-%release
Obsoletes: %name-forwarder
Requires: %name-common = %version-%release

%package autoreply
Summary: Autoreply Licq plugin for %name
Group: Networking/Instant messaging
Provides: %name-plugin
Requires: %name-common = %version-%release

%package rms
Summary: Remote management service plugin for %name
Group: Networking/Instant messaging
Provides: %name-plugin
Requires: %name-common = %version-%release

%package osd
Summary: OSD (On Screen Dysplay) plugin for %name
Group: Networking/Instant messaging
Provides: %name-plugin
Requires: %name-common = %version-%release

%package msn
Summary: MSN Protocol plugin for %name
Group: Networking/Instant messaging
Provides: %name-plugin
Requires: %name-common = %version-%release

%package devel
Summary: Development files for %name
Group: Development/C
Requires: %name-common = %version-%release

%description maxi
Licq supports different interfaces and functions via plugins. Currently there are
plugins for both the X Windowing System and the console.

This package contains the base files for Licq (the Licq daemon) and the QT
plugin, which is written using the Qt widget set. Currently this GUI plugin has
most of the ICQ functions implemented.

This starts the QT plugin by default, so to run other plugins, you will have to
issue the command "licq -p <plugin>" once. To get back the Qt plugin, you will
have to run once "licq -p qt-gui". Alternatively you may be able to do it in a
plugin dialog box if your plugin supports this feature.

This version of licq has SSL support for those plugins that support it.
%description mini
Licq supports different interfaces and functions via plugins. Currently there are
plugins for both the X Windowing System and the console.

This package contains the base files for Licq (the Licq daemon) and the QT
plugin, which is written using the Qt widget set. Currently this GUI plugin has
most of the ICQ functions implemented.

This starts the QT plugin by default, so to run other plugins, you will have to
issue the command "licq -p <plugin>" once. To get back the Qt plugin, you will
have to run once "licq -p qt-gui". Alternatively you may be able to do it in a
plugin dialog box if your plugin supports this feature.

This version of licq has SSL support for those plugins that support it.
%description
Licq supports different interfaces and functions via plugins. Currently there are
plugins for both the X Windowing System and the console.

This package contains the base files for Licq (the Licq daemon) and the QT
plugin, which is written using the Qt widget set. Currently this GUI plugin has
most of the ICQ functions implemented.

This starts the QT plugin by default, so to run other plugins, you will have to
issue the command "licq -p <plugin>" once. To get back the Qt plugin, you will
have to run once "licq -p qt-gui". Alternatively you may be able to do it in a
plugin dialog box if your plugin supports this feature.

This version of licq has SSL support for those plugins that support it.

%description kde
This is the KDE based GUI plugin for Licq.
Install this if you want a KDE-based GUI for Licq.

%description common
Common binaries and data files  for Licq

%description devel
This is the header files that you will need in order to compile Licq plugins.

%description rms
RMS stands for the Remote Management Service. It is a plugin for Licq which
enables you to "telnet" to your Licq box to perform various tasks. Security is
implemented through basic username and password authentication.

%description qt
This is the qt based GUI for Licq.
Install this and if you want a qt-based GUI for Licq.

%description gtk
This is the GTK+ based GUI plugin for Licq.
Install this if you want a GTK+ based GUI for Licq.

%description console
This is a console based plugin for Licq that uses ncurses that came in the
standard Licq source package. It is extremely usable and functional, but it
does not currently have support for gpm.

Install this if you want to run Licq on the console.

%description email
This plugin for Licq lets you forward messages to your email account. This is a
plugin that came with the standard Licq source package. It can be run
concurrently with a UI plugin.

Install this if you want to add this function to Licq.

%description autoreply
This plugin for Licq enables Licq to auto reply to messages. This is a plugin
standard Licq source package. It can be run concurrently with a UI plugin.

Install this if you want to add this function to Licq.

%description osd
This is a small plugin, which uses libxosd2 to
display new arriving messages as OSD (On Screen Display)
text on your desktop.

Install this if you want to add this function to Licq.

%description msn
MSN Protocol Plugin.

Install this if you want to add this function to Licq.

%description maxi
Licq supports different interfaces and functions via plugins. Currently there are
plugins for both the X Windowing System and the console.

This package contains the base files for Licq (the Licq daemon) and the QT
plugin, which is written using the Qt widget set. Currently this GUI plugin has
most of the ICQ functions implemented.

This starts the QT plugin by default, so to run other plugins, you will have to
issue the command "licq -p <plugin>" once. To get back the Qt plugin, you will
have to run once "licq -p qt-gui". Alternatively you may be able to do it in a
plugin dialog box if your plugin supports this feature.

This version of licq has SSL support for those plugins that support it.
%description mini
Licq supports different interfaces and functions via plugins. Currently there are
plugins for both the X Windowing System and the console.

This package contains the base files for Licq (the Licq daemon) and the QT
plugin, which is written using the Qt widget set. Currently this GUI plugin has
most of the ICQ functions implemented.

This starts the QT plugin by default, so to run other plugins, you will have to
issue the command "licq -p <plugin>" once. To get back the Qt plugin, you will
have to run once "licq -p qt-gui". Alternatively you may be able to do it in a
plugin dialog box if your plugin supports this feature.

This version of licq has SSL support for those plugins that support it.
%description
Licq supports different interfaces and functions via plugins. Currently there are
plugins for both the X Windowing System and the console.

This package contains the base files for Licq (the Licq daemon) and the QT
plugin, which is written using the Qt widget set. Currently this GUI plugin has
most of the ICQ functions implemented.

This starts the QT plugin by default, so to run other plugins, you will have to
issue the command "licq -p <plugin>" once. To get back the Qt plugin, you will
have to run once "licq -p qt-gui". Alternatively you may be able to do it in a
plugin dialog box if your plugin supports this feature.

This version of licq has SSL support for those plugins that support it.


### PREP ##########################################

%prep
%set_strip_method executable shared

%define buildver %version
%if "%beta" != "%nil"
%define buildver %version-%beta
%endif

%setup -q -n %name-%buildver

pushd plugins
%if %with_gtk
   tar xfj %SOURCE5
   mv icqnd-* icqnd
%endif
%if %with_osd
   if ! [ -d osd ] ; then
echo "Using internal OSD plugin sources"
   else
rm -rf osd* ||:
tar xfj %SOURCE6
mv osd-* osd
   fi
%endif
popd

install -m 644 %SOURCE9 share/utilities/tracepath.utility

%patch2 -p1
#
###%patch4 -p1
###%patch24 -p1
%patch25 -p0

%if %with_osd
pushd plugins/osd*
%patch17 -p1
popd
%endif

# with_qt || with_kde

pushd plugins/qt-gui*
%patch13 -p1
%patch14 -p1
%patch15 -p1
%patch16 -p1
%patch18 -p1
%patch21 -p1

#%patch23 -p1

popd

#%patch19 -p1



# remove old auto* files

find -type d -name autom4te.cache | while read d; do rm -rf "$d" ||: ; done

cd plugins/qt-gui*

%if %with_osd
cd ../osd
[ ! -e acinclude.m4 -a -e admin/acinclude.m4 ] && ln -s admin/acinclude.m4 acinclude.m4
%__autoreconf
%endif

%if %with_console
cd ../console*
%__autoreconf
%endif

%if %with_email
cd ../email*
%__autoreconf
%endif

%if %with_auto_reply
cd ../auto-reply*
%__autoreconf
%endif

%if %with_rms
cd ../rms*
%__autoreconf
%endif

%if %with_gtk
cd ../icqnd
%__autoreconf
%endif

%if %with_msn
cd ../msn*
%__autoreconf
%endif

cd ../qt-gui*
#sed -i "s|\s*Name\s*=.*|Name=Licq [Qt]|" share/licq.desktop
#sed -i "s|\s*Exec\s*=.*|Exec=licq -p qt-gui|" share/licq.desktop
%lIF_ver_lt %glibc_core_ver 2.5
sed -i "s|libkdecore\.la|libkdecore.so|g" acinclude.m4.in
sed -i "s|\(Wl,--no-undefined\)| -Wl,--allow-shlib-undefined \1|g" acinclude.m4.in
%endif
#sed -i "s|ac_qt_libname=-lqt-mt|ac_qt_libname=\"-lqt-mt -lpthread\"|g" acinclude.m4.in
%__autoreconf
export PATH=%qtdir/bin:$PATH
find -type f -name \*.cpp | \
while read f
do
   grep include $f| grep -q '.moc' || continue
   F=`echo "$f"| sed "s/\.cpp$/.h/"`
   M=`echo "$f"| sed "s/\.cpp$/.moc/"`
   echo $F
   moc $F -o $M
done

cd ..
cp -r qt-gui* kde-gui
cd kde-gui
rm -rf qt-gui*
sed -i "s|\s*Name\s*=.*|Name=Licq [KDE]|" share/licq.desktop
sed -i "s|\s*Exec\s*=.*|Exec=licq -p kde-gui|" share/licq.desktop
%__autoreconf

cd ../..
%__autoreconf

### BUILD ##########################################

%build
export CFLAGS="%optflags" CXXFLAGS="%optflags" CPPFLAGS="%optflags"
export PATH=%qtdir/bin:$PATH

cd plugins/qt-gui*

%if %with_osd
# osd
cd ../osd
%configure --disable-rpath
%make_build
%endif

%if %with_console
# console interface /w ncurses plugin
cd ../console*
%configure --disable-rpath
%make_build
%endif

%if %with_email
# email
cd ../email*
%configure --disable-rpath
%make_build
%endif

%if %with_auto_reply
#auto reply
cd ../auto-reply*
%configure --disable-rpath
%make_build
%endif

%if %with_rms
# remote management service
cd ../rms*
%configure --disable-rpath
%make_build
%endif

%if %with_gtk
# gtk gui
cd ../icqnd
%configure --disable-rpath --with-licq-includes=../../include
%make_build
%endif

%if %with_msn
# osd
cd ../msn*
%configure --disable-rpath
%make_build
%endif

%if %with_qt
# qt gui
cd ../qt-gui*
export QTDIR=%qtdir
%configure --disable-rpath --with-x
%make_build
%endif

%if %with_kde
# kde gui
cd ../kde-gui*
export QTDIR=%qtdir KDEDIR=%kdedir
%configure --disable-rpath --with-kde
pushd src
dcopidl kimiface.h > kimiface.kidl
dcopidl2cpp --c++-suffix cpp --no-signals kimiface.kidl
popd

%make_build
%endif

#main licq stuff

cd ../..
%configure \
   --disable-rpath \
   --with-gnu-ld \
   --enable-gpgme \
   --enable-openssl \
%if %socks
   --enable-socks5 \
%endif
   --program-transform-name=""
%make_build

### INSTALL ##########################################

%install
#licq base
mkdir -p %buildroot/%_datadir/locale

%make install DESTDIR=%buildroot

mkdir -p %buildroot/%_bindir
install -m755 src/licq %buildroot/%_bindir/licq-ssl
ln -fs licq-ssl %buildroot/%_bindir/licq
install -m755 %SOURCE10 %buildroot/%_bindir/licq-viewurl.sh

rm -rf %buildroot/%_datadir/licq/translations

mkdir -p %buildroot/%_miconsdir
mkdir -p %buildroot/%_iconsdir
mkdir -p %buildroot/%_liconsdir
bzip2 -dc %SOURCE21 > %buildroot/%_miconsdir/licq.xpm
bzip2 -dc %SOURCE22 > %buildroot/%_iconsdir/licq.xpm
bzip2 -dc %SOURCE23 > %buildroot/%_liconsdir/licq.xpm

# menu stuff GTK

%if %with_gtk
mkdir -p %buildroot/%_menudir
cat > %buildroot/%_menudir/%name-gtk <<EOF
   ?package(licq-gtk):\
   command="licq -p gtk-gui"\
   icon="licq.xpm"\
   title="Licq [GTK]"\
   longtitle="ICQ client"\
   needs="x11"\
   section="Networking/Instant messaging"
EOF
%endif

# menu stuff console

%if %with_console
mkdir -p %buildroot/%_menudir
cat > %buildroot/%_menudir/%name-console <<EOF
   ?package(licq-console):\
   command="licq -p console"\
   icon="licq.xpm"\
   title="Licq [console]"\
   longtitle="Text based ICQ client"\
   needs="text"\
   section="Networking/Instant messaging"
EOF
%endif

%find_lang %name

cd plugins/qt-gui*

%if %with_kde
#kde gui
cd ../kde-gui*
%make install DESTDIR=%buildroot libdir=%_libdir/%name
#install -m755 src/.libs/licq_qt-gui.so %buildroot/%_libdir/licq/licq_kde-gui.so
#install -m755 src/.libs/licq_qt-gui.la %buildroot/%_libdir/licq/licq_kde-gui.la
%endif

%if %with_qt
#qt gui
cd ../qt-gui*
%make install DESTDIR=%buildroot libdir=%_libdir/%name
# fix the permission problems (??!!!)
pushd %buildroot/%_datadir/licq/qt-gui/
   chmod 755 *
popd
%endif

%if %with_gtk
cd ../icqnd
%make install DESTDIR=%buildroot libdir=%_libdir/%name
ln -s licq_icqnd.so %buildroot/%_libdir/licq/licq_gtk-gui.so
ln -s licq_icqnd.la %buildroot/%_libdir/licq/licq_gtk-gui.la
%endif

%if %with_osd
cd ../osd
%make install DESTDIR=%buildroot libdir=%_libdir/%name
chmod a+x %buildroot/%_libdir/%name/licq_osd.*
%find_lang licq_osd_plugin
%endif

%if %with_msn
# msn plugin
cd ../msn*
%make install DESTDIR=%buildroot libdir=%_libdir/%name
%endif

%if %with_console
# console ui
cd ../console*
%make install DESTDIR=%buildroot libdir=%_libdir/%name
%endif

%if %with_email
#  email
cd ../email*
%make install DESTDIR=%buildroot libdir=%_libdir/%name
%endif

%if %with_auto_reply
# auto reply
cd ../auto-reply*
%make install DESTDIR=%buildroot libdir=%_libdir/%name
%endif

%if %with_rms
# remote management service
cd ../rms*
%make install DESTDIR=%buildroot libdir=%_libdir/%name
%endif

# remove rpath from plugins

find %buildroot -type f -name \*.so | while read f; do chrpath -d $f; done


%post
%update_menus
%postun
%clean_menus

%post qt
%update_menus
%postun qt
%clean_menus

%post gtk
%update_menus
%postun gtk
%clean_menus

%post console
%update_menus
%postun console
%clean_menus

### FILES ##########################################

#
%files
%files maxi
%files mini

%if %with_kde
## kde plugin
%files kde
%_datadir/applications/kde/licq.desktop
%_libdir/licq/licq*kde-gui*
%endif

%if %with_qt
## licq qt plugin
%files qt
%_datadir/applications/licq.desktop
%_libdir/licq/licq*qt*
%_datadir/licq/qt-gui/*
%attr(755,root,root) %dir %_datadir/licq/qt-gui
%endif

## licq base

%files common -f %name.lang
%_bindir/licq
%_bindir/licq-ssl
%attr(755,root,root) %dir %_datadir/licq/utilities
%attr(755,root,root) %dir %_datadir/licq/sounds
%dir %_libdir/licq
%dir %_datadir/licq
%_datadir/licq/utilities/*
%_datadir/licq/sounds/*
%_miconsdir/licq.xpm
%_iconsdir/licq.xpm
%_liconsdir/licq.xpm
%attr(0755,root,root) %_bindir/licq-viewurl.sh
%doc doc/ upgrade/ README*  bin/licq.* bin/licq2mutt
%if !%no_some_docs
%doc ChangeLog
%endif
%if %with_gpg
%doc licq_gpg.conf
%endif

%if %with_gtk
## gtk plugin
%files gtk
%_menudir/licq-gtk
%_libdir/licq/licq*icqnd*
%_libdir/licq/licq*gtk-gui*
%_datadir/licq/icqnd
%endif

%if %with_osd
## osd plugin
%files osd -f plugins/osd/licq_osd_plugin.lang
%_libdir/licq/licq_osd*
%doc plugins/osd*/%{name}_osd.conf
%doc plugins/osd*/{AUTHORS,TODO,README}
%endif

%if %with_msn
## msn plugin
%files msn
%_libdir/licq/protocol_msn*
%doc plugins/msn*/owner.MSN_
%doc plugins/msn*/README
%endif

## devel

%files devel
%_includedir/licq

%if %with_console
## console plugin
%files console
%_menudir/licq-console
%_libdir/licq/licq*console*
%doc plugins/console*/README
%doc plugins/console*/%{name}_console.conf
%endif

%if %with_email
## email plugin
%files email
%_libdir/licq/licq*forward*
%doc plugins/email*/README
%doc plugins/email*/%{name}_forwarder.conf
%endif

%if %with_auto_reply
## auto reply plugin
%files autoreply
%_libdir/licq/licq_auto*
%doc plugins/auto*/README
%doc plugins/auto*/%{name}_autoreply.conf
%endif

%if %with_rms
## remote management svcx
%files rms
%_libdir/licq/licq*rms*
%doc plugins/rms*/README
%doc plugins/rms*/%{name}_rms.conf
%endif

########################################################

%changelog

Полный changelog можно просмотреть здесь

 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin