File dclib.spec of Package dclib

# norootforbuild

%bcond_without socks

%define soname		5
%define qtdir		/usr/lib/qt3

Name:				libdc%{soname}
Version:			0.3.23
Release:			0
Summary:			Direct Connect File Sharing Protocol Library
Source:			http://prdownloads.sourceforge.net/wxdcgui/dclib-%{version}.tar.bz2
Patch1:			dclib-add_soname_to_plugin_dir.patch
URL:				http://wxdcgui.sourceforge.net/
Group:			Development/Libraries/C and C++
License:			GNU General Public License (GPL)
BuildRoot:		%{_tmppath}/build-%{name}-%{version}
BuildRequires:	openssl-devel bzip2 libstdc++-devel qt3-devel
BuildRequires:	gcc-c++ libxml2-devel zlib-devel
%if !%{without socks}
BuildRequires:	dante-devel pam-devel
%endif
%if %suse_version >= 1030
BuildRequires:	libbz2-devel
%endif
BuildRequires:	autoconf automake libtool
Provides:		libdc = %{version}-%{release}
Provides:		dclib = %{version}-%{release}
Obsoletes:		dclib < %{version}-%{release}

%description
This library implements the Direct Connect file sharing protocol.
The package contains the shared library required for running programs based on
dclib.

%package -n libdc-devel
Summary:			Development environment for %{name}
Group:			Development/Libraries/C and C++
Requires:		%{name} = %{version}-%{release}
Requires:		openssl-devel zlib-devel libxml2-devel
%if %suse_version >= 1030
Requires:		libbz2-devel
%else
Requires:		bzip2
%endif
%if !%{without socks}
Requires:		dante-devel pam-devel
%endif
Provides:		libdc%{soname}-devel = %{version}-%{release}
Provides:		dclib-devel = %{version}-%{release}
Obsoletes:		dclib-devel < %{version}-%{release}

%description -n libdc-devel
This library implements the Direct Connect file sharing protocol.
The package contains the C++ headers to compile programs based on dclib.

%debug_package
%prep
%setup -q -n "dclib-%{version}"
%patch1
awk '/^+++ /{print $2}' < "%{PATCH1}" \
| while read f; do
  %__sed -i 's|##SONAME##|%{soname}|g' "$f"
done

%build
export CFLAGS="%{optflags} -fno-strict-aliasing"
export CXXFLAGS="$CFLAGS"
export QTDIR="%{qtdir}"
%configure --enable-shared \
			  --enable-static \
%if !%{without socks}
			  --enable-socks \
%else
			  --disable-socks \
%endif
			  --with-ssl-library=openssl

%__make %{?jobs:-j%{jobs}}

%install
%makeinstall

%post   -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%clean
%__rm -rf "%{buildroot}"

%files
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING COPYING.OpenSSL
%doc README NEWS TODO
%{_libdir}/libdc.so.%{soname}
%{_libdir}/libdc.so.%{soname}.*.*
%dir %{_libdir}/dclib%{soname}
%dir %{_libdir}/dclib%{soname}/plugin

%files -n libdc-devel
%defattr(-,root,root)
%{_includedir}/dclib-0.3
%{_libdir}/libdc.so
%{_libdir}/libdc.la
%{_libdir}/libdc.a
%{_libdir}/pkgconfig/dclib.pc

%changelog
* Mon Nov 24 2008 Michal Svec 0.3.23
- update

* Mon Nov 24 2008 Pascal Bleser <guru@unixtech.be> 0.3.22-0.pm.4
- fixed Requires for -devel package when built with socks support

* Sun Nov 23 2008 Pascal Bleser <guru@unixtech.be> 0.3.22-0.pm.1
- added SOCKS support
- SONAME bump from .so.3 to .so.4, branched off dclib3 package for
  backwards ABI compatibility based on old SONAME
- update to 0.3.22

* Sat Sep 13 2008 Pascal Bleser <guru@unixtech.be> 0.3.21-0.pm.1
- update to 0.3.21

* Fri Sep  5 2008 Pascal Bleser <guru@unixtech.be> 0.3.20-0.pm.1
- update to 0.3.20

* Fri Aug  8 2008 Pascal Bleser <guru@unixtech.be> 0.3.19-0.pm.1
- added ldconfig
- new upstream version

* Thu Jul 10 2008 Pascal Bleser <guru@unixtech.be> 0.3.18-0.pm.2
- added Obsoletes to upgrade smoothly from dclib to libdc

* Thu Jul 10 2008 Pascal Bleser <guru@unixtech.be> 0.3.18-0.pm.1
- plugin directory moved from %_libdir/dclib/plugin to %_libdir/dclib-0.3/plugin
- added -fno-strict-aliasing to compile flags
- renamed dclib to libdc0 for openSUSE Shared Library Policy compliance,
  and to prepare parallel installation of dclib for Qt3 and dclib for Qt4
- new upstream version

* Sun Jun 22 2008 Pascal Bleser <guru@unixtech.be> 0.3.17-0.pm.1
- new upstream version

* Wed Jun 18 2008 Pascal Bleser <guru@unixtech.be> 0.3.16-0.pm.1
- new upstream version

* Sun Mar 16 2008 Pascal Bleser <guru@unixtech.be> 0.3.13-0.pm.1
- new upstream version

* Sat Jan  5 2008 Pascal Bleser <guru@unixtech.be> 0.3.12-0.pm.2
- fixed typo in Requires in -devel subpackage, thanks to Toni for reporting

* Sat Dec  8 2007 Pascal Bleser <guru@unixtech.be> 0.3.12-0.pm.1
- added shared library policy compliant Provides
- new upstream version

* Mon Oct 15 2007 Pascal Bleser <guru@unixtech.be> 0.3.11-0.pm.1
- new upstream version

* Tue Sep 25 2007 Pascal Bleser <guru@unixtech.be> 0.3.10-0.pm.1
- moved to Packman
- new upstream version

* Wed May 30 2007 Pascal Bleser <guru@unixtech.be> 0.3.9-1
- new upstream version

* Thu Dec 21 2006 Pascal Bleser <guru@unixtech.be> 0.3.8-1
- new upstream version

* Thu Mar  9 2006 Pascal Bleser <guru@unixtech.be> 0.3.7-2
- lib64 fix for .pc file
- added debuginfo support
- rewrote spec file

* Tue Mar 15 2005 Pascal Bleser <guru@unixtech.be> 0.3.7-1
- version 0.3.7

* Sat Feb 12 2005 Pascal Bleser <guru@unixtech.be> 0.3.6-1
- version 0.3.6

* Wed Jan  5 2005 Pascal Bleser <guru@unixtech.be> 0.3.5-1
- revamped package

# Local Variables:
# mode: rpm-spec
# tab-width: 3
# End:
openSUSE Build Service is sponsored by