summaryrefslogtreecommitdiffstats
path: root/redhat/dependencies/libcarddav
diff options
context:
space:
mode:
authorFrançois Andriot <albator78@libertysurf.fr>2021-01-30 14:34:02 +0100
committerFrançois Andriot <albator78@libertysurf.fr>2021-01-30 22:29:41 +0100
commit6581dc50b83f203d65eac61c00a159ab2a6ddb5d (patch)
tree85c02d38ca9dcedc28798ee41c4b16ec7260e9bc /redhat/dependencies/libcarddav
parent87e57a1a070839a44db16a0410ef57902db2df3e (diff)
downloadtde-packaging-6581dc50b83f203d65eac61c00a159ab2a6ddb5d.tar.gz
tde-packaging-6581dc50b83f203d65eac61c00a159ab2a6ddb5d.zip
RPM: massive update and cleanup
Diffstat (limited to 'redhat/dependencies/libcarddav')
-rw-r--r--redhat/dependencies/libcarddav/libcarddav-14.0.1-rhel5.patch164
-rw-r--r--redhat/dependencies/libcarddav/libcarddav-3.5.13.2.spec195
-rw-r--r--redhat/dependencies/libcarddav/libcarddav.spec (renamed from redhat/dependencies/libcarddav/libcarddav-14.0.0.spec)59
3 files changed, 33 insertions, 385 deletions
diff --git a/redhat/dependencies/libcarddav/libcarddav-14.0.1-rhel5.patch b/redhat/dependencies/libcarddav/libcarddav-14.0.1-rhel5.patch
deleted file mode 100644
index a6bf4e6e0..000000000
--- a/redhat/dependencies/libcarddav/libcarddav-14.0.1-rhel5.patch
+++ /dev/null
@@ -1,164 +0,0 @@
-diff --git a/src/add-carddav-object.c b/src/add-carddav-object.c
-index 5574991..a1586d8 100644
---- a/src/add-carddav-object.c
-+++ b/src/add-carddav-object.c
-@@ -104,7 +104,6 @@ gboolean carddav_add(carddav_settings* settings, carddav_error* error) {
- curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "PUT");
- curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
- curl_easy_setopt(curl, CURLOPT_UNRESTRICTED_AUTH, 1);
-- curl_easy_setopt(curl, CURLOPT_POSTREDIR, CURL_REDIR_POST_ALL);
- res = curl_easy_perform(curl);
- if (res != 0) {
- error->code = -1;
-diff --git a/src/delete-carddav-object.c b/src/delete-carddav-object.c
-index 96b9033..6984a82 100644
---- a/src/delete-carddav-object.c
-+++ b/src/delete-carddav-object.c
-@@ -132,7 +132,6 @@ gboolean carddav_delete(carddav_settings* settings, carddav_error* error) {
- curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "REPORT");
- curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
- curl_easy_setopt(curl, CURLOPT_UNRESTRICTED_AUTH, 1);
-- curl_easy_setopt(curl, CURLOPT_POSTREDIR, CURL_REDIR_POST_ALL);
- res = curl_easy_perform(curl);
- g_free(search);
- curl_slist_free_all(http_header);
-@@ -231,7 +230,6 @@ gboolean carddav_delete(carddav_settings* settings, carddav_error* error) {
- curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "DELETE");
- curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
- curl_easy_setopt(curl, CURLOPT_UNRESTRICTED_AUTH, 1);
-- curl_easy_setopt(curl, CURLOPT_POSTREDIR, CURL_REDIR_POST_ALL);
- res = curl_easy_perform(curl);
- if (LOCKSUPPORT && lock_token) {
- carddav_unlock_object(
-@@ -417,7 +415,6 @@ gboolean carddav_delete_by_uri(carddav_settings* settings, carddav_error* error)
- curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "DELETE");
- curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
- curl_easy_setopt(curl, CURLOPT_UNRESTRICTED_AUTH, 1);
-- curl_easy_setopt(curl, CURLOPT_POSTREDIR, CURL_REDIR_POST_ALL);
- res = curl_easy_perform(curl);
- if (LOCKSUPPORT && lock_token) {
- carddav_unlock_object(
-diff --git a/src/get-carddav-report.c b/src/get-carddav-report.c
-index b44fd2c..7655b29 100644
---- a/src/get-carddav-report.c
-+++ b/src/get-carddav-report.c
-@@ -117,7 +117,6 @@ static gchar* carddav_dirlist(carddav_settings* settings, carddav_error* error)
- curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "PROPFIND");
- curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
- curl_easy_setopt(curl, CURLOPT_UNRESTRICTED_AUTH, 1);
-- curl_easy_setopt(curl, CURLOPT_POSTREDIR, CURL_REDIR_POST_ALL);
- res = curl_easy_perform(curl);
- if (res != 0) {
- error->code = -1;
-@@ -243,7 +242,6 @@ gboolean carddav_getall(carddav_settings* settings, carddav_error* error) {
- curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "REPORT");
- curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
- curl_easy_setopt(curl, CURLOPT_UNRESTRICTED_AUTH, 1);
-- curl_easy_setopt(curl, CURLOPT_POSTREDIR, CURL_REDIR_POST_ALL);
- res = curl_easy_perform(curl);
- if (res != 0) {
- error->code = -1;
-@@ -345,7 +343,6 @@ gboolean carddav_getall_by_uri(carddav_settings* settings, carddav_error* error)
- curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "REPORT");
- curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
- curl_easy_setopt(curl, CURLOPT_UNRESTRICTED_AUTH, 1);
-- curl_easy_setopt(curl, CURLOPT_POSTREDIR, CURL_REDIR_POST_ALL);
- res = curl_easy_perform(curl);
- if (res != 0) {
- error->code = -1;
-@@ -378,4 +375,4 @@ gboolean carddav_getall_by_uri(carddav_settings* settings, carddav_error* error)
- curl_easy_cleanup(curl);
- g_free(dav_file_listing);
- return result;
--}
-\ No newline at end of file
-+}
-diff --git a/src/get-display-name.c b/src/get-display-name.c
-index 9e782e0..16c3e4b 100644
---- a/src/get-display-name.c
-+++ b/src/get-display-name.c
-@@ -100,7 +100,6 @@ gboolean carddav_getname(carddav_settings* settings, carddav_error* error) {
- curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "PROPFIND");
- curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
- curl_easy_setopt(curl, CURLOPT_UNRESTRICTED_AUTH, 1);
-- curl_easy_setopt(curl, CURLOPT_POSTREDIR, CURL_REDIR_POST_ALL);
- res = curl_easy_perform(curl);
- if (res != 0) {
- error->code = -1;
-diff --git a/src/lock-carddav-object.c b/src/lock-carddav-object.c
-index 163264c..2292cad 100644
---- a/src/lock-carddav-object.c
-+++ b/src/lock-carddav-object.c
-@@ -109,7 +109,6 @@ gchar* carddav_lock_object(
- curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "LOCK");
- curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
- curl_easy_setopt(curl, CURLOPT_UNRESTRICTED_AUTH, 1);
-- curl_easy_setopt(curl, CURLOPT_POSTREDIR, CURL_REDIR_POST_ALL);
- res = curl_easy_perform(curl);
- curl_slist_free_all(http_header);
- if (res != 0) {
-@@ -214,7 +213,6 @@ gboolean carddav_unlock_object(gchar* lock_token, gchar* URI,
- curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "UNLOCK");
- curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
- curl_easy_setopt(curl, CURLOPT_UNRESTRICTED_AUTH, 1);
-- curl_easy_setopt(curl, CURLOPT_POSTREDIR, CURL_REDIR_POST_ALL);
- res = curl_easy_perform(curl);
- curl_slist_free_all(http_header);
- if (res != 0) {
-diff --git a/src/modify-carddav-object.c b/src/modify-carddav-object.c
-index 1822068..a8b6de2 100644
---- a/src/modify-carddav-object.c
-+++ b/src/modify-carddav-object.c
-@@ -133,7 +133,6 @@ gboolean carddav_modify(carddav_settings* settings, carddav_error* error) {
- curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "REPORT");
- curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
- curl_easy_setopt(curl, CURLOPT_UNRESTRICTED_AUTH, 1);
-- curl_easy_setopt(curl, CURLOPT_POSTREDIR, CURL_REDIR_POST_ALL);
- res = curl_easy_perform(curl);
- curl_slist_free_all(http_header);
- http_header = NULL;
-@@ -231,7 +230,6 @@ gboolean carddav_modify(carddav_settings* settings, carddav_error* error) {
- strlen(settings->file));
- curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
- curl_easy_setopt(curl, CURLOPT_UNRESTRICTED_AUTH, 1);
-- curl_easy_setopt(curl, CURLOPT_POSTREDIR, CURL_REDIR_POST_ALL);
- curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "PUT");
- res = curl_easy_perform(curl);
- if (LOCKSUPPORT && lock_token) {
-@@ -430,7 +428,6 @@ gboolean carddav_modify_by_uri(carddav_settings* settings, carddav_error* error)
- strlen(settings->file));
- curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
- curl_easy_setopt(curl, CURLOPT_UNRESTRICTED_AUTH, 1);
-- curl_easy_setopt(curl, CURLOPT_POSTREDIR, CURL_REDIR_POST_ALL);
- curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "PUT");
- res = curl_easy_perform(curl);
- if (LOCKSUPPORT && lock_token) {
-diff --git a/src/options-carddav-server.c b/src/options-carddav-server.c
-index b774401..b44aae2 100644
---- a/src/options-carddav-server.c
-+++ b/src/options-carddav-server.c
-@@ -75,7 +75,6 @@ gboolean carddav_getoptions(CURL* curl, carddav_settings* settings, response* re
- curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "OPTIONS");
- curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
- curl_easy_setopt(curl, CURLOPT_UNRESTRICTED_AUTH, 1);
-- curl_easy_setopt(curl, CURLOPT_POSTREDIR, CURL_REDIR_POST_ALL);
- if (settings->debug) {
- curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
- }
-@@ -106,15 +105,12 @@ gboolean carddav_getoptions(CURL* curl, carddav_settings* settings, response* re
- }
- else if (
- (res == CURLE_SSL_CONNECT_ERROR ||
-- CURLE_PEER_FAILED_VERIFICATION ||
- CURLE_SSL_ENGINE_NOTFOUND ||
- CURLE_SSL_ENGINE_SETFAILED ||
- CURLE_SSL_CERTPROBLEM ||
- CURLE_SSL_CIPHER ||
- CURLE_SSL_CACERT ||
-- CURLE_SSL_CACERT_BADFILE ||
-- CURLE_SSL_CRL_BADFILE ||
-- CURLE_SSL_ISSUER_ERROR) && settings->usehttps) {
-+ CURLE_SSL_CRL_BADFILE ) && settings->usehttps) {
- error->code = -2;
- error->str = g_strdup(error_buf);
- }
diff --git a/redhat/dependencies/libcarddav/libcarddav-3.5.13.2.spec b/redhat/dependencies/libcarddav/libcarddav-3.5.13.2.spec
deleted file mode 100644
index 152f1cf90..000000000
--- a/redhat/dependencies/libcarddav/libcarddav-3.5.13.2.spec
+++ /dev/null
@@ -1,195 +0,0 @@
-#
-# spec file for package libcarddav (version 3.5.13-SRU)
-#
-# Copyright (c) 2014 Trinity Desktop Environment
-#
-# All modifications and additions to the file contributed by third parties
-# remain the property of their copyright owners, unless otherwise agreed
-# upon. The license for this file, and modifications and additions to the
-# file, is the same license as for the pristine package itself (unless the
-# license for the pristine package is not an Open Source License, in which
-# case the license is the MIT License). An "Open Source License" is a
-# license that conforms to the Open Source Definition (Version 1.9)
-# published by the Open Source Initiative.
-#
-# Please submit bugfixes or comments via http://www.trinitydesktop.org/
-#
-
-# TDE variables
-%define tde_epoch 1
-%define tde_version 3.5.13.2
-%define tde_pkg libcarddav
-%define tde_prefix /opt/trinity
-%define tde_includedir %{tde_prefix}/include
-%define tde_libdir %{tde_prefix}/%{_lib}
-
-%if 0%{?mdkversion} || 0%{?mgaversion} || 0%{?pclinuxos}
-%define libcarddav %{_lib}carddav
-%else
-%define libcarddav libcarddav
-%endif
-
-
-Name: trinity-%{tde_pkg}
-Epoch: %{tde_epoch}
-Version: 0.6.2
-Release: %{?!preversion:5}%{?preversion:0_%{preversion}}%{?dist}
-Summary: A portable CardDAV client implementation
-Group: System/Libraries
-URL: http://www.trinitydesktop.org/
-
-%if 0%{?suse_version}
-License: GPL-2.0+
-%else
-License: GPLv2+
-%endif
-
-#Vendor: Trinity Deskio
-#Packager: Francois Andriot <francois.andriot@free.fr>
-
-Prefix: /usr
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-Source0: libcarddav_0.6.2-2debian2.tar.gz
-
-BuildRequires: make
-BuildRequires: libtool
-
-# CURL support
-%if 0%{?fedora} || 0%{?rhel} >= 6 || 0%{?suse_version} || 0%{?mgaversion} || 0%{?mdkversion}
-%define libcurl_devel libcurl-devel
-%else
-# Specific CURL version for TDE on RHEL 5 (and older)
-%define libcurl_devel trinity-libcurl-devel
-%endif
-%{?libcurl_devel:BuildRequires: %{libcurl_devel}}
-
-# GTK2 support
-%if 0%{?rhel} == 4
-BuildRequires: evolution28-gtk2-devel
-%else
-BuildRequires: glib2-devel
-BuildRequires: gtk2-devel
-%endif
-
-%description
-Libcarddav is a portable CardDAV client implementation originally developed for the Trinity PIM suite.
-It incorporates full list, get, add, modify, and delete functionality per the latest CardDAV standards.
-Build dependencies are minimal, requiring only libcurl.
-
-##########
-
-%package -n %{libcarddav}0
-Summary: A portable CardDAV client implementation
-Group: System/Libraries
-
-Obsoletes: trinity-libcarddav < %{?epoch:%{epoch}:}%{version}-%{release}
-Provides: trinity-libcarddav = %{?epoch:%{epoch}:}%{version}-%{release}
-Provides: libcarddav = %{?epoch:%{epoch}:}%{version}-%{release}
-
-%description -n %{libcarddav}0
-Libcarddav is a portable CardDAV client implementation originally developed for the Trinity PIM suite.
-It incorporates full list, get, add, modify, and delete functionality per the latest CardDAV standards.
-Build dependencies are minimal, requiring only libcurl.
-
-%files -n %{libcarddav}0
-%defattr(-,root,root,-)
-%{_libdir}/libcarddav.so.0
-%{_libdir}/libcarddav.so.0.0.6
-
-%post -n %{libcarddav}0
-/sbin/ldconfig
-
-%postun -n %{libcarddav}0
-/sbin/ldconfig
-
-
-##########
-
-%package -n %{libcarddav}-devel
-Summary: A portable CardDAV client implementation (Development Files)
-Group: Development/Libraries/Other
-Requires: %{libcarddav}0 = %{?epoch:%{epoch}:}%{version}-%{release}
-%{?libcurl_devel:Requires: %{libcurl_devel}}
-Requires: glib2-devel
-
-Obsoletes: trinity-libcarddav-devel < %{version}-%{release}
-Provides: trinity-libcarddav-devel = %{version}-%{release}
-Provides: libcarddav-devel = %{?epoch:%{epoch}:}%{version}-%{release}
-
-%description -n %{libcarddav}-devel
-Libcarddav is a portable CardDAV client implementation originally developed for the Trinity PIM suite.
-It incorporates full list, get, add, modify, and delete functionality per the latest CardDAV standards.
-Build dependencies are minimal, requiring only libcurl.
-
-This package contains the development files.
-
-%files -n %{libcarddav}-devel
-%defattr(-,root,root,-)
-%{_includedir}/libcarddav/
-%{_libdir}/libcarddav.la
-%{_libdir}/libcarddav.so
-%{_libdir}/pkgconfig/libcarddav.pc
-
-%post -n %{libcarddav}-devel
-/sbin/ldconfig
-
-%postun -n %{libcarddav}-devel
-/sbin/ldconfig
-
-##########
-
-%if 0%{?pclinuxos} || 0%{?suse_version} && 0%{?opensuse_bs} == 0
-%debug_package
-%endif
-
-##########
-
-%prep
-%setup -q -n libcarddav-%{version}
-%__sed -i "src/get-carddav-report.c" -e "89s/return TRUE/return NULL/"
-autoreconf --force --install --symlink
-
-
-%build
-unset QTDIR QTINC QTLIB
-
-# CFLAGS required if CURL is installed on /opt/trinity, e.g. RHEL 5
-export CFLAGS="-I%{tde_includedir} -L%{tde_libdir} ${RPM_OPT_FLAGS}"
-export PKG_CONFIG_PATH="%{tde_libdir}/pkgconfig"
-
-# RHEL4 stuff
-if [ -d /usr/evolution28 ]; then
- export PKG_CONFIG_PATH="/usr/evolution28/%{_lib}/pkgconfig:${PKG_CONFIG_PATH}"
-fi
-
-%configure \
- --includedir=%{_includedir} \
- --libdir=%{_libdir} \
- \
- --disable-dependency-tracking
-
-# FIXME: bad libtool ??
-%if 0%{?rhel} == 4 || 0%{?rhel} == 5
-%__make %{?_smp_mflags} LIBTOOL=/usr/bin/libtool
-%else
-%__make %{?_smp_mflags}
-%endif
-
-
-%install
-%__rm -rf %{buildroot}
-%__make install DESTDIR=%{buildroot} LIBTOOL=/usr/bin/libtool
-
-# Unwanted files
-%__rm -f %{buildroot}%{_libdir}/libcarddav.a
-
-# Fix include location
-%__mv -f "%{?buildroot}%{_includedir}/libcarddav-0.6.1" "%{?buildroot}%{_includedir}/libcarddav"
-
-
-%clean
-%__rm -rf %{buildroot}
-
-
-%changelog
diff --git a/redhat/dependencies/libcarddav/libcarddav-14.0.0.spec b/redhat/dependencies/libcarddav/libcarddav.spec
index 27e23795e..aa6a9735c 100644
--- a/redhat/dependencies/libcarddav/libcarddav-14.0.0.spec
+++ b/redhat/dependencies/libcarddav/libcarddav.spec
@@ -18,7 +18,7 @@
# TDE variables
%define tde_epoch 2
%if "%{?tde_version}" == ""
-%define tde_version 14.0.0
+%define tde_version 14.1.0
%endif
%define tde_pkg libcarddav
%define tde_prefix /opt/trinity
@@ -54,8 +54,8 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Source0: %{name}-%{tde_version}%{?preversion:~%{preversion}}.tar.gz
-Patch1: libcarddav-14.0.1-rhel5.patch
-
+BuildRequires: cmake >= 2.8
+BuildRequires: gcc-c++
BuildRequires: make
BuildRequires: libtool
@@ -100,6 +100,7 @@ Build dependencies are minimal, requiring only libcurl.
%defattr(-,root,root,-)
%{_libdir}/libcarddav.so.0
%{_libdir}/libcarddav.so.0.0.6
+%{_docdir}/libcarddav/
%post -n %{libcarddav}0
/sbin/ldconfig
@@ -151,43 +152,49 @@ This package contains the development files.
%prep
%setup -q -n %{name}-%{tde_version}%{?preversion:~%{preversion}}
-%if 0%{?rhel} == 5
-%patch1 -p1 -b .ftbfs
-%endif
-
-# Fix empty ChangeLog cause invalid macro in 'configure.ac'
-echo "%{name} (%{version})" >ChangeLog
-
-autoreconf -fiv
%build
unset QTDIR QTINC QTLIB
+export PATH="%{tde_bindir}:${PATH}"
-# CFLAGS required if CURL is installed on /opt/trinity, e.g. RHEL 5
-export CFLAGS="-I%{tde_includedir} -L%{tde_libdir} ${RPM_OPT_FLAGS}"
-export PKG_CONFIG_PATH="%{tde_libdir}/pkgconfig"
-
-# RHEL4 stuff
-if [ -d /usr/evolution28 ]; then
- export PKG_CONFIG_PATH="/usr/evolution28/%{_lib}/pkgconfig:${PKG_CONFIG_PATH}"
+if ! rpm -E %%cmake|grep -q "cd build"; then
+ %__mkdir_p build
+ cd build
fi
-%configure \
- --includedir=%{_includedir} \
- --libdir=%{_libdir} \
+%cmake \
+ -DCMAKE_BUILD_TYPE="RelWithDebInfo" \
+ -DCMAKE_C_FLAGS="${RPM_OPT_FLAGS} -DNDEBUG" \
+ -DCMAKE_CXX_FLAGS="${RPM_OPT_FLAGS} -DNDEBUG" \
+ -DCMAKE_SKIP_RPATH=OFF \
+ -DCMAKE_VERBOSE_MAKEFILE=ON \
+ -DWITH_GCC_VISIBILITY=OFF \
\
- --disable-dependency-tracking
+ -DCMAKE_INSTALL_PREFIX="%{_prefix}" \
+ -DSHARE_INSTALL_PREFIX="%{_datadir}" \
+ \
+ -DWITH_ALL_OPTIONS=ON \
+ -DWITH_GCC_VISIBILITY=ON \
+ \
+ -DBUILD_ALL=ON \
+ -DBUILD_DOC=ON \
+ -DBUILD_TRANSLATIONS=ON \
+ \
+ ..
-%__make %{?_smp_mflags}
+%__make %{?_smp_mflags} || %__make
%install
%__rm -rf %{buildroot}
-%__make install DESTDIR=%{buildroot}
+%__make install DESTDIR=%{buildroot} -C build
-# Unwanted files
-%__rm -f %{buildroot}%{_libdir}/libcarddav.a
+# Fix doc directory
+%if "%{_docdir}" != "%{_datadir}/doc"
+%__mkdir_p "%{?buildroot}/%{_docdir}"
+%__mv -f "%{?buildroot}/%{_datadir}/doc/libcarddav" "%{?buildroot}/%{_docdir}/libcarddav"
+%endif
%clean