Репозиторий Sisyphus
Последнее обновление: 8 июля 2020 | Пакетов: 17697 | Посещений: 18851470
en ru br
Репозитории ALT

Группа :: Сети/Мгновенные сообщения
Пакет: ring-project

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

%define IF_ver_gt() %if "%(rpmvercmp '%1' '%2')" > "0"
%define IF_ver_gteq() %if "%(rpmvercmp '%1' '%2')" >= "0"
%define IF_ver_lt() %if "%(rpmvercmp '%2' '%1')" > "0"
%define IF_ver_lteq() %if "%(rpmvercmp '%2' '%1')" >= "0"
%define IF_ver_eq() %if "%(rpmvercmp '%1' '%2')" == "0"
%define IF_ver_not_gt() %if "%(rpmvercmp '%1' '%2')" <= "0"
%define IF_ver_not_gteq() %if "%(rpmvercmp '%1' '%2')" < "0"
%define IF_ver_not_lt() %if "%(rpmvercmp '%2' '%1')" <= "0"
%define IF_ver_not_lteq() %if "%(rpmvercmp '%2' '%1')" < "0"
%define IF_ver_not_eq() %if "%(rpmvercmp '%1' '%2')" != "0"

%{expand: %(sed 's,^%%,%%global ,' /usr/lib/rpm/macros.d/ubt)}
%define ubt_id %__ubt_branch_id

%ifarch %ix86
%set_verify_elf_method textrel=relaxed
%ifarch %arm
%set_verify_elf_method textrel=relaxed

%define rname ring-project
%define _libexecdir %prefix/libexec
%define builddir %_builddir/%name-%version
%define ring_sover 0
%define libring libring%ring_sover
%define ringclient_sover 1.0.0
%define libringclient libringclient%ringclient_sover

Name: ring-project
Version: 20190215
Release: alt1

Group: Networking/Instant messaging
Summary: SIP and IAX2 compatible softphone
Url: http://ring.cx/
License: GPLv3

PreReq(post,preun): alternatives >= 0.2
#Conflicts: sflphone sflphone-common
#Requires: %name-common >= %EVR

Source: %name-%version.tar
Patch1: alt-fix-linking.patch
Patch2: alt-pcre-include.patch
Patch3: alt-armh.patch

BuildRequires(pre): rpm-build-ubt
%IF_ver_gteq %ubt_id M90
BuildRequires: asio-devel
BuildRequires: cmake gcc-c++ glibc-devel autoconf-archive
BuildRequires: doxygen graphviz gtk-doc
BuildRequires: qt5-tools-devel
BuildRequires: chrpath
BuildRequires: libalsa-devel libdbus-c++-devel libgnutls-devel libgsm-devel
BuildRequires: libavdevice-devel libavformat-devel libswscale-devel libavutil-devel libavcodec-devel libavfilter-devel
BuildRequires: libssl-devel libgpg-error-devel libgcrypt-devel
#BuildRequires: libssl-devel-static
BuildRequires: libnettle-devel libpcre-devel libpulseaudio-devel libsamplerate-devel libsndfile-devel libvpx-devel
BuildRequires: libspeexdsp-devel libswscale-devel libudev-devel libupnp-devel libuuid-devel jsoncpp-devel
BuildRequires: zlib-devel libopus-devel libspeex-devel ilbc-devel libmsgpack-devel libx264-devel libx265-devel libva-devel libvdpau-devel
BuildRequires: libyaml-cpp-devel yasm perl-Pod-Usage cppunit-devel libgmp-devel libexpat-devel
BuildRequires: evolution-data-server-devel libclutter-gtk3-devel libnotify-devel libpixman-devel
BuildRequires: libXdmcp-devel libpng-devel libXxf86vm-devel libappindicator-gtk3-devel libwebkit2gtk-devel libqrencode-devel
BuildRequires: libcanberra-gtk3-devel

Ring is a Voice-over-IP software phone. We want it to be:
- user friendly (fast, sleek, easy to learn interface)
- professional grade (transfers, holds, optimal audio quality)
- fully compatible with Asterisk (SIP and IAX protocols)
- de-centralized call (P2P-DHT)
- customizable

As the SIP/audio daemon and the user interface are separate processes,
it is easy to provide different user interfaces. Ring comes with
various graphical user interfaces and even scripts to control the daemon from
the shell.

%package -n ring-daemon
Group: System/Servers
Summary: SIP and IAX2 compatible softphone daemon
%description -n ring-daemon
As the SIP/audio daemon and the user interface are separate processes,
it is easy to provide different user interfaces. Ring comes with
various graphical user interfaces and even scripts to control the daemon from
the shell.

