%define c_client_name libpalo2 Summary: Palo Database C Client Name: palo-client-c Version: 0.0.0 Release: 0%{?dist} License: GPLv2 Group: Applications/Databases Source: https://svn.code.sf.net/p/%{name}/code/molap/client_libraries/5.1/palo-client-c.tar.gz Patch0: palo-client-c-0.0.0-makefile.patch URL: http://www.jedox.com/community/palo-forum/ BuildRequires: libtool BuildRequires: boost-devel BuildRequires: palo-client-cpp Requires: palo-client-cpp %package -n palo-client-c-devel Summary: Palo Database C Client Development Files Group: Development/Libraries BuildArch: noarch Requires: palo-client-c %description -n palo-client-c Palo C client provides a set of libraries which can be used by applications to access the palo MOLAP database. The c client library creates a connection to the palo database server using either a HTTP or HTTPS. The palo database server may be located on the same or on a different machine. The C client relies on the C++ client (libpalo_ng) to work. %description -n palo-client-c-devel Palo C client development package provides a set of c header files (.h) that can be used by to develop C application which access the palo MOLAP database. %prep %setup -q #Patch the Makefile to ensure that automake can complete %patch0 -p1 %build #Build the c client library, libaplo2; run libtoolize to replace the old debian automake files from upstream cd %{_builddir}/%{name}-%{version}/%{c_client_name} libtoolize -f aclocal autoconf automake --add-missing --copy chmod +x configure ./configure make %{?_smp_mflags} %install mkdir --parents %{buildroot}%{_libdir} #Install the c client files install --mode=0755 %{_builddir}/%{name}-%{version}/%{c_client_name}/.libs/%{c_client_name}.so.%{version} %{buildroot}%{_libdir} #Create the c client symbolic links cd %{buildroot}%{_libdir} ln -sf %{c_client_name}.so.%{version} %{c_client_name}.so ln -sf %{c_client_name}.so.%{version} %{c_client_name}.so.0 #Move the license to the root directory cp %{_builddir}/%{name}-%{version}/%{c_client_name}/COPYING %{_builddir}/%{name}-%{version} #Copy accross the header files for the devel package mkdir --parents %{buildroot}%{_includedir}/%{c_client_name} cp %{_builddir}/%{name}-%{version}/%{c_client_name}/*.h %{buildroot}%{_includedir}/%{c_client_name} #Ensure the ldconfig is called on install and uninstall so the .so's work as expected %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files -n palo-client-c %license COPYING #Files owned by the package %{_libdir}/%{c_client_name}.* %files -n palo-client-c-devel %license COPYING %{_includedir}/%{c_client_name}/* %changelog * Tue Nov 10 2015 Michael Arnold - 5.1.4 - Initial draft