summaryrefslogtreecommitdiffstats
path: root/redhat/dependencies/libcaldav
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/libcaldav
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/libcaldav')
-rw-r--r--redhat/dependencies/libcaldav/libcaldav-0.6.2-fix_installation.patch24
-rw-r--r--redhat/dependencies/libcaldav/libcaldav.spec39
2 files changed, 52 insertions, 11 deletions
diff --git a/redhat/dependencies/libcaldav/libcaldav-0.6.2-fix_installation.patch b/redhat/dependencies/libcaldav/libcaldav-0.6.2-fix_installation.patch
new file mode 100644
index 000000000..e1eb18ebf
--- /dev/null
+++ b/redhat/dependencies/libcaldav/libcaldav-0.6.2-fix_installation.patch
@@ -0,0 +1,24 @@
+--- libcaldav-0.6.5/libcaldav.pc.in.ORI 2012-08-02 23:25:37.149283733 +0200
++++ libcaldav-0.6.5/libcaldav.pc.in 2012-08-02 23:25:45.356339277 +0200
+@@ -3,8 +3,8 @@
+ libdir=@libdir@
+ includedir=@includedir@
+
+-pkglibdir=${libdir}/@PACKAGE@
+-pkgincludedir=${includedir}/@PACKAGE@
++pkglibdir=${libdir}
++pkgincludedir=${includedir}
+
+ Name: libcaldav
+ Description: libcaldav is a client library for CalDAV
+--- libcaldav-0.6.5/src/Makefile.am.ORI 2012-08-02 23:33:27.804972833 +0200
++++ libcaldav-0.6.5/src/Makefile.am 2012-08-02 23:33:35.460457142 +0200
+@@ -37,7 +37,7 @@
+ get-freebusy-report.c \
+ get-freebusy-report.h
+
+-libcaldav_includedir=$(includedir)/libcaldav-@VERSION@
++libcaldav_includedir=$(includedir)
+ libcaldav_include_HEADERS = caldav.h
+
+ noinst_HEADERS = \
diff --git a/redhat/dependencies/libcaldav/libcaldav.spec b/redhat/dependencies/libcaldav/libcaldav.spec
index f75aa3119..55d1fd70b 100644
--- a/redhat/dependencies/libcaldav/libcaldav.spec
+++ b/redhat/dependencies/libcaldav/libcaldav.spec
@@ -1,12 +1,12 @@
# 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_datadir %{_prefix}/share
+%define tde_datadir %{tde_prefix}/share
%define tde_docdir %{tde_datadir}/doc
-%define tde_includedir %{_prefix}/include
-%define tde_libdir %{_prefix}/%{_lib}
+%define tde_includedir %{tde_prefix}/include
+%define tde_libdir %{tde_prefix}/%{_lib}
Name: trinity-libcaldav
Version: 0.6.5
@@ -20,10 +20,14 @@ License: GPL
Group: System Environment/Libraries
Summary: A client library that adds support for the CalDAV protocol (rfc4791).
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Prefix: %{tde_prefix}
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Source0: libcaldav_0.6.5-2debian2.tar.gz
+# [libcaldav] Fix messy installation directories
+Patch1: libcaldav-0.6.2-fix_installation.patch
+
BuildRequires: libtool
BuildRequires: glib2-devel
BuildRequires: gtk2-devel
@@ -35,7 +39,7 @@ Provides: libcaldav = %{version}-%{release}
%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)
@@ -61,8 +65,12 @@ Provides: libcaldav-devel = %{version}-%{release}
%prep
%setup -q -n libcaldav-%{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 \
--docdir=%{tde_docdir}/libcaldav \
@@ -75,9 +83,6 @@ autoreconf --force --install --symlink
%__rm -rf %{buildroot}
%__make install DESTDIR=%{buildroot}
-# The include files do not go in the correct directory
-%__mv -f %{buildroot}%{tde_includedir}/libcaldav-0.6.2/*.h %{buildroot}%{tde_includedir}
-%__rm -rf %{buildroot}%{tde_includedir}/libcaldav-0.6.2
%clean
%__rm -rf %{buildroot}
@@ -85,15 +90,27 @@ autoreconf --force --install --symlink
%files
%{tde_libdir}/*.so.*
-%{tde_docdir}/libcaldav
+%{tde_docdir}/libcaldav/
%files devel
-%{tde_includedir}/*.h
+%{tde_includedir}/caldav.h
%{tde_libdir}/*.a
%{tde_libdir}/*.la
%{tde_libdir}/*.so
%{tde_libdir}/pkgconfig/libcaldav.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