diff --git a/libcoap.spec b/libcoap.spec new file mode 100644 index 0000000000000000000000000000000000000000..392bcaa4202729167c3f871743b957e8faba47f1 --- /dev/null +++ b/libcoap.spec @@ -0,0 +1,99 @@ +Name: libcoap +Version: 4.3.4 +Release: 1 +Summary: C library implementation of CoAP +URL: https://libcoap.net/ +# If build against gnutls the license is BSD + LGPL 2.1 +License: BSD + +Source0: https://github.com/obgm/libcoap/archive/v%{version}.tar.gz + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: gcc +BuildRequires: libtool +BuildRequires: openssl-devel +BuildRequires: asciidoc +BuildRequires: ctags +BuildRequires: doxygen +BuildRequires: graphviz +BuildRequires: make + +%description +The Constrained Application Protocol (CoAP) is a specialized web transfer +protocol for use with constrained nodes and constrained networks in the Internet +of Things. The protocol is designed for machine-to-machine (M2M) applications +such as smart energy and building automation. + +libcoap implements a lightweight application-protocol for devices with +constrained resources such as computing power, RF range, memory, bandwidth, +or network packet sizes. This protocol, CoAP, was standardized in the IETF +working group "CoRE" as RFC 7252. + +%package utils +Summary: Client and server CoAP utilities +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description utils +Utilities for working with %{name}. + +%package devel +Summary: Development package for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +Files for development with %{name}. + +%package doc +Summary: Documentation package for %{name} +BuildArch: noarch + +%description doc +Documentation for development with %{name}. + +%prep +%autosetup -n %{name}-%{version}%{?candidate:-%{candidate}} + +%build +autoreconf -vif +%configure --without-debug CFLAGS="$RPM_OPT_FLAGS -D COAP_DEBUG_FD=stderr" \ + --enable-examples --enable-documentation --enable-doxygen --enable-manpages \ + --enable-dtls --with-openssl --disable-static + +%make_build + +%install +%make_install + +#Remove libtool archives +find %{buildroot} -name '*.la' -delete +find %{buildroot} -name '*.a' -delete +rm -rf %{buildroot}/%{_datadir}/%{name} + +%check +make check + +%ldconfig_scriptlets + +%files +%license LICENSE COPYING +%doc AUTHORS +%{_libdir}/libcoap-3-openssl.so.3* + +%files utils +%{_bindir}/coap* +%{_mandir}/man5/coap* + +%files doc +%{_mandir}/man7/coap* +%{_datadir}/doc/libcoap/ + +%files devel +%{_mandir}/man3/coap* +%{_includedir}/coap3/ +%{_libdir}/pkgconfig/libcoap-3*.pc +%{_libdir}/libcoap-3*.so + +%changelog +* Wed Mar 06 2024 wangshuo - 4.3.4-1 +- Init package diff --git a/libcoap.yaml b/libcoap.yaml new file mode 100644 index 0000000000000000000000000000000000000000..67429e8e3a1c3b336aa10eeac642899293ab3350 --- /dev/null +++ b/libcoap.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: obgm/libcoap +tag_prefix: "^v" +separator: "." diff --git a/v4.3.4.tar.gz b/v4.3.4.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..de4dfaca1eaeafefb45ab0271ded59302b2324fe Binary files /dev/null and b/v4.3.4.tar.gz differ