install(FILES include/srtp.h crypto/include/auth.h
crypto/include/cipher.h
crypto/include/cipher_types.h
+ crypto/include/crypto_types.h
DESTINATION include/srtp2)
if(TEST_APPS)
target_link_libraries(srtp_driver srtp2)
add_test(srtp_driver srtp_driver -v)
endif()
+
+# PC
+set(fw_name "libsrtp2")
+set(prefix /usr)
+set(exec_prefix /usr)
+set(libdir ${LIB_INSTALL_DIR})
+set(includedir /usr/include)
+set(PC_NAME ${fw_name})
+set(VERSION ${FULLVER})
+set(PC_LDFLAGS -l${fw_name})
+set(PC_CFLAGS -I${includedir})
+
+configure_file(
+ libsrtp2.pc.in
+ ${CMAKE_CURRENT_SOURCE_DIR}/libsrtp2.pc
+ @ONLY
+)
+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/libsrtp2.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
+
--- /dev/null
+Name: libsrtp
+Summary: This package provides an implementation of the Secure Real-time Transport Protocol (SRTP)
+Version: 2.3.0
+Release: 1
+Group: Multimedia/Libraries
+License: BSD-3-Clause
+Source0: %{name}-%{version}.tar.gz
+Source1001: %{name}.manifest
+BuildRequires: cmake
+BuildRequires: pkgconfig(glib-2.0)
+
+%description
+This package provides an implementation of the Secure Real-time Transport Protocol
+
+%package devel
+Summary: libsrtp headers and libraries for development.
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description devel
+libsrtp headers and libraries for development.
+
+%prep
+%setup -q
+cp %{SOURCE1001} .
+
+%build
+%cmake . -DFULLVER=%{version}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+mkdir -p %{buildroot}%{_bindir}
+
+%make_install
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+
+%files
+%manifest %{name}.manifest
+%license LICENSE
+%{_libdir}/*.so
+%exclude %{_libdir}/debug
+
+%files devel
+%manifest %{name}.manifest
+%{_includedir}/srtp2/*
+%{_libdir}/pkgconfig/*.pc
+