-
Notifications
You must be signed in to change notification settings - Fork 910
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build RPM package in the CI. (#2304)
Signed-off-by: Toni Uhlig <[email protected]>
- Loading branch information
Showing
2 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: RPM Build | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
# At the end of every day | ||
- cron: '0 0 * * *' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install Ubuntu Prerequisites | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install autoconf automake libtool pkg-config gettext libjson-c-dev flex bison libpcap-dev | ||
- name: Configure nDPI | ||
run: | | ||
# fake CentOS 7 env | ||
echo 'CentOS Linux release 7.9.2009 (Core)' | sudo tee /etc/centos-release | ||
# symlink source directory for ndpi.spec | ||
ln -sr . $HOME/nDPI | ||
./autogen.sh | ||
cd packages/rpm | ||
./configure | ||
- name: Build RPM package | ||
run: | | ||
make -C packages/rpm package |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,9 +83,16 @@ rm -fr $RPM_BUILD_ROOT | |
%files | ||
%defattr(-, root, root) | ||
|
||
%if %{defined libdir} | ||
%{libdir}/libndpi.so | ||
%{libdir}/libndpi.so.@MAJOR_RELEASE@ | ||
%{libdir}/libndpi.so.@PACKAGE_VERSION@ | ||
%else | ||
# Fallback for rpmbuild on Ubuntu (CI) | ||
/usr/lib/libndpi.so | ||
/usr/lib/libndpi.so.@MAJOR_RELEASE@ | ||
/usr/lib/libndpi.so.@PACKAGE_VERSION@ | ||
%endif | ||
/usr/bin/ndpiReader | ||
/usr/share/ndpi/ndpiCustomCategory.txt | ||
/usr/share/ndpi/ndpiProtos.txt | ||
|
@@ -99,7 +106,12 @@ rm -fr $RPM_BUILD_ROOT | |
%defattr(-,root,root,-) | ||
|
||
%{includedir} | ||
%if %{defined libdir} | ||
%{libdir}/libndpi.a | ||
%else | ||
# Fallback for rpmbuild on Ubuntu (CI) | ||
/usr/lib/libndpi.a | ||
%endif | ||
|
||
%changelog | ||
* Mon Nov 19 2018 Alfredo Cardigliano <[email protected]> 2.5 | ||
|