]> git.pld-linux.org Git - packages/bzrtp.git/blob - bzrtp.spec
ad251df41a5ebf6bab58da0a595d4a3351b3f1fa
[packages/bzrtp.git] / bzrtp.spec
1 #
2 # Conditional build:
3 %bcond_without  static_libs     # static library
4 #
5 Summary:        Open source implementation of ZRTP keys exchange protocol
6 Summary(pl.UTF-8):      Mająca otwarte źródła implementacja protokołu wymiany kluczy ZRTP
7 Name:           bzrtp
8 Version:        5.2.109
9 Release:        1
10 License:        GPL v3+
11 Group:          Libraries
12 #Source0Download: https://gitlab.linphone.org/BC/public/bzrtp/tags
13 Source0:        https://gitlab.linphone.org/BC/public/bzrtp/-/archive/%{version}/%{name}-%{version}.tar.bz2
14 # Source0-md5:  0f0cc76288315f7d100c2d5b6efa38f5
15 Patch0:         %{name}-static.patch
16 Patch1:         %{name}-resetBzrtpContext.patch
17 URL:            http://www.linphone.org/
18 BuildRequires:  CUnit
19 BuildRequires:  bctoolbox-devel >= 4.4.0
20 BuildRequires:  cmake >= 3.1
21 BuildRequires:  libxml2-devel >= 2.0
22 BuildRequires:  pkgconfig
23 BuildRequires:  rpmbuild(macros) >= 1.748
24 BuildRequires:  sqlite3-devel >= 3.6.0
25 Requires:       bctoolbox >= 4.4.0
26 Requires:       sqlite3 >= 3.6.0
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %description
30 bzrtp is an opensource implementation of ZRTP keys exchange protocol. 
31 The library written in C 89 is fully portable and can be executed on
32 many platforms including both ARM processor and x86. 
33
34 %description -l pl.UTF-8
35 bzrtp to mająca otwarte źródła implementacja protokołu wymiany kluczy
36 ZRTP. Napisana w C 89 biblioteka jest w pełni przenośna i może być
37 wykonywana na wielu platformach, w tym ARM oraz x86.
38
39 %package devel
40 Summary:        Header file for bzrtp library
41 Summary(pl.UTF-8):      Plik nagłówkowy biblioteki bzrtp
42 Group:          Development/Libraries
43 Requires:       %{name} = %{version}-%{release}
44
45 %description devel
46 Header file for bzrtp library.
47
48 %description devel -l pl.UTF-8
49 Plik nagłówkowy biblioteki bzrtp.
50
51 %package static
52 Summary:        Static bzrtp library
53 Summary(pl.UTF-8):      Statyczna biblioteka bzrtp
54 Group:          Development/Libraries
55 Requires:       %{name}-devel = %{version}-%{release}
56
57 %description static
58 Static bzrtp library.
59
60 %description static -l pl.UTF-8
61 Statyczna biblioteka bzrtp.
62
63 %prep
64 %setup -q
65 %patch0 -p1
66 %patch1 -p1
67
68 %build
69 install -d builddir
70 cd builddir
71 %cmake .. \
72         %{!?with_static_libs:-DENABLE_STATIC=OFF}
73
74 %{__make}
75
76 %install
77 rm -rf $RPM_BUILD_ROOT
78
79 %{__make} -C builddir install \
80         DESTDIR=$RPM_BUILD_ROOT
81
82 # disable completeness check incompatible with split packaging
83 %{__sed} -i -e '/^foreach(target .*IMPORT_CHECK_TARGETS/,/^endforeach/d; /^unset(_IMPORT_CHECK_TARGETS)/d' $RPM_BUILD_ROOT%{_datadir}/bzrtp/cmake/bzrtpTargets.cmake
84
85 # missing from cmake
86 test ! -f $RPM_BUILD_ROOT%{_pkgconfigdir}/libbzrtp.pc
87 install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
88 %{__sed} -e 's,@prefix@,%{_prefix},' \
89         -e 's,@exec_prefix@,%{_exec_prefix},' \
90         -e 's,@includedir@,%{_includedir},' \
91         -e 's,@PACKAGE_VERSION@,%{version},' \
92         -e 's,@libdir@,%{_libdir},' libbzrtp.pc.in >$RPM_BUILD_ROOT%{_pkgconfigdir}/libbzrtp.pc
93
94 %clean
95 rm -rf $RPM_BUILD_ROOT
96
97 %post   -p /sbin/ldconfig
98 %postun -p /sbin/ldconfig
99
100 %files
101 %defattr(644,root,root,755)
102 %doc CHANGELOG.md README.md
103 %attr(755,root,root) %{_libdir}/libbzrtp.so.0
104
105 %files devel
106 %defattr(644,root,root,755)
107 %attr(755,root,root) %{_libdir}/libbzrtp.so
108 %{_includedir}/bzrtp
109 %{_pkgconfigdir}/libbzrtp.pc
110 %dir %{_datadir}/bzrtp
111 %{_datadir}/bzrtp/cmake
112
113 %if %{with static_libs}
114 %files static
115 %defattr(644,root,root,755)
116 %{_libdir}/libbzrtp.a
117 %endif
This page took 0.065503 seconds and 2 git commands to generate.