pidgin-otr.spec revision 10713
#
# spec file for package pidgin-otr
#
# Copyright (c) 2005 Sun Microsystems, Inc.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Owner: rickju
# bugdb :
#
Name: pidgin-otr
Version: 3.0.1
%define libotr_version 3.0.0
Release: 1
License: GPL
Group: Applications/Internet
Distribution: Java Desktop System
Vendor: Sun Microsystems, Inc.
Summary: Off-the-Record (OTR) Messaging plugin for GAIM
Source0: http://www.cyberdyne.org/~icebrkr/files/%{name}-%{version}.tar.gz
Source1: http://www.cypherpunks.ca/otr/libotr-%{libotr_version}.tar.gz
# owner:rickju date:2007-03-07 type:bug bugster:6524858 state:upstream
Patch1: pidgin-otr-01-gtk-ui.diff
# owner:rickju date:2007-04-03 type:bug bugster:6532728 state:upstream
Patch2: pidgin-otr-02-gtk-dialog.diff
# owner:rickju date:2007-05-27 type:branding
Patch3: pidgin-otr-03-makefile.diff
URL: http://www.cypherpunks.ca/otr/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Docdir: %{_defaultdocdir}/pidgin
Autoreqprov: on
BuildRequires: pidgin-devel
%description
Off-the-Record (OTR) Messaging allows you to have private
conversations over instant messaging.
This is a plugin for pdgin which implements Off-the-Record
Messaging over any IM network pidgin supports.
%package devel
Summary: Off-the-Record (OTR) Messaging Plugin For GAIM
Group: System/GUI/GNOME
Autoreqprov: on
Requires: %name = %version
%description devel
Off-the-Record (OTR) Messaging allows you to have private
conversations over instant messaging.
This is a plugin for pidgin which implements Off-the-Record
Messaging over any IM network pidgin supports.
%prep
%setup -q -b 1 -n %{name}*
#patch for libotr
cd ../libotr*
#patch for pidgin-otr
cd ../pidgin-otr*
%patch1 -p1
%patch2 -p1
%patch3 -p1
%build
%ifos linux
if [ -x /usr/bin/getconf ]; then
CPUS=`getconf _NPROCESSORS_ONLN`
fi
%else
CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
%endif
if test "x$CPUS" = "x" -o $CPUS = 0; then
CPUS=1
fi
#build libotr
cd ../libotr*
glib-gettextize -f
libtoolize --force
aclocal $ACLOCAL_FLAGS -I .
autoheader
automake -a -c -f
autoconf
CFLAGS="$RPM_OPT_FLAGS -DG_IMPLEMENT_INLINES -DG_HAVE_ISO_VARARGS" \
LD_LIBRARY_PATH="%{_libdir}:$LD_LIBRARY_PATH"
./configure \
--prefix=%{_prefix} \
--mandir=%{_mandir} \
--sysconfdir=%{_sysconfdir}
make -j $CPUS
# get root dir
cd ..
export MYDIR=`pwd`
#build pidgin-otr
cd libotr*
if [ -d my_build_tmp ]; then rm -rf my_build_tmp; fi;
mkdir my_build_tmp; mkdir my_build_tmp/libotr;
cp src/*.h my_build_tmp/libotr
cp toolkit/*.h my_build_tmp/libotr
cd ../pidgin-otr*
glib-gettextize -f
libtoolize --force
aclocal $ACLOCAL_FLAGS -I . -I ${MYDIR}/libotr-%{libotr_version}
autoheader
automake -a -c -f
autoconf
CFLAGS="$RPM_OPT_FLAGS -DG_IMPLEMENT_INLINES -DG_HAVE_ISO_VARARGS -I${MYDIR}/libotr-%{libotr_version}/my_build_tmp/libotr"
LD_LIBRARY_PATH="%{_libdir}:$LD_LIBRARY_PATH -L${MYDIR}/libotr-%{libotr_version}/src/.libs"
./configure \
--prefix=%{_prefix} \
--mandir=%{_mandir} \
--sysconfdir=%{_sysconfdir} \
--with-libotr-inc-prefix=${MYDIR}/libotr-%{libotr_version}/my_build_tmp \
--with-libotr-prefix=${MYDIR}/libotr-%{libotr_version}/src/.libs
make -j $CPUS
%install
# install libotr
cd ../libotr*
make DESTDIR=$RPM_BUILD_ROOT install \
SITEPREFIX=/dummy VENDORPREFIX=/dummy PERLPREFIX=/dummy
# install pidgin-otr
cd ../pidgin-otr*
make DESTDIR=$RPM_BUILD_ROOT install \
SITEPREFIX=/dummy VENDORPREFIX=/dummy PERLPREFIX=/dummy
rm $RPM_BUILD_ROOT%{_libdir}/*.a
rm $RPM_BUILD_ROOT%{_libdir}/*.la
rm $RPM_BUILD_ROOT%{_libdir}/pidgin/*.la
%files
%defattr(-, root, root)
# libotr
%attr(755, root, root) %{_libdir}/*.so
%{_bindir}/*
%{_mandir}/man1/*
%{_libdir}/lib*.so.*
%{_libdir}/lib*.a
# pidgin-otr
%attr(755, root, root) %{_libdir}/pidgin/*.so
%{_libdir}/pidgin/*.la
%{_libdir}/lib*.la
%files devel
%defattr(-, root, root)
# libotr
%{_includedir}/libotr/*
%{_datadir}/aclocal
# pidgin-otr
%clean
rm -r $RPM_BUILD_ROOT
%changelog
* Tue Jun 01 2007 - rick.ju@sun.com
- fix the source0 url
* Tue May 30 2007 - rick.ju@sun.com
- bump to pidgin-otr 3.0.1
* Tue Apr 03 2007 - rick.ju@sun.com
- Add a gaim-otr-03-gtk-dialog.diff for bug#632728
* Thu Jan 18 2007 - damien.carbery@sun.com
- Remove the code from %install that deletes $RPM_BUILD_ROOT as it trashes the
'make install' of gaim when part of SUNWgnome-im-client build.
* Thu Dec 21 2006 - damien.carbery@sun.com
- Remove *.a and *.la files in %install.
* Mon Dec 18 2006 - rick.ju@sun.com
- Add this new spec for libotr and gaim-otr