From 6d5020148cd7b3b0534fdc795cfa5706da70effed0a622406f264073e3678353 Mon Sep 17 00:00:00 2001 From: Eric Schirra Date: Mon, 18 Jun 2018 08:22:56 +0000 Subject: [PATCH] Accepting request 617451 from home:ecsos:messenger:tox - switch building from autotools to cmake, so uTox can build. See https://github.com/uTox/uTox/issues/1205 OBS-URL: https://build.opensuse.org/request/show/617451 OBS-URL: https://build.opensuse.org/package/show/server:messaging/c-toxcore?expand=0&rev=10 --- c-toxcore.changes | 6 ++++++ c-toxcore.spec | 50 ++++++++++++----------------------------------- 2 files changed, 19 insertions(+), 37 deletions(-) diff --git a/c-toxcore.changes b/c-toxcore.changes index f40b9c3..4291917 100644 --- a/c-toxcore.changes +++ b/c-toxcore.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed May 16 17:33:08 UTC 2018 - ecsos@opensuse.org + +- switch building from autotools to cmake, so uTox can build. + See https://github.com/uTox/uTox/issues/1205 + ------------------------------------------------------------------- Wed Apr 18 16:08:19 UTC 2018 - ecsos@opensuse.org diff --git a/c-toxcore.spec b/c-toxcore.spec index 2e4d9a0..8f6c1f0 100644 --- a/c-toxcore.spec +++ b/c-toxcore.spec @@ -29,8 +29,7 @@ Url: https://tox.chat/ Source0: https://github.com/TokTok/c-toxcore/archive/v%{version}.tar.gz#./%{name}-%{version}.tar.gz Source1: %{name}.tmpfiles.d Source2: https://github.com/TokTok/c-toxcore/releases/download/v%{version}/%{name}-%{version}.tar.gz.asc -BuildRequires: autoconf -BuildRequires: automake +BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: libconfig-devel BuildRequires: libopus-devel @@ -55,9 +54,7 @@ Tox is totally free and comes without advertising Summary: Development files for %{name} Group: Development/Libraries/C and C++ Requires: %{name} = %{version} -Requires: libtoxav%{_soversion} = %{version} Requires: libtoxcore%{_soversion} = %{version} -Requires: libtoxencryptsave%{_soversion} = %{version} %description devel Development libraries and headers needed to build software using %{name}. @@ -69,13 +66,6 @@ Group: Productivity/Networking/Instant Messenger %description daemon Bootstrap-daemon to dispose hashtable for toxcore. -%package -n libtoxav%{_soversion} -Summary: Audio/Video library for toxcore -Group: System/Libraries - -%description -n libtoxav%{_soversion} -This are the Audio/Video library for toxcore. - %package -n libtoxcore%{_soversion} Summary: Core library for toxcore Group: System/Libraries @@ -83,12 +73,6 @@ Group: System/Libraries %description -n libtoxcore%{_soversion} This are the Core library for toxcore. -%package -n libtoxencryptsave%{_soversion} -Summary: Encrypt Save library for toxcore -Group: System/Libraries - -%description -n libtoxencryptsave%{_soversion} -This are the Encrypt Save library for toxcore. %prep %setup -q @@ -101,15 +85,20 @@ sed -ri 's:Group=tox-bootstrapd:Group=toxcmd:g' other/bootstrap_daemon/tox-boots sed -ri 's:%{_localstatedir}/lib/tox-bootstrapd/keys:%{_sysconfdir}/tox/bootstrapd/keys:g' other/bootstrap_daemon/tox-bootstrapd.conf %build -autoreconf -i -%configure \ - --enable-daemon \ - --enable-dht-bootstrap \ - --disable-static +pushd build +cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} \ + -DBUILD_TOXAV=ON \ + -DMUST_BUILD_TOXAV=ON \ + -DBOOTSTRAP_DAEMON=ON \ + -DDHT_BOOTSTRAP=ON \ + -DENABLE_STATIC=OFF \ + .. + make %{?_smp_mflags} +popd %install -%make_install +make install -C build PREFIX=%_prefix DESTDIR=%buildroot # Install dir /var/run/graylog2-server install -d -m 0755 %{buildroot}%{_prefix}/lib/tmpfiles.d/ @@ -129,9 +118,6 @@ mkdir -p %{buildroot}/%{_sbindir} install -D -m 0644 other/bootstrap_daemon/tox-bootstrapd.service %{buildroot}%{_unitdir}/tox-bootstrapd.service ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rctox-bootstrapd -# get rid of libtool files -rm %{buildroot}%{_libdir}/*.la - %pre daemon %service_add_pre tox-bootstrapd.service # create tox-bootstrapd group @@ -148,18 +134,15 @@ fi %service_add_post tox-bootstrapd.service systemd-tmpfiles --create %{_prefix}/lib/tmpfiles.d/tox-bootstrapd.conf -%post -n libtoxav%{_soversion} -p /sbin/ldconfig %post -n libtoxcore%{_soversion} -p /sbin/ldconfig -%post -n libtoxencryptsave%{_soversion} -p /sbin/ldconfig + %preun daemon %service_del_preun tox-bootstrapd.service %postun daemon %service_del_postun tox-bootstrapd.service -%postun -n libtoxav%{_soversion} -p /sbin/ldconfig %postun -n libtoxcore%{_soversion} -p /sbin/ldconfig -%postun -n libtoxencryptsave%{_soversion} -p /sbin/ldconfig %files devel %{_libdir}/*.so @@ -175,7 +158,6 @@ systemd-tmpfiles --create %{_prefix}/lib/tmpfiles.d/tox-bootstrapd.conf %dir %{_sysconfdir}/tox %dir %{_sysconfdir}/tox/bootstrapd %config(noreplace) %{_sysconfdir}/tox/bootstrapd/tox-bootstrapd.conf -%{_bindir}/DHT_bootstrap %{_bindir}/tox-bootstrapd %{_unitdir}/tox-bootstrapd.service %{_tmpfilesdir}/tox-bootstrapd.conf @@ -183,13 +165,7 @@ systemd-tmpfiles --create %{_prefix}/lib/tmpfiles.d/tox-bootstrapd.conf %dir %{_localstatedir}/lib/tox-bootstrapd %dir %attr(0770,tox,toxcmd) %{_sysconfdir}/tox/bootstrapd/keys -%files -n libtoxav%{_soversion} -%{_libdir}/libtoxav.so.%{_soversion}* - %files -n libtoxcore%{_soversion} %{_libdir}/libtoxcore.so.%{_soversion}* -%files -n libtoxencryptsave%{_soversion} -%{_libdir}/libtoxencryptsave.so.%{_soversion}* - %changelog