2017-12-30 21:20:38 +01:00
|
|
|
#
|
|
|
|
# spec file for package c-toxcore
|
|
|
|
#
|
2024-02-05 08:45:11 +01:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2017-12-30 21:20:38 +01:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2018-10-09 09:25:21 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2017-12-30 21:20:38 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
# See also http://en.opensuse.org/openSUSE:Specfile_guidelines
|
2018-03-21 00:52:31 +01:00
|
|
|
%define _soversion 2
|
2017-12-30 21:20:38 +01:00
|
|
|
Name: c-toxcore
|
2022-06-26 15:07:32 +02:00
|
|
|
Version: 0.2.18
|
2017-12-30 21:20:38 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: Secure decentralized instant messaging application
|
2018-06-28 23:47:51 +02:00
|
|
|
License: GPL-3.0-only
|
2017-12-30 21:20:38 +01:00
|
|
|
Group: Productivity/Networking/Instant Messenger
|
2020-03-23 17:58:47 +01:00
|
|
|
URL: https://tox.chat/
|
2018-03-22 21:19:42 +01:00
|
|
|
Source0: https://github.com/TokTok/c-toxcore/archive/v%{version}.tar.gz#./%{name}-%{version}.tar.gz
|
2024-02-05 08:45:11 +01:00
|
|
|
Source1: %{name}-user.conf
|
|
|
|
Source2: %{name}.tmpfiles.d
|
2022-06-26 15:07:32 +02:00
|
|
|
# Dont't find right key at this time. :(
|
2024-02-05 08:45:11 +01:00
|
|
|
#Source3: https://github.com/TokTok/c-toxcore/releases/download/v%%{version}/%%{name}-%%{version}.tar.gz.asc
|
|
|
|
Source4: %{name}.keyring
|
2022-06-26 15:07:32 +02:00
|
|
|
Source10: https://github.com/camgunz/cmp/archive/v20/cmp-v20.tar.gz
|
2018-06-18 10:22:56 +02:00
|
|
|
BuildRequires: cmake
|
2017-12-30 21:20:38 +01:00
|
|
|
BuildRequires: gcc-c++
|
|
|
|
BuildRequires: libconfig-devel
|
|
|
|
BuildRequires: libopus-devel
|
|
|
|
BuildRequires: libsodium-devel
|
|
|
|
BuildRequires: libtool
|
|
|
|
BuildRequires: libvpx-devel
|
|
|
|
BuildRequires: pkgconfig
|
2024-02-05 08:45:11 +01:00
|
|
|
BuildRequires: sysuser-tools
|
2018-04-01 10:05:24 +02:00
|
|
|
BuildRequires: pkgconfig(systemd)
|
2018-04-09 01:34:13 +02:00
|
|
|
Requires(pre): shadow
|
2024-01-18 13:08:50 +01:00
|
|
|
Provides: bundled(cmp) = 20
|
2024-02-05 08:45:11 +01:00
|
|
|
%sysusers_requires
|
2017-12-30 21:20:38 +01:00
|
|
|
%{?systemd_requires}
|
|
|
|
|
|
|
|
%description
|
|
|
|
Project Tox, also known as Tox, is a FOSS instant messaging
|
|
|
|
application aimed to replace Skype.
|
|
|
|
With the rise of government monitoring programs,
|
|
|
|
Tox provides an easy to use application that allows you to connect
|
|
|
|
with friends and family without anyone else listening in.
|
|
|
|
While other big-name services require you to pay for features,
|
|
|
|
Tox is totally free and comes without advertising
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: Development files for %{name}
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Requires: %{name} = %{version}
|
|
|
|
Requires: libtoxcore%{_soversion} = %{version}
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
Development libraries and headers needed to build software using %{name}.
|
|
|
|
|
|
|
|
%package daemon
|
|
|
|
Summary: Bootstrap-daemon for toxcore
|
|
|
|
Group: Productivity/Networking/Instant Messenger
|
|
|
|
|
|
|
|
%description daemon
|
|
|
|
Bootstrap-daemon to dispose hashtable for toxcore.
|
|
|
|
|
|
|
|
%package -n libtoxcore%{_soversion}
|
|
|
|
Summary: Core library for toxcore
|
|
|
|
Group: System/Libraries
|
|
|
|
|
|
|
|
%description -n libtoxcore%{_soversion}
|
|
|
|
This are the Core library for toxcore.
|
|
|
|
|
|
|
|
%prep
|
2024-01-18 13:08:50 +01:00
|
|
|
%autosetup -p1
|
2022-06-26 15:07:32 +02:00
|
|
|
# install submodules
|
|
|
|
pushd third_party/cmp
|
2024-01-18 13:08:50 +01:00
|
|
|
tar -xvzf %{SOURCE10} --strip 1
|
2022-06-26 15:07:32 +02:00
|
|
|
popd
|
2017-12-30 21:20:38 +01:00
|
|
|
# change location of bootstrap bin
|
|
|
|
sed -ri 's:%{_prefix}/local/bin/tox-bootstrapd:%{_bindir}/tox-bootstrapd:g' other/bootstrap_daemon/tox-bootstrapd.service
|
|
|
|
# change user and of bootstrapd
|
|
|
|
sed -ri 's:User=tox-bootstrapd:User=tox:g' other/bootstrap_daemon/tox-bootstrapd.service
|
|
|
|
sed -ri 's:Group=tox-bootstrapd:Group=toxcmd:g' other/bootstrap_daemon/tox-bootstrapd.service
|
|
|
|
# change location of bootstrap kyes
|
|
|
|
sed -ri 's:%{_localstatedir}/lib/tox-bootstrapd/keys:%{_sysconfdir}/tox/bootstrapd/keys:g' other/bootstrap_daemon/tox-bootstrapd.conf
|
|
|
|
|
|
|
|
%build
|
2024-02-05 08:45:11 +01:00
|
|
|
# system user config
|
|
|
|
%sysusers_generate_pre %{SOURCE1} %{name} %{name}-user.conf
|
2024-01-18 13:08:50 +01:00
|
|
|
# SHARED_LIBS=ON produces a stray libmisc_tools.so which is not part of `make install`.
|
|
|
|
# SHARED_LIBS=OFF still produces libtoxcore.so.2, so... *shrug*
|
|
|
|
#
|
|
|
|
%cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} \
|
2018-06-18 10:22:56 +02:00
|
|
|
-DBUILD_TOXAV=ON \
|
|
|
|
-DMUST_BUILD_TOXAV=ON \
|
|
|
|
-DBOOTSTRAP_DAEMON=ON \
|
|
|
|
-DDHT_BOOTSTRAP=ON \
|
|
|
|
-DENABLE_STATIC=OFF \
|
2024-01-18 13:08:50 +01:00
|
|
|
-DBUILD_SHARED_LIBS:BOOL=OFF \
|
2018-06-18 10:22:56 +02:00
|
|
|
..
|
|
|
|
|
2024-01-18 13:08:50 +01:00
|
|
|
%cmake_build
|
2017-12-30 21:20:38 +01:00
|
|
|
|
|
|
|
%install
|
2024-01-18 13:08:50 +01:00
|
|
|
%cmake_install
|
2017-12-30 21:20:38 +01:00
|
|
|
|
2024-02-05 08:45:11 +01:00
|
|
|
# system user config
|
|
|
|
install -D -m 0644 %{SOURCE1} %{buildroot}%{_sysusersdir}/%{name}-user.conf
|
|
|
|
|
2017-12-30 21:20:38 +01:00
|
|
|
# Install dir /var/run/graylog2-server
|
|
|
|
install -d -m 0755 %{buildroot}%{_prefix}/lib/tmpfiles.d/
|
2024-02-05 08:45:11 +01:00
|
|
|
install -m 0644 %{SOURCE2} %{buildroot}%{_prefix}/lib/tmpfiles.d/tox-bootstrapd.conf
|
2017-12-30 21:20:38 +01:00
|
|
|
|
|
|
|
# Install dir /var/lib/tox-bootstrapd
|
|
|
|
install -d -m 0755 %{buildroot}%{_localstatedir}/lib/tox-bootstrapd/
|
|
|
|
# Install dir /etc/tox/bootstrapd/keys
|
|
|
|
install -d -m 0700 %{buildroot}%{_sysconfdir}/tox/bootstrapd/keys
|
|
|
|
|
|
|
|
# Install dir /etc and bootstrap-config
|
|
|
|
mkdir -p %{buildroot}/%{_sysconfdir}
|
|
|
|
install -D -m 0640 other/bootstrap_daemon/tox-bootstrapd.conf %{buildroot}%{_sysconfdir}/tox/bootstrapd/tox-bootstrapd.conf
|
|
|
|
|
|
|
|
# Install init-scripts
|
|
|
|
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
|
|
|
|
|
2024-02-05 08:45:11 +01:00
|
|
|
%pre daemon -f %{name}.pre
|
2017-12-30 21:20:38 +01:00
|
|
|
%service_add_pre tox-bootstrapd.service
|
|
|
|
|
|
|
|
%post daemon
|
|
|
|
%service_add_post tox-bootstrapd.service
|
|
|
|
systemd-tmpfiles --create %{_prefix}/lib/tmpfiles.d/tox-bootstrapd.conf
|
|
|
|
|
|
|
|
%post -n libtoxcore%{_soversion} -p /sbin/ldconfig
|
2018-06-18 10:22:56 +02:00
|
|
|
|
2017-12-30 21:20:38 +01:00
|
|
|
%preun daemon
|
|
|
|
%service_del_preun tox-bootstrapd.service
|
|
|
|
|
|
|
|
%postun daemon
|
|
|
|
%service_del_postun tox-bootstrapd.service
|
|
|
|
|
|
|
|
%postun -n libtoxcore%{_soversion} -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
%{_libdir}/*.so
|
|
|
|
%{_libdir}/pkgconfig/*.pc
|
|
|
|
%dir %{_includedir}/tox
|
|
|
|
%{_includedir}/tox/*
|
|
|
|
|
|
|
|
%files
|
2018-09-01 18:10:00 +02:00
|
|
|
%license LICENSE
|
2018-03-22 21:19:42 +01:00
|
|
|
%doc README.md DONATORS CHANGELOG.md
|
2017-12-30 21:20:38 +01:00
|
|
|
|
|
|
|
%files daemon
|
|
|
|
%dir %{_sysconfdir}/tox
|
|
|
|
%dir %{_sysconfdir}/tox/bootstrapd
|
2024-02-05 08:45:11 +01:00
|
|
|
%{_sysusersdir}/%{name}-user.conf
|
2017-12-30 21:20:38 +01:00
|
|
|
%config(noreplace) %{_sysconfdir}/tox/bootstrapd/tox-bootstrapd.conf
|
2022-06-26 15:07:32 +02:00
|
|
|
%{_datadir}/bash-completion/completions/tox-bootstrapd
|
2018-09-01 18:10:00 +02:00
|
|
|
%{_bindir}/DHT_bootstrap
|
2017-12-30 21:20:38 +01:00
|
|
|
%{_bindir}/tox-bootstrapd
|
|
|
|
%{_unitdir}/tox-bootstrapd.service
|
|
|
|
%{_tmpfilesdir}/tox-bootstrapd.conf
|
|
|
|
%{_sbindir}/rctox-bootstrapd
|
|
|
|
%dir %{_localstatedir}/lib/tox-bootstrapd
|
|
|
|
%dir %attr(0770,tox,toxcmd) %{_sysconfdir}/tox/bootstrapd/keys
|
|
|
|
|
|
|
|
%files -n libtoxcore%{_soversion}
|
|
|
|
%{_libdir}/libtoxcore.so.%{_soversion}*
|
|
|
|
|
|
|
|
%changelog
|