Add support of RPM package building via

Change-Id: If9d3d4b7b06aef156fd895415db3b30bdecd74b4
This commit is contained in:
Harald Welte 2022-11-06 11:45:26 +01:00 committed by Oliver Smith
parent 5806606ce5
commit 1d4cf36e2a
3 changed files with 141 additions and 0 deletions

View File

@ -115,6 +115,7 @@ AC_OUTPUT(

View File

@ -1 +1,5 @@
SUBDIRS = systemd

contrib/ Normal file
View File

@ -0,0 +1,136 @@
# spec file for package osmo-e1d
# Copyright (c) 2022 SUSE LLC
# Copyright (c) 2019-2021, Martin Hauke <>
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
Name: osmo-e1d
Version: @VERSION@
Release: 0
Summary: Osmocom E1 Daemon
License: GPL-2.0-or-later
Group: Productivity/Telephony/Utilities
Source: %{name}-%{version}.tar.xz
BuildRequires: automake >= 1.9
BuildRequires: libtool >= 2
BuildRequires: pkg-config >= 0.20
%if 0%{?suse_version}
BuildRequires: systemd-rpm-macros
BuildRequires: pkgconfig(libosmocore) >= 1.7.0
BuildRequires: pkgconfig(libosmousb) >= 1.7.0
BuildRequires: pkgconfig(libosmovty) >= 1.7.0
BuildRequires: pkgconfig(talloc) >= 2.0.1
osmo-e1d is an E1 interface daemon that is part of the Osmocom E1
interface driver architecture. It was primarily written for the
ICE40_E1_USB_interface (ICE40 based E1 framer IP core developed by
osmo-e1d acts as an interface between the hardware/firmware of the E1
interface on the bottom side, and applications wanting to use E1
timeslots on the top side.
%package -n libosmo-e1d1
Summary: Osmocom E1 daemon protocol library
License: LGPL-3.0-or-later
Group: System/Libraries
%description -n libosmo-e1d1
Osmocom E1 Daemon Protocol Library.
%package -n libosmo-octoi0
Summary: Library for the Osmocom Community TDMoIP network
License: LGPL-3.0-or-later
Group: System/Libraries
%description -n libosmo-octoi0
Library for the Osmocom Community TDMoIP network.
%package devel
Summary: Header files for the Osmocom E1 daemon protocol library
License: LGPL-3.0-or-later
Group: Development/Libraries/C and C++
Requires: libosmo-e1d1 = %version-%release
Requires: libosmo-octoi0 = %version-%release
Provides: libosmo-e1d-devel = %version-%release
Obsoletes: libosmo-e1d-devel < %version-%release
%description devel
This subpackage contains libraries and header files for developing
applications that want to make use of libosmo-e1d.
%setup -q
echo "%version" >.tarball-version
autoreconf -fiv
# for rationale
%configure --includedir="%_includedir/%name" --disable-static \
--docdir="%_docdir/%name" \
find "%buildroot" -type f -name "*.la" -delete -print
rm -Rf "%buildroot/%_sysconfdir/osmocom"
%make_build check || find . -name testsuite.log -exec cat {} +
%post -n libosmo-e1d1 -p /sbin/ldconfig
%postun -n libosmo-e1d1 -p /sbin/ldconfig
%post -n libosmo-octoi0 -p /sbin/ldconfig
%postun -n libosmo-octoi0 -p /sbin/ldconfig
%if 0%{?suse_version}
%service_del_preun %name.service
%service_del_postun %name.service
%service_add_pre %name.service
%service_add_post %name.service
%license COPYING COPYING.gpl2 COPYING.lgpl3
%dir %_docdir/%name
%dir %_docdir/%name/examples
%files -n libosmo-e1d1
%files -n libosmo-octoi0
%files devel