summaryrefslogtreecommitdiffstats
path: root/redhat/dependencies/libcarddav
diff options
context:
space:
mode:
authorFrancois Andriot <francois.andriot@free.fr>2012-08-03 13:59:43 +0200
committerFrancois Andriot <francois.andriot@free.fr>2012-08-03 13:59:43 +0200
commitbe9f9f70d960e0789e024c8285dc681302c3c3f1 (patch)
treebc4c568eb13a62af120ba51f9145337541b35be3 /redhat/dependencies/libcarddav
parent1f76bf54b70463addf27bc503bb58af60dc8ae58 (diff)
downloadtde-packaging-be9f9f70d960e0789e024c8285dc681302c3c3f1.tar.gz
tde-packaging-be9f9f70d960e0789e024c8285dc681302c3c3f1.zip
RHEL/Fedora: adds support for Mandriva 2011 in packaging
Diffstat (limited to 'redhat/dependencies/libcarddav')
-rw-r--r--redhat/dependencies/libcarddav/libcarddav-0.6.5-fix_installation.patch24
-rw-r--r--redhat/dependencies/libcarddav/libcarddav.spec37
2 files changed, 51 insertions, 10 deletions
diff --git a/redhat/dependencies/libcarddav/libcarddav-0.6.5-fix_installation.patch b/redhat/dependencies/libcarddav/libcarddav-0.6.5-fix_installation.patch
new file mode 100644
index 000000000..12990f87a
--- /dev/null
+++ b/redhat/dependencies/libcarddav/libcarddav-0.6.5-fix_installation.patch
@@ -0,0 +1,24 @@
+--- libcarddav-0.6.2/libcarddav.pc.in.ORI 2012-08-02 23:38:03.688776626 +0200
++++ libcarddav-0.6.2/libcarddav.pc.in 2012-08-02 23:38:09.055630966 +0200
+@@ -3,8 +3,8 @@
+ libdir=@libdir@
+ includedir=@includedir@
+
+-pkglibdir=${libdir}/@PACKAGE@
+-pkgincludedir=${includedir}/@PACKAGE@
++pkglibdir=${libdir}
++pkgincludedir=${includedir}
+
+ Name: libcarddav
+ Description: libcarddav is a client library for CardDAV
+--- libcarddav-0.6.2/src/Makefile.am.ORI 2012-08-02 23:39:20.990884825 +0200
++++ libcarddav-0.6.2/src/Makefile.am 2012-08-02 23:39:36.182559576 +0200
+@@ -35,7 +35,7 @@
+ lock-carddav-object.c \
+ lock-carddav-object.h
+
+-libcarddav_includedir=$(includedir)/libcarddav-@VERSION@
++libcarddav_includedir=$(includedir)
+ libcarddav_include_HEADERS = carddav.h
+
+ noinst_HEADERS = \
diff --git a/redhat/dependencies/libcarddav/libcarddav.spec b/redhat/dependencies/libcarddav/libcarddav.spec
index c3ed99db0..003bcb9af 100644
--- a/redhat/dependencies/libcarddav/libcarddav.spec
+++ b/redhat/dependencies/libcarddav/libcarddav.spec
@@ -1,10 +1,10 @@
# If TDE is built in a specific prefix (e.g. /opt/trinity), the release will be suffixed with ".opt".
-%if "%{?_prefix}" != "/usr"
+%if "%{?tde_prefix}" != "/usr"
%define _variant .opt
%endif
-%define tde_includedir %{_prefix}/include
-%define tde_libdir %{_prefix}/%{_lib}
+%define tde_includedir %{tde_prefix}/include
+%define tde_libdir %{tde_prefix}/%{_lib}
Name: trinity-libcarddav
Version: 0.6.2
@@ -18,14 +18,18 @@ License: GPL
Group: System Environment/Libraries
Summary: A portable CardDAV client implementation originally developed for the Trinity PIM suite.
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Prefix: %{tde_prefix}
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Source0: libcarddav_0.6.2-2debian2.tar.gz
+# [libcarddav] Fix messy installation directories
+Patch1: libcarddav-0.6.5-fix_installation.patch
+
%if 0%{?fedora} || 0%{?rhel} >= 6
BuildRequires: libcurl-devel
%else
-%if 0%{?mgaversion}
+%if 0%{?mgaversion} || 0%{?mdkversion}
BuildRequires: %{_lib}curl-devel
%else
# Specific CURL version for TDE on RHEL 5 (and older)
@@ -55,22 +59,23 @@ Provides: libcarddav-devel = %{version}-%{release}
%prep
%setup -q -n libcarddav-%{version}
+%patch1 -p1 -b .dir
%build
+# CFLAGS required if CURL is installed on /opt/trinity, e.g. RHEL 5
+export CFLAGS="-I%{tde_includedir} -L%{tde_libdir} ${CFLAGS}"
+
autoreconf --force --install --symlink
%configure \
--includedir=%{tde_includedir} \
--libdir=%{tde_libdir} \
-%__make %{?_smp_mflags}
+%__make %{?_smp_mflags} LIBTOOL=$(which libtool)
%install
%__rm -rf %{buildroot}
-%__make install DESTDIR=%{buildroot}
+%__make install DESTDIR=%{buildroot} LIBTOOL=$(which libtool)
-# The include files do not go in the correct directory
-%__mv -f %{buildroot}%{tde_includedir}/libcarddav-0.6.1/*.h %{buildroot}%{tde_includedir}
-%__rm -rf %{buildroot}%{tde_includedir}/libcarddav-0.6.1
%clean
%__rm -rf %{buildroot}
@@ -86,6 +91,18 @@ autoreconf --force --install --symlink
%{tde_libdir}/*.so
%{tde_libdir}/pkgconfig/libcarddav.pc
+%post
+/sbin/ldconfig
+
+%postun
+/sbin/ldconfig
+
+%post devel
+/sbin/ldconfig
+
+%postun devel
+/sbin/ldconfig
+
%Changelog
* Sun Jul 28 2012 Francois Andriot <francois.andriot@free.fr> - 0.6.5-3