diff --git a/Makefile.packaging b/Makefile.packaging index 2336d94ee78b04ee923dbe5a8d509d72393fee0a..ce5c0d8512719b2781e6e7ed7e02baa8316b115f 100644 --- a/Makefile.packaging +++ b/Makefile.packaging @@ -114,6 +114,7 @@ package-all: package-debian_9 \ package-fedora_31 \ package-fedora_31_i386 \ package-rhel_8 \ + package-opensuse-leap_15.1 \ package-gentoo # Append the output of make-packaging-target to this Makefile diff --git a/client-gnome b/client-gnome index 31c7b8908cd35ffed77da7a8311c8fa729b08220..d06f5bdcee09d3131da3807d3e48d57d62246e7c 160000 --- a/client-gnome +++ b/client-gnome @@ -1 +1 @@ -Subproject commit 31c7b8908cd35ffed77da7a8311c8fa729b08220 +Subproject commit d06f5bdcee09d3131da3807d3e48d57d62246e7c diff --git a/daemon b/daemon index c6d8b6966868c822454b45dfd6b9eeb2b559ea85..7927f1a60188c20a98a276d031029c4cb69ff959 160000 --- a/daemon +++ b/daemon @@ -1 +1 @@ -Subproject commit c6d8b6966868c822454b45dfd6b9eeb2b559ea85 +Subproject commit 7927f1a60188c20a98a276d031029c4cb69ff959 diff --git a/docker/Dockerfile_opensuse-leap_15.1 b/docker/Dockerfile_opensuse-leap_15.1 new file mode 100644 index 0000000000000000000000000000000000000000..c0ad79c313ed36295a81052d32b537f1d62a8aca --- /dev/null +++ b/docker/Dockerfile_opensuse-leap_15.1 @@ -0,0 +1,83 @@ +FROM opensuse/leap +RUN zypper --non-interactive install dnf +RUN dnf clean all +RUN zypper --non-interactive lr +RUN zypper --non-interactive --gpg-auto-import-key refresh +RUN zypper --non-interactive lr +RUN zypper --non-interactive install -y dnf-command\(builddep\) rpmdevtools + +RUN zypper --non-interactive clean +RUN zypper --non-interactive up -y && \ + zypper --non-interactive install -y Mesa-dri-devel Mesa-dri && \ + zypper --non-interactive install -y libinput-devel && \ + zypper --non-interactive install -y \ + git \ + rpm-build \ + tar \ + make \ + autoconf \ + automake \ + cmake \ + speexdsp-devel \ + libpulse-devel \ + libcanberra-devel \ + libcurl-devel \ + libtool \ + libQt5DBus-devel \ + pcre-devel \ + yaml-cpp-devel \ + boost-devel \ + libdbus-c++-devel \ + libQt5DBus-devel \ + libXext-devel \ + libXfixes-devel \ + yasm \ + nasm \ + speex-devel \ + libgsm-devel \ + chrpath \ + check \ + astyle \ + uuid-devel \ + gettext-devel \ + gcc-c++ \ + which \ + alsa-lib-devel \ + systemd-devel \ + libuuid-devel \ + uuid-devel \ + gnutls-devel \ + libopus-devel \ + patch \ + jsoncpp-devel \ + webkit2gtk3-devel \ + libcryptopp-devel \ + libva-devel \ + libvdpau-devel \ + msgpack-devel \ + clutter-devel \ + openssl-devel \ + clutter-gtk-devel \ + libnma-devel \ + libcryptopp-devel \ + libdbus-c++-devel \ + libQt5DBus-devel \ + libexpat-devel \ + gnome-icon-theme-symbolic \ + libgsm-devel \ + gtk3-devel \ + libappindicator-devel \ + sqlite-devel \ + libQt5Sql-devel \ + libQt5Gui-devel \ + ffmpeg-4-libavutil-devel \ + gtk3-devel\ + qrencode-devel \ + python3-python-dateutil \ + libqt5-linguist-devel \ + libsndfile-devel \ + evolution-devel + +ADD scripts/build-package-opensuse-leap.sh /opt/build-package-opensuse-leap.sh + +CMD /opt/build-package-opensuse-leap.sh diff --git a/lrc b/lrc index 3357f53e2e25e5bb8263a2ff530fa0cfe9628c85..d81a548c2d898a13d7bd09c2a68550b3f43c4b2e 160000 --- a/lrc +++ b/lrc @@ -1 +1 @@ -Subproject commit 3357f53e2e25e5bb8263a2ff530fa0cfe9628c85 +Subproject commit d81a548c2d898a13d7bd09c2a68550b3f43c4b2e diff --git a/make-ring.py b/make-ring.py index 321936462b5c6d519a4a164b1d1e06d531f5c80a..c3e0b1f4f7745ff19df2148b470e29dd1c16c71b 100755 --- a/make-ring.py +++ b/make-ring.py @@ -35,7 +35,7 @@ PACMAN_BASED_DISTROS = [ ] ZYPPER_BASED_DISTROS = [ - 'opensuse', + 'opensuse-leap', ] APT_INSTALL_SCRIPT = [ diff --git a/packaging/rules/debian/rules b/packaging/rules/debian/rules index f1fbab0f711f91338f6a81f8fec0f34445734b96..8d932bd6eb8816a560eb0f37b4ae864a3ba0a3c1 100755 --- a/packaging/rules/debian/rules +++ b/packaging/rules/debian/rules @@ -52,7 +52,8 @@ override_dh_auto_configure: --disable-natpmp \ --enable-gnutls && \ make list && \ - make -j$(NO_CPUS) V=1 + make -j$(NO_CPUS) V=1 && \ + make -j$(NO_CPUS) .ffmpeg V=1 cd daemon && \ ./autogen.sh && \ ./configure \ diff --git a/packaging/rules/fedora/jami.spec b/packaging/rules/fedora/jami.spec index 138dd2e5f7dcbdc7d3c44d62f2fee1d469246f04..0de9130c6ce5ebc761fa361f9257d11ca600b1e9 100644 --- a/packaging/rules/fedora/jami.spec +++ b/packaging/rules/fedora/jami.spec @@ -105,7 +105,8 @@ cd %{_builddir}/ring-project/daemon/contrib/native && \ --disable-natpmp && \ make list && \ make fetch && \ - make -j4 V=1 + make -j4 V=1 && \ + make -j4 V=1 .ffmpeg cd %{_builddir}/ring-project/daemon && \ ./autogen.sh && \ diff --git a/packaging/rules/opensuse-leap/jami.spec b/packaging/rules/opensuse-leap/jami.spec new file mode 100644 index 0000000000000000000000000000000000000000..52b242713366e7756d067e5cf55a1176b3f7ab09 --- /dev/null +++ b/packaging/rules/opensuse-leap/jami.spec @@ -0,0 +1,206 @@ +%define name jami +%define version RELEASE_VERSION +%define release 0 + +Name: %{name} +Version: %{version} +Release: %{release}%{?dist} +Summary: Free software for distributed and secured communication. +Group: Applications/Internet +License: GPLv3+ +URL: https://jami.net/ +Source: jami_%{version}.tar.gz +Requires: jami-daemon = %{version} + +BuildRequires: make +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: cmake +BuildRequires: libcanberra-devel +BuildRequires: libtool +BuildRequires: pcre-devel +BuildRequires: yaml-cpp-devel +BuildRequires: boost-devel +BuildRequires: libXext-devel +BuildRequires: yasm +BuildRequires: speex-devel +BuildRequires: chrpath +BuildRequires: check +BuildRequires: astyle +BuildRequires: gettext-devel +BuildRequires: gcc-c++ +BuildRequires: which +BuildRequires: alsa-lib-devel +BuildRequires: systemd-devel +BuildRequires: libuuid-devel +BuildRequires: libXfixes-devel +BuildRequires: uuid-devel +BuildRequires: gnutls-devel +BuildRequires: jsoncpp-devel +BuildRequires: gcc-c++ +BuildRequires: gnome-icon-theme-symbolic +BuildRequires: clutter-gtk-devel +BuildRequires: clutter-devel +BuildRequires: glib2-devel +BuildRequires: gtk3-devel +BuildRequires: libnma-devel +BuildRequires: libva-devel +BuildRequires: libvdpau-devel + +%description +Jami is free software for universal communication which respects freedoms +and privacy of its users. +. +This package contains the desktop client: jami-gnome. + +%package daemon +Summary: Free software for distributed and secured communication - daemon + +%description daemon +Jami is free software for universal communication which respects freedoms +and privacy of its users. +. +This package contains the Jami daemon: dring. + +%prep +%setup -n ring-project + +%build +########################### +## Ring Daemon configure ## +########################### +mkdir -p daemon/contrib/native +cd %{_builddir}/ring-project/daemon/contrib/native && \ + ../bootstrap \ + --no-checksums \ + --disable-ogg \ + --disable-flac \ + --disable-vorbis \ + --disable-vorbisenc \ + --disable-speex \ + --disable-sndfile \ + --disable-gsm \ + --disable-speexdsp \ + --disable-natpmp && \ + make list && \ + make fetch && \ + make -j4 V=1 + +cd %{_builddir}/ring-project/daemon && \ + ./autogen.sh && \ + ./configure \ + --prefix=%{_prefix} \ + --libdir=%{_libdir} \ + --disable-shared + +############################# +## libringclient configure ## +############################# +cd %{_builddir}/ring-project/lrc && \ + mkdir build && \ + cd build && \ + cmake \ + -DRING_BUILD_DIR=%{_builddir}/ring-project/daemon/src \ + -DCMAKE_INSTALL_PREFIX=%{_prefix} \ + -DCMAKE_INSTALL_LIBDIR=%{_libdir} \ + -DCMAKE_BUILD_TYPE=Debug \ + .. + +############################ +## gnome client configure ## +############################ +cd %{_builddir}/ring-project/client-gnome && \ + mkdir build && \ + cd build && \ + cmake \ + -DCMAKE_INSTALL_PREFIX=%{_prefix} \ + -DCMAKE_INSTALL_LIBDIR=%{_libdir} \ + -DLibRingClient_PROJECT_DIR=%{_builddir}/ring-project/lrc \ + -DGSETTINGS_LOCALCOMPILE=OFF \ + .. + +####################### +## Ring Daemon build ## +####################### +make -C %{_builddir}/ring-project/daemon -j4 V=1 +pod2man %{_builddir}/ring-project/daemon/man/dring.pod > %{_builddir}/ring-project/daemon/dring.1 + +######################### +## libringclient build ## +######################### +make -C %{_builddir}/ring-project/lrc/build -j4 V=1 + +######################## +## gnome client build ## +######################## +make -C %{_builddir}/ring-project/client-gnome/build LDFLAGS="-lpthread" -j4 V=1 + + +%install +######################### +## Ring Daemon install ## +######################### +DESTDIR=%{buildroot} make -C daemon install +cp %{_builddir}/ring-project/daemon/dring.1 %{buildroot}/%{_mandir}/man1/dring.1 +rm -rfv %{buildroot}/%{_prefix}/include +rm -rfv %{buildroot}/%{_libdir}/*.a +rm -rfv %{buildroot}/%{_libdir}/*.la + +########################### +## libringclient install ## +########################### +DESTDIR=%{buildroot} make -C lrc/build install +rm -rfv %{buildroot}/%{_prefix}/include + +# This is a symlink, should be in -dev package +rm -v %{buildroot}/%{_libdir}/libringclient.so + +# cmake files +rm -rfv %{buildroot}/%{_libdir}/cmake + +########################## +## gnome client install ## +########################## +DESTDIR=%{buildroot} make -C client-gnome/build install +ln -sf %{_bindir}/jami %{buildroot}/%{_bindir}/ring.cx + +%files +%defattr(-,root,root,-) +%{_bindir}/jami +%{_bindir}/ring.cx +%{_bindir}/jami-gnome +%{_libdir}/libringclient*.so* +%{_datadir}/glib-2.0/schemas/net.jami.Jami.gschema.xml +%{_datadir}/applications/jami-gnome.desktop +%{_datadir}/jami-gnome/jami-gnome.desktop +%{_datadir}/icons/hicolor/scalable/apps/jami.svg +%{_datadir}/metainfo/jami-gnome.appdata.xml +%{_datadir}/libringclient/* +%{_datadir}/locale/* +%{_datadir}/sounds/jami-gnome/* +%doc %{_mandir}/man1/dring* + +%files daemon +%defattr(-,root,root,-) +%{_libdir}/ring/dring +%{_datadir}/ring/ringtones +%{_datadir}/dbus-1/services/* +%{_datadir}/dbus-1/interfaces/* + +%post +/sbin/ldconfig +/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : + +%postun +/sbin/ldconfig + +if [ $1 -eq 0 ] ; then + /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null + /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : +fi + +%posttrans + +/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : + +%changelog diff --git a/scripts/build-package-opensuse-leap.sh b/scripts/build-package-opensuse-leap.sh new file mode 100755 index 0000000000000000000000000000000000000000..999a948f22e9de75e30f99c83366dec0744bdf0f --- /dev/null +++ b/scripts/build-package-opensuse-leap.sh @@ -0,0 +1,51 @@ +#!/usr/bin/env bash +# +# Copyright (C) 2016-2019 Savoir-faire Linux Inc. +# +# Author: Alexandre Viau <alexandre.viau@savoirfairelinux.com> +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +# This script is used in the packaging containers to build packages on +# rpm-based distros. +# + +set -e + +# import the spec file +mkdir -p /opt/ring-project +cd /opt/ring-project +cp /opt/ring-project-ro/packaging/rules/opensuse-leap/jami.spec . + + +# place the source +mkdir -p /root/rpmbuild/SOURCES +cp /opt/ring-project-ro/jami_*.tar.gz /usr/src/packages/SOURCES + +# Set the version +sed -i "s/RELEASE_VERSION/${RELEASE_VERSION}/g" jami.spec +rpmdev-bumpspec --comment="Automatic nightly release" --userstring="Jenkins <ring@lists.savoirfairelinux.net>" jami.spec + +# install build deps +dnf builddep -y jami.spec || echo "ignoring dnf builddep failure" + + +# build the package +rpmbuild -ba jami.spec + +# move to output +mv /usr/src/packages/RPMS/*/* /opt/output +touch /opt/output/.packages-built +chown -R ${CURRENT_UID}:${CURRENT_UID} /opt/output + diff --git a/scripts/deploy-packages.sh b/scripts/deploy-packages.sh index f77f2ebf2e34eeff84eb0569634eb04c7b240c61..9aa081e73f0089a0ce73502bbd7cccb2c8a3ca3e 100755 --- a/scripts/deploy-packages.sh +++ b/scripts/deploy-packages.sh @@ -211,7 +211,7 @@ function package() if [[ "${DISTRIBUTION:0:6}" == "debian" || "${DISTRIBUTION:0:6}" == "ubuntu" ]]; then package_deb - elif [[ "${DISTRIBUTION:0:6}" == "fedora" || "${DISTRIBUTION:0:4}" == "rhel" ]]; + elif [[ "${DISTRIBUTION:0:6}" == "fedora" || "${DISTRIBUTION:0:4}" == "rhel" || "${DISTRIBUTION:0:13}" == "opensuse-leap" ]]; then package_rpm else diff --git a/scripts/make-packaging-target.py b/scripts/make-packaging-target.py index c61d9fc0d92254d324b7e12d44192bbee05f12da..2bc957b064f274e1b15c88649af8d7a2b72002e6 100755 --- a/scripts/make-packaging-target.py +++ b/scripts/make-packaging-target.py @@ -356,7 +356,13 @@ def run_generate_all(parsed_args): "output_file": ".packages-built", "options": "--security-opt seccomp=./docker/profile-seccomp-fedora_28.json --privileged", }, - + #opensuse_leap + { + "distribution": "opensuse-leap_15.1", + "debian_packaging_override": "", + "output_file": ".packages-built", + "options": "--security-opt seccomp=./docker/profile-seccomp-fedora_28.json --privileged" + }, # Gentoo { "distribution": "gentoo",