%package -n ring-client-gnome
Summary: Ring client written in GTK+
Group: Networking/Instant messaging
Requires: ring-daemon
%description -n ring-client-gnome
Ring-client-gnome is a Ring client written in GTK+. It uses libRingClient to
communicate with the Ring daemon and for all of the underlying models and their
logic. Ideally ring-client-gnome should only contain UI related code and any
wrappers necessary for interacting with libRingClient.

%package common
BuildArch: noarch
Summary: Common %name files
Group: System/Configuration/Other
Conflicts: ring-daemon < 3
Provides: ring-daemon-common = 4.1
Obsoletes: ring-daemon-common < 4.1
Provides: libringclient-common = 1.1
Obsoletes: libringclient-common < 1.1
%description common
Common %name files

%package -n %libring
Group: System/Libraries
Summary: %name library
Requires: %name-common >= %EVR
%description -n %libring
%name library.

%package -n %libringclient
Group: System/Libraries
Summary: Ring client library
Requires: %name-common >= %EVR
%description -n %libringclient
Client library for GNU Ring.

%package devel
Group: Development/Other
Summary: Development files for %name
Provides: ring-daemon-devel = %version-%release
Provides: libringclient-devel = %version-%release
%description devel
The %name-devel package contains libraries and header files for
developing applications that use %name.

%package devel-static
Group: Development/Other
Summary: Development files for %name
Requires: %name-devel
Provides: ring-daemon-devel-static = %version-%release
%description devel-static
The %name-devel package contains static libraries for
developing applications that use %name.

%setup -qn %name-%version
%patch1 -p1
%patch2 -p1
%patch3 -p1

# don't build internal vpx

rm -rf daemon/contrib/src/vpx
rm -rf daemon/contrib/tarballs/libvpx*.tar.gz
sed -i '/DEPS_ffmpeg/s/vpx//' daemon/contrib/src/ffmpeg/rules.mak

%add_optflags %optflags_shared -Wno-error=return-type
export CXXFLAGS="%optflags"
mkdir -p daemon/contrib/native
pushd daemon/contrib/native
../bootstrap \
   --no-checksums \
   --disable-downloads \
   --disable-ogg \
   --disable-flac \
   --disable-vorbis \
   --disable-vorbisenc \
   --disable-speex \
   --disable-sndfile \
   --disable-speexdsp \
   --disable-gsm \
   --disable-natpmp \
make list
pushd daemon
%configure \
   --with-libilbc \
   --with-opus \
   --enable-video \
   --enable-ipv6 \
   --without-jack \
   CFLAGS="%optflags" \
   LDFLAGS="-Wl,-z,defs" \

pushd lrc
%cmake \
   -DRING_BUILD_DIR=%builddir/daemon/src \
[ -e build ] || ln -s BUILD build
pushd BUILD

pushd client-gnome
%cmake \
   -DLibRingClient_PROJECT_DIR=%builddir/lrc \
pushd BUILD

%makeinstall -C daemon
make install -C lrc/BUILD DESTDIR=%buildroot
make install -C client-gnome/BUILD DESTDIR=%buildroot

chrpath --delete %buildroot/%_libdir/ring/dring

# install alternatives

mkdir -p %buildroot/%_bindir/
rm -f %buildroot/%_bindir/ring{,.cx}
ln -s /bin/true %buildroot/%_bindir/ring.cx
ln -s ring.cx %buildroot/%_bindir/ring
echo >%buildroot/%_bindir/ring-client-dummy <<__EOF__
echo "Ring not found" >&2
exit 1
chmod 0755 %buildroot/%_bindir/ring-client-dummy
install -d %buildroot/%_sysconfdir/alternatives/packages.d
cat > %buildroot/%_sysconfdir/alternatives/packages.d/%name <<__EOF__
%_bindir/ring.cx       %_bindir/ring-client-dummy      1
cat > %buildroot/%_sysconfdir/alternatives/packages.d/ring-client-gnome <<__EOF__
%_bindir/ring.cx       %_bindir/gnome-ring      10

%if "%_lib" == "lib64"
sed -i 's|/usr/lib|/usr/lib64|' %buildroot/usr/lib/cmake/LibRingClient/LibRingClientConfig.cmake
mkdir -p %buildroot/%_libdir
mv %buildroot/usr/lib/* %buildroot/%_libdir/

%find_lang lrc --with-qt
%find_lang ring-client-gnome

%files common

%files -n ring-daemon
%doc daemon/AUTHORS daemon/COPYING daemon/README
%config %_sysconfdir/alternatives/packages.d/%name
%ghost %_bindir/ring

%files -n ring-client-gnome -f ring-client-gnome.lang
%config %_sysconfdir/alternatives/packages.d/ring-client-gnome

%files -n %libring
%doc daemon/AUTHORS daemon/COPYING daemon/README

%files -n %libringclient -f lrc.lang
%doc lrc/COPYING

%files devel

%files devel-static


Полный changelog можно просмотреть здесь

дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin