Skip to content

Commit

Permalink
Merge branch 'cleanup_build' into 'master'
Browse files Browse the repository at this point in the history
General build clean up. Contributes to JB#51077

See merge request mer-core/telepathy-gabble!5
  • Loading branch information
Matti Kosola committed Oct 14, 2020
2 parents 6f12c7c + d632f2b commit f154fcb
Show file tree
Hide file tree
Showing 9 changed files with 145 additions and 155 deletions.
@@ -1,4 +1,4 @@
From c082ab87c291a555f212ec07ff2f9d45ffd1ba6d Mon Sep 17 00:00:00 2001
From 602f786c7d33c65a7f9ef13bd4b9670f207abc5d Mon Sep 17 00:00:00 2001
From: John Brooks <john.brooks@jollamobile.com>
Date: Tue, 10 Dec 2013 19:45:53 -0700
Subject: [PATCH] Change default keepalive-interval to 2.5 minutes
Expand All @@ -11,7 +11,7 @@ mobile, and seems more frequent than actually necessary. An interval of
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/protocol.c b/src/protocol.c
index deeaa8d..77a20f2 100644
index deeaa8d9e..77a20f27d 100644
--- a/src/protocol.c
+++ b/src/protocol.c
@@ -158,7 +158,7 @@ static TpCMParamSpec jabber_params[] = {
Expand All @@ -24,5 +24,5 @@ index deeaa8d..77a20f2 100644

{ TP_PROP_CONNECTION_INTERFACE_CONTACT_LIST_DOWNLOAD_AT_CONNECTION,
--
1.8.3.1
2.28.0

23 changes: 0 additions & 23 deletions rpm/0001-Disable-parallel-build-for-extensions-directory.patch

This file was deleted.

@@ -1,4 +1,4 @@
From aaf8532e1512a5e9340a33c3f82c16e9dd8b34c6 Mon Sep 17 00:00:00 2001
From b6d3b6ce1e2cafc5a290740c24c6f6a9d6d6b34e Mon Sep 17 00:00:00 2001
From: Islam Amer <islam.amer@jollamobile.com>
Date: Wed, 30 Apr 2014 00:30:43 +0300
Subject: [PATCH] switch to using gireactor to work with new gi based
Expand All @@ -10,7 +10,7 @@ Subject: [PATCH] switch to using gireactor to work with new gi based
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/twisted/servicetest.py b/tests/twisted/servicetest.py
index 31c00f4..adb3030 100644
index 31c00f476..adb303051 100644
--- a/tests/twisted/servicetest.py
+++ b/tests/twisted/servicetest.py
@@ -3,9 +3,9 @@
Expand All @@ -26,7 +26,7 @@ index 31c00f4..adb3030 100644
import time
import os
diff --git a/tests/twisted/test-helper.py b/tests/twisted/test-helper.py
index 4909a96..5fb5e8e 100644
index 4909a9611..5fb5e8e3e 100644
--- a/tests/twisted/test-helper.py
+++ b/tests/twisted/test-helper.py
@@ -18,8 +18,8 @@ Once your'e done, the test code is written to a file called test.dump.
Expand All @@ -41,5 +41,5 @@ index 4909a96..5fb5e8e 100644
from gabbletest import EventTest, run

--
1.9.0
2.28.0

9 changes: 5 additions & 4 deletions rpm/nemo-tests-dir-fix.patch
@@ -1,7 +1,8 @@
diff -Naur telepathy-gabble-0.17.1/configure.ac telepathy-gabble-0.17.1-tests/configure.ac
--- telepathy-gabble-0.17.1/configure.ac 2012-09-11 13:51:59.000000000 +0000
+++ telepathy-gabble-0.17.1-tests/configure.ac 2013-04-08 07:26:00.009864418 +0000
@@ -184,7 +184,7 @@
diff --git a/configure.ac b/configure.ac
index 0b40754fd..0b979fbba 100644
--- a/configure.ac
+++ b/configure.ac
@@ -185,7 +185,7 @@ if test x$installed_tests = xyes; then
fi
AM_CONDITIONAL([ENABLE_INSTALLED_TESTS], [test "x$installed_tests" = xyes])

Expand Down
2 changes: 1 addition & 1 deletion rpm/telepathy-gabble.changes
Expand Up @@ -3,7 +3,7 @@
- Add 0.17.3-fix-fdo-61792.patch adapted from master to fix a build failure
- Add 0001-Disable-parallel-build-for-extensions-directory.patch to fix occasional build failures

* Tue Apr 8 2013 Reto Zingg <reto.zingg@jollamobile.com> - 0.17.1
* Mon Apr 8 2013 Reto Zingg <reto.zingg@jollamobile.com> - 0.17.1
- add -tests package for automated testing

* Thu Oct 04 2012 Marko Saukko <marko.saukko@jollamobile.com> - 0.17.1
Expand Down
114 changes: 53 additions & 61 deletions rpm/telepathy-gabble.spec
@@ -1,46 +1,42 @@
Name: telepathy-gabble

Summary: A Jabber/XMPP connection manager
Version: 0.18.4
Release: 1
License: LGPLv2+ and BSD
License: LGPLv2+
URL: https://telepathy.freedesktop.org/
Source0: %{name}-%{version}.tar.gz
Source1: INSIGNIFICANT
Source2: mktests.sh
Source0: %{name}-%{version}.tar.bz2
Source1: mktests.sh
Source2: INSIGNIFICANT
Patch0: nemo-tests-dir-fix.patch
Patch1: 0001-Disable-parallel-build-for-extensions-directory.patch
Patch2: wocky-disable-gtkdoc.patch
Patch3: wocky-mem-leak.patch
Patch4: 0001-Change-default-keepalive-interval-to-2.5-minutes.patch
Patch5: 0001-switch-to-using-gireactor-to-work-with-new-gi-based-.patch
Patch6: 0001-xmpp-console-Explicitly-state-python-in-the-shebang.patch
Patch7: telepathy-gabble-0.18.4-python3.patch
Patch1: 0001-Change-default-keepalive-interval-to-2.5-minutes.patch
Patch2: 0002-switch-to-using-gireactor-to-work-with-new-gi-based-.patch
Patch3: 0001-xmpp-console-Explicitly-state-python-in-the-shebang.patch
Patch4: telepathy-gabble-0.18.4-python3.patch
Patch5: 0001-convert-tests-to-python3.patch
Patch6: wocky-Make-GTK-Docs-optional.patch
Patch7: wocky-fix-mem-leak.patch
Patch8: wocky-openssl-1.1-compat.patch
Patch9: 0001-convert-tests-to-python3.patch
Requires: telepathy-mission-control
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
BuildRequires: pkgconfig(dbus-1) >= 1.1.0
BuildRequires: pkgconfig(nice) >= 0.0.11
BuildRequires: pkgconfig(uuid)
BuildRequires: pkgconfig(sqlite3)
BuildRequires: pkgconfig(dbus-glib-1) >= 0.82
BuildRequires: pkgconfig(telepathy-glib) >= 0.19.9
BuildRequires: pkgconfig(glib-2.0) >= 2.32
BuildRequires: pkgconfig(gobject-2.0) >= 2.32
BuildRequires: pkgconfig(gthread-2.0) >= 2.32
BuildRequires: pkgconfig(gio-2.0) >= 2.32
BuildRequires: pkgconfig(glib-2.0) >= 2.44
BuildRequires: pkgconfig(gobject-2.0) >= 2.44
BuildRequires: pkgconfig(gthread-2.0) >= 2.44
BuildRequires: pkgconfig(gio-2.0) >= 2.44
BuildRequires: pkgconfig(gmodule-2.0) >= 2.32
BuildRequires: pkgconfig(libxslt)
BuildRequires: pkgconfig(libsoup-2.4)
BuildRequires: pkgconfig(libidn)
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(libiphb)
BuildRequires: python3-devel
BuildRequires: pkgconfig(sqlite3)
BuildRequires: pkgconfig(libsoup-2.4) >= 2.42
BuildRequires: pkgconfig(nice) >= 0.0.11
BuildRequires: pkgconfig(libxslt)
BuildRequires: pkgconfig(libiphb) >= 0.61.31
BuildRequires: ca-certificates
BuildRequires: python3-devel
BuildRequires: python3-twisted
BuildRequires: dbus-python3
Requires: telepathy-mission-control >= 5.5.0
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig

%description
A Jabber/XMPP connection manager, that handles single and multi-user
Expand All @@ -49,6 +45,7 @@ chats and voice calls.

%package doc
Summary: Documentation for %{name}
BuildArch: noarch
Requires: %{name} = %{version}-%{release}

%description doc
Expand All @@ -64,61 +61,55 @@ Requires: dbus-python3
Requires: python3-gobject

%description tests
The %{name}-tests package contains tests and
tests.xml for automated testing.
The %{name}-tests package contains tests and tests.xml for automated testing.


%prep
%setup -q -n %{name}-%{version}/%{name}

# nemo-tests-dir-fix.patch
%patch0 -p1
# 0001-Disable-parallel-build-for-extensions-directory.patch
# 0001-Change-default-keepalive-interval-to-2.5-minutes.patch
%patch1 -p1
cd lib/ext/wocky
# 0002-switch-to-using-gireactor-to-work-with-new-gi-based-.patch
%patch2 -p1
# 0001-xmpp-console-Explicitly-state-python-in-the-shebang.patch
%patch3 -p1
# wocky-openssl-1.1-compat.patch (for openssl compile errors)
%patch8 -p1
cd ../../..
# 0001-Change-default-keepalive-interval-to-2.5-minutes.patch
# telepathy-gabble-0.18.4-python3.patch
%patch4 -p1
# 0001-switch-to-using-gireactor-to-work-with-new-gi-based-.patch
# 0001-convert-tests-to-python3.patch
%patch5 -p1
# 0001-xmpp-console-Explicitly-state-python-in-the-shebang.patch

%__cp %{SOURCE1} tests/
%__cp %{SOURCE2} tests/

cd lib/ext/wocky
%patch6 -p1
# telepathy-gabble-0.18.4-python3.patch
%patch7 -p1
# 0001-convert-tests-to-python3.patch
%patch9 -p1

%__cp $RPM_SOURCE_DIR/mktests.sh tests/
%__cp $RPM_SOURCE_DIR/INSIGNIFICANT tests/
%__chmod 0755 tests/mktests.sh
%__chmod 0644 tests/INSIGNIFICANT
# wocky-openssl-1.1-compat.patch (for openssl compile errors)
%patch8 -p1

%build
%autogen --disable-submodules --no-configure
# launch Wocky's autogen.sh
cd lib/ext/wocky
%autogen --no-configure --disable-gtk-doc
%autogen --no-configure
cd ../../..
%autogen --disable-submodules --no-configure

%reconfigure --disable-static \
--enable-installed-tests
%configure --disable-static \
--disable-gtk-doc \
--enable-installed-tests \
--enable-is-a-phone \
--with-tls=openssl

make %{_smp_mflags}

tests/mktests.sh > tests/tests.xml
%make_build

%install
rm -rf %{buildroot}
%make_install

install -m 0644 tests/tests.xml $RPM_BUILD_ROOT/opt/tests/telepathy-gabble/tests.xml
install -m 0644 tests/INSIGNIFICANT $RPM_BUILD_ROOT/opt/tests/telepathy-gabble/INSIGNIFICANT
install -m 0644 tests/README $RPM_BUILD_ROOT/opt/tests/telepathy-gabble/README

install -m 0644 -t $RPM_BUILD_ROOT%{_docdir}/%{name}/ AUTHORS NEWS README
sh tests/mktests.sh > %{buildroot}/opt/tests/%{name}/tests.xml
install -m 0644 tests/INSIGNIFICANT %{buildroot}/opt/tests/%{name}/INSIGNIFICANT
install -m 0644 tests/README %{buildroot}/opt/tests/%{name}/README

%post -p /sbin/ldconfig

Expand All @@ -127,8 +118,8 @@ install -m 0644 -t $RPM_BUILD_ROOT%{_docdir}/%{name}/ AUTHORS NEWS README
%files
%defattr(-,root,root,-)
%license COPYING
%{_bindir}/%{name}-xmpp-console
%{_libexecdir}/%{name}
%{_bindir}/telepathy-gabble-xmpp-console
%dir %{_libdir}/telepathy/gabble-0
%dir %{_libdir}/telepathy/gabble-0/lib
%dir %{_libdir}/telepathy/gabble-0/plugins
Expand All @@ -143,7 +134,8 @@ install -m 0644 -t $RPM_BUILD_ROOT%{_docdir}/%{name}/ AUTHORS NEWS README

%files doc
%defattr(-,root,root,-)
%doc %{_docdir}/%{name}/
%doc AUTHORS NEWS README
%{_docdir}/%{name}/
%{_mandir}/man8/%{name}.8.gz

%files tests
Expand Down
71 changes: 71 additions & 0 deletions rpm/wocky-Make-GTK-Docs-optional.patch
@@ -0,0 +1,71 @@
From ca7a513154df04d9d44e93856358ad4f93637e19 Mon Sep 17 00:00:00 2001
From: "Ruslan N. Marchenko" <me@ruff.mobi>
Date: Thu, 23 Apr 2020 23:54:18 +0200
Subject: [PATCH] Make GTK Docs optional

---
autogen.sh | 2 +-
configure.ac | 6 ++++++
docs/Makefile.am | 2 ++
docs/reference/Makefile.am | 2 ++
4 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/autogen.sh b/autogen.sh
index 0d8e27d..76741cb 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,7 +1,7 @@
#!/bin/sh
set -e

-gtkdocize || exit 1
+which gtkdocize && ( gtkdocize || exit 1 ) || echo "EXTRA_DIST = " > gtk-doc.make

if test -n "$AUTOMAKE"; then
: # don't override an explicit user request
diff --git a/configure.ac b/configure.ac
index 779e90c..000daf7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -278,7 +278,13 @@ dnl To be used by tests and examples
WOCKY_CFLAGS='-I${top_builddir} -I${top_srcdir}'
AC_SUBST(WOCKY_CFLAGS)

+# check for gtk-doc
+m4_ifdef([GTK_DOC_CHECK], [
GTK_DOC_CHECK([1.17],[--flavour no-tmpl])
+],[
+AM_CONDITIONAL([ENABLE_GTK_DOC], false)
+])
+

AC_OUTPUT( Makefile \
wocky/Makefile \
diff --git a/docs/Makefile.am b/docs/Makefile.am
index f3ddc22..d216247 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -1 +1,3 @@
+if ENABLE_GTK_DOC
SUBDIRS = reference
+endif
diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am
index 2e1b628..2e679bb 100644
--- a/docs/reference/Makefile.am
+++ b/docs/reference/Makefile.am
@@ -2,6 +2,7 @@

# We require automake 1.6 at least.
AUTOMAKE_OPTIONS = 1.6
+if ENABLE_GTK_DOC

# This is a blank Makefile.am for using gtk-doc.
# Copy this to your project's API docs directory and modify the variables to
@@ -101,3 +102,4 @@ DISTCLEANFILES = wocky-sections.txt wocky.types
# Comment this out if you want your docs-status tested during 'make check'
#TESTS = $(GTKDOC_CHECK)

+endif #ENABLE_GTK_DOC
--
2.28.0

0 comments on commit f154fcb

Please sign in to comment.