File librapi2.spec of Package librapi2
#
# spec file for package librapi2 (Version 0.15)
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
%if 0%{?suse_version} > 1110
%bcond_with hal
%else
%bcond_without hal
%endif
%define major 2
%define shortname rapi2
Name: librapi2
Version: 0.15.2
Release: 1
License: MIT
Url: http://www.synce.org
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: http://downloads.sourceforge.net/project/synce/SynCE/0.15.2/librapi2-0.15.2.tar.gz
Patch0: librapi2-no_add_needed.patch
BuildRequires: gcc-c++
BuildRequires: libsynce-devel
BuildRequires: pyrex >= 0.9.6
BuildRequires: python-devel >= 2.3
Summary: RAPI library for the SynCE project
Group: System/Libraries
Suggests: %{shortname}-tools
Suggests: python-%{shortname}
Provides: librapi = %{version}
Obsoletes: librapi < %{version}
%description
Librapi2 is part of the SynCE project. The RAPI library is an open source implementation that works like RAPI.DLL, available on Microsoft operating systems. The library makes it possible to make remote calls to a computer running device.
%package devel
Summary: Header files, libraries and development documentation for %{name}
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
Requires: libsynce-devel
%description devel
This package contains the header files, static libraries and development documentation for %{name}. If you like to
develop programs using %{name}, you will need to install %{name}-devel.
%package -n python-%{shortname}
Summary: Python RAPI bindings
Group: Development/Libraries/Python
%py_requires
%description -n python-%{shortname}
This packages contains the RAPI bindings for python. It is necessary for the use of the SynCE framework.
%package -n %{shortname}-tools
Summary: RAPI tools to interact with Windows Mobile devices
Group: Hardware/Mobile
%description -n %{shortname}-tools
This packages contains various simple commandline tools to interact with Windows Mobile devices using the SynCE framework.
%prep
%setup -q
%patch0 -p1
%build
%configure --disable-rpath --disable-static \
%if %{with hal}
--enable-hal-support
%else
--disable-hal-support
%endif
make %{?_smp_mflags}
%install
%{?make_install} %{!?make_install:%makeinstall}
rm -f %{buildroot}%{_libdir}/*.{la,a}
rm -f %{buildroot}%{py_sitedir}/*.{la,a}
%clean
rm -rf %{buildroot}
%post -n %{name} -p /sbin/ldconfig
%postun -n %{name} -p /sbin/ldconfig
%files -n %{name}
%defattr(-,root,root)
%doc BUGS ChangeLog LICENSE README README.design README.contributing TODO
%{_libdir}/librapi.so.2
%{_libdir}/librapi.so.2.0.0
%files -n %{shortname}-tools
%defattr(-,root,root)
%{_mandir}/man1/*
%{_bindir}/pcp
%{_bindir}/synce-install-cab
%{_bindir}/pmkdir
%{_bindir}/pstatus
%{_bindir}/prmdir
%{_bindir}/synce-registry
%{_bindir}/pkillall
%{_bindir}/pmv
%{_bindir}/prm
%{_bindir}/prun
%{_bindir}/psettime
%{_bindir}/rapiconfig
%{_bindir}/synce-list-programs
%{_bindir}/pshortcut
%{_bindir}/pls
%{_bindir}/synce-remove-program
%{_bindir}/synce-database
%files devel
%defattr(-,root,root)
%{_mandir}/man3/rapi_connection_from_name.3.gz
%{_includedir}/rapi.h
%{_includedir}/irapistream.h
%{_includedir}/rapi2.h
%{_includedir}/rapitypes.h
%{_includedir}/rapitypes2.h
%{_libdir}/pkgconfig/librapi2.pc
%{_libdir}/librapi.so
%files -n python-%{shortname}
%defattr(-,root,root)
%{py_sitedir}/pyrapi2.so
%changelog