Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/build-openfec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Build openfec
on: [push, pull_request, workflow_dispatch]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- id: debianise
uses: twojstaryzdomu/debianise@HEAD
with:
create_changelog: true
install_build_depends: false
package: openfec
debug: true
- id: action-gh-release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: ${{ steps.debianise.outputs.files }}
name: ${{ steps.debianise.outputs.release_name }}
tag_name: ${{ steps.debianise.outputs.tag_name }}
fail_on_unmatched_files: true
draft: true
prerelease: true
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ cmake_minimum_required(VERSION 2.6)
##project
project(openfec C)

set(PROJECT_VERSION "1.4.2.4")
set(PROJECT_DESCRIPTION "Application-Level Forward Erasure Correction implementation library")

ENABLE_TESTING()

if (PROFILING STREQUAL "ON")
Expand Down Expand Up @@ -34,6 +37,7 @@ MARK_AS_ADVANCED(

link_directories(${LIBRARY_OUTPUT_PATH})

add_subdirectory(pc)
add_subdirectory(src)
add_subdirectory(applis/eperftool)
add_subdirectory(applis/howto_examples/simple_client_server)
Expand Down
1 change: 1 addition & 0 deletions debian/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
11
33 changes: 33 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
Source: openfec
Section: unknown
Priority: optional
Maintainer: unknown <pi@d0>
Build-Depends: debhelper (>= 11)
Standards-Version: 4.1.3
Homepage: http://openfec.org
Vcs-Browser: https://github.com/roc-project/openfec
Vcs-Git: git://github.com/roc-project/openfec

Package: libopenfec
Section: libs
Architecture: any
Multi-Arch: same
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Application-Level Forward Erasure Correction implementation library - runtime
Application-Level Forward Erasure Correction implementation library

Package: libopenfec-tools
Section: utils
Architecture: any
Multi-Arch: same
Depends: ${shlibs:Depends}, ${misc:Depends}, libopenfec (= ${binary:Version})
Description: Application-Level Forward Erasure Correction implementation library - utilities
Application-Level Forward Erasure Correction implementation library

Package: libopenfec-dev
Architecture: any
Multi-Arch: same
Section: libdevel
Depends: ${misc:Depends}, libopenfec (= ${binary:Version})
Description: Application-Level Forward Erasure Correction implementation library - development files
Application-Level Forward Erasure Correction implementation library
4 changes: 4 additions & 0 deletions debian/libopenfec-dev.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#! /usr/bin/dh-exec
src/lib_advanced usr/include/openfec
src/lib_common usr/include/openfec
src/lib_stable usr/include/openfec
7 changes: 7 additions & 0 deletions debian/libopenfec-tools.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#! /usr/bin/dh-exec
bin/Release/eperftool usr/bin
bin/Release/simple_client usr/bin
bin/Release/simple_server usr/bin
bin/Release/test_code_params usr/bin
bin/Release/test_create_instance usr/bin
bin/Release/test_encoder_instance usr/bin
2 changes: 2 additions & 0 deletions debian/libopenfec.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#! /usr/bin/dh-exec
bin/Release/libopenfec.so* usr/lib/${DEB_HOST_MULTIARCH}
25 changes: 25 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#export DH_VERBOSE = 1

# see FEATURE AREAS in dpkg-buildflags(1)
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# see ENVIRONMENT in dpkg-buildflags(1)
# package maintainers to append CFLAGS
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
# package maintainers to append LDFLAGS
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
export DEB_BUILD_OPTIONS=nocheck

%:
dh $@

# dh_make generated override targets
# This is example for Cmake (See https://bugs.debian.org/641051 )
#override_dh_auto_configure:
# dh_auto_configure -- # -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH)

1 change: 1 addition & 0 deletions debian/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (quilt)
4 changes: 4 additions & 0 deletions debian/watch
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
version=4
opts="filenamemangle=s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%openfec-$1\.tar\.gz%" \
https://github.com/roc-project/openfec/tags \
(?:.*?/)?v?(\d[\d.]*)\.tar\.gz debian uupdate
17 changes: 17 additions & 0 deletions pc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
cmake_minimum_required(VERSION 2.6)
include(GNUInstallDirs)

SET(PKG_CONFIG_LIBS
"-L\${libdir} -l${PROJECT_NAME}"
)
SET(PKG_CONFIG_CFLAGS
"-I\${includedir}/lib_common -I\${includedir}/lib_stable"
)

message(STATUS "Configuring \"${CMAKE_SOURCE_BINARY_DIR}/${PROJECT_NAME}.pc\"")

CONFIGURE_FILE(
"${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}.pc.in"
"${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}.pc"
@ONLY
)
11 changes: 11 additions & 0 deletions pc/openfec.pc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=@CMAKE_INSTALL_PREFIX@
includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@PROJECT_NAME@
libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@

Name: @PROJECT_NAME@
Description: @PROJECT_DESCRIPTION@
Version: @PROJECT_VERSION@
Requires: @PKG_CONFIG_REQUIRES@
Libs: @PKG_CONFIG_LIBS@
Cflags: @PKG_CONFIG_CFLAGS@
77 changes: 77 additions & 0 deletions rpm/libopenfec-1.4.2.4.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
%global __os_install_post \
/usr/lib/rpm/brp-compress \
/usr/lib/rpm/brp-strip \
/usr/lib/rpm/brp-suse
%undefine _disable_source_fetch
%define major 1.4.2
%define minor 4
%define pkgname openfec
Name: lib%{pkgname}
Version: %{major}.%{minor}
Release: 6%{?dist}
Summary: Application-Level Forward Erasure Correction implementation library

License: CeCCIL-C_V1 AND CeCILL_V2
URL: http://openfec.org
Source: https://github.com/roc-project/openfec/archive/v%{version}.tar.gz
Provides: %{name} = %{version}
Obsoletes: %{name} < %{version}
BuildRequires: cmake

%description
Application-Level Forward Erasure Correction implementation library

%package -n %{name}-devel
Summary: Application-Level Forward Erasure Correction implementation library
Group: Development/Libraries/C and C++
Provides: %{name}-devel = %{version}
Requires: %{name} = %{version}
Obsoletes: %{name}-devel < %{version}

%description -n %{name}-devel
Development package for Application-Level Forward Erasure Correction implementation library

%prep
%setup -n %{pkgname}-%{version}

%build
%cmake
%cmake_build

%install
mkdir -p %{buildroot}/%{_bindir} \
%{buildroot}/%{_libdir}/pkgconfig \
%{buildroot}/%{_includedir}/%{pkgname}
for f in bin/Rel*/{eperftool,simple_*,test_*}; do
install ${f} %{buildroot}/%{_bindir}/
done
install bin/Rel*/%{name}.so.%{major} %{buildroot}/%{_libdir}/
install build/pc/%{pkgname}.pc %{buildroot}/%{_libdir}/pkgconfig/
ln -s %{_libdir}/%{name}.so.1 %{buildroot}/%{_libdir}/%{name}.so
ln -s %{_libdir}/%{name}.so.%{major} %{buildroot}/%{_libdir}/%{name}.so.1
(cd src; find . -name '*.h' -exec cp -pr --parents {} %{buildroot}/%{_includedir}/%{pkgname} \;)

%post -n %{name} -p /sbin/ldconfig
%postun -n %{name} -p /sbin/ldconfig

%files -n %{name}
%defattr(755,root,root)
%attr(644,root,root) %license LICENCE_CeCILL-C_V1-en.txt
%attr(644,root,root) %license Licence_CeCILL_V2-en.txt
%{_bindir}/*
%{_libdir}/%{name}.so*

%files -n %{name}-devel
%defattr(644,root,root)
%license LICENCE_CeCILL-C_V1-en.txt
%license Licence_CeCILL_V2-en.txt
%{_libdir}/pkgconfig/*
%{_includedir}/%{pkgname}/*

%changelog
* Tue Jun 28 2022 twojstaryzdomu - 1.4.2.4-6
- Updated attributes
- Removed committed pkgconfig patch
* Tue Feb 1 2022 twojstaryzdomu - 1.4.2.4-5
- Added pkgconfig template patch
- Use cmake rpm macros