Ivan Nardi
b2357c29c3
Build system: Standardize and improve clean/distclean targets ( #3039 )
...
This commit improves the nDPI build system by standardizing cleanup
targets, improving portability, and ensuring complete removal of
generated files during `make distclean`.
Changes:
1. Standardize clean targets (replace /bin/rm with portable $(RM))
2. Add distclean-local targets for complete cleanup
3. Add missing clean/distclean targets
4. Remove obsolete commented-out curl detection code
5. fuzz/Makefile.am: Fix out-of-tree build compatibility by replacing hardcoded
relative paths (../example/fuzz_*.o) with proper $(top_builddir) variables.
Add distclean-local target.
2025-11-24 18:42:03 +01:00
Luca Deri
2a1bc86bca
RPM fix
2025-11-23 11:04:15 +01:00
Luca Deri
3a05aacf93
Updated spec file
2025-10-18 10:02:39 +02:00
Luca Deri
9daac6d20d
Added incldue files in packages
2025-10-14 15:06:02 +02:00
Luca Deri
560e5c9fb2
Rocky10 fixes
2025-09-28 18:58:33 +02:00
Toni
f2ef6e1d18
Debian/Ubuntu packaging: use --enable-no-sign to build *.deb packages w/o signing those ( #2616 )
...
* can be used for local and CI builds
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2024-11-18 09:17:14 +01:00
Petr
c35a5ca087
shell: reformatted, fixed inspections, typos ( #2506 )
...
Reformatted shell scripts according to [ShellCheck](https://github.com/koalaman/shellcheck/ ).
I. Most common changes:
1. https://github.com/koalaman/shellcheck/wiki/SC2086
`$var` → `"$var"`
Note: this isn't always necessary and I've been careful not to substitute where it wasn't necessary in meaning.
2. https://github.com/koalaman/shellcheck/wiki/SC2006
`` `command` `` → `$(command)`
3. https://github.com/koalaman/shellcheck/wiki/SC2004
`$(( $a + $b ))` → `$(( a + b ))`
4. https://github.com/koalaman/shellcheck/wiki/SC2164
`cd "$dir"` → `cd "$dir" || exit 1`
5. https://github.com/koalaman/shellcheck/wiki/SC2166
`[ check1 -o check2 ]` → `[ check1 ] || [ check2 ]`
6. https://github.com/koalaman/shellcheck/wiki/SC2002
`cat "${file}" | wc -c` → `< "${file}" wc -c`
Note: this looks a bit uglier but works faster.
II. Some special changes:
1. In file `utils/common.sh`:
https://github.com/koalaman/shellcheck/wiki/SC2112
This script is interpreted by `sh`, not by `bash`, but uses the keyword `function`.
So I replaced `#!/usr/bin/env sh` to `#!/usr/bin/env bash`.
2. After that I thought of replacing all shebangs to `#!/usr/bin/env bash` for consistency and cross-platform compatibility, especially since most of the files already use bash.
3. But in cases when it was `#!/bin/sh -e` or `#!/bin/bash -eu` another problem appears:
https://github.com/koalaman/shellcheck/wiki/SC2096
So I decided to make all shebangs look uniform:
```
#!/usr/bin/env bash
set -e (or set -eu) (if needed)
```
4. In file `tests/ossfuzz.sh`:
https://github.com/koalaman/shellcheck/wiki/SC2162
`read i` → `read -r i`
Note: I think that there is no need in special treatment for backslashes, but I could be wrong.
5. In file `tests/do.sh.in`:
https://github.com/koalaman/shellcheck/wiki/SC2035
`ls *.*cap*` → `ls -- *.*cap*`
6. In file `utils/verify_dist_tarball.sh`:
https://github.com/koalaman/shellcheck/wiki/SC2268
`[ "x${TARBALL}" = x ]` → `[ -z "${TARBALL}" ]`
7. In file `utils/check_symbols.sh`:
https://github.com/koalaman/shellcheck/wiki/SC2221
`'[ndpi_utils.o]'|'[ndpi_memory.o]'|'[roaring.o]')` → `'[ndpi_utils.o]'|'[ndpi_memory.o]')`
8. In file `autogen.sh`:
https://github.com/koalaman/shellcheck/wiki/SC2145
`echo "./configure $@"` → `echo "./configure $*"`
https://github.com/koalaman/shellcheck/wiki/SC2068
`./configure $@` → `./configure "$@"`
III. `LIST6_MERGED` and `LIST_MERGED6`
There were typos with this variables in files `utils/aws_ip_addresses_download.sh`, `utils/aws_ip_addresses_download.sh` and `utils/microsoft_ip_addresses_download.sh` where variable `LIST6_MERGED` was defined, but `LIST_MERGED6` was removed by `rm`.
I changed all `LIST_MERGED6` to `LIST6_MERGED`.
Not all changes are absolutely necessary, but some may save you from future bugs.
2024-07-18 17:32:49 +02:00
Luca Deri
a4da4467ac
Fixed incompatibity with RH7 introduced by 02030ac16e
2024-02-05 18:12:42 +01:00
Toni
02030ac16e
Build RPM package in the CI. ( #2304 )
...
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2024-02-05 12:13:09 +01:00
Luca Deri
14cfa174be
Added public_suffix_list.dat in RPM package
2024-01-29 11:48:39 +01:00
Luca Deri
fb58f838e5
Added public_suffix_list.dat in packages
2024-01-29 11:43:23 +01:00
Luca Deri
6831187d62
Debian 12 fixes
2023-07-21 12:24:34 -04:00
Luca Deri
2edbe3c11f
Centos7 fix
2022-12-11 10:24:42 +01:00
Luca Deri
88d4a25cb3
Rocky9 fix
2022-12-11 10:21:44 +01:00
Luca Deri
9dc433f709
Packaing changes
2022-12-10 13:14:33 +01:00
Luca Deri
82c83ef75e
Updated RPM package
2022-08-15 16:29:08 +02:00
Luca Deri
4a843709fa
Packages changes
2022-08-15 11:32:58 +02:00
Luca Deri
e85d6d7db7
RPM fix
2022-07-20 21:26:07 +02:00
Luca Deri
a9204eb936
Rocky fix
2022-07-20 17:23:17 +02:00
Luca Deri
6d543808ad
Version cut fix
2022-05-27 16:58:39 +02:00
Toni
cb62dfd249
Drop support for non-gcrypt builds. ( #1469 )
...
* As there is now a builtin, lightweight libgcrypt
there is no need to disable tls-clho decryption.
* It is still possible to use a host libgcrypt
with `--with-local-libgcrypt'.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2022-03-02 19:48:46 +01:00
Sam James
c2b7d77784
build: respect environment options more ( #1392 )
...
* build: update m4/ax_pthread.m4 from serial 23 -> serial 31
Update ax_pthread.m4 to the latest version from the autoconf-archive
project.
Signed-off-by: Sam James <sam@gentoo.org>
* build: properly detect AR, CC, RANLIB
It's necessary to be able to override choice of AR/CC/RANLIB and other toolchain
variables/tools for cross-compilation, testing with other toolchains, and
to ensure the compiler chosen by the user is actually used for the build.
Previously, GNU_PREFIX was kind-of used for this but this isn't a standard
variable (at all) and it wasn't applied consistently anyway.
We now use the standard autoconf mechanisms for finding these tools.
(RANLIB is already covered by LT_INIT.)
Signed-off-by: Sam James <sam@gentoo.org>
* build: use $(MAKE)
This ensures that parallel make works correctly, as otherwise, a fresh
make job will be started without the jobserver fd, and hence
not know about its parent, forcing -j1.
* build: respect CPPFLAGS, LDFLAGS
- CPPFLAGS is for the C preprocessor (usually for setting defines)
- LDFLAGS should be placed before objects for certain flags to work
(e.g. -Wl,--as-needed)
Signed-off-by: Sam James <sam@gentoo.org>
Co-authored-by: Luca Deri <lucaderi@users.noreply.github.com>
2022-01-18 14:30:14 +01:00
Toni
60eca79fdf
Additional fix related to cf931fda6b. ( #1332 )
...
* configure.seed references removed
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2021-10-10 14:14:02 +02:00
Toni
e84da386c7
Added nDPI pkg-config file to Debian / Ubuntu ndpi-dev packaging. ( #1318 )
...
* Added nDPI pkg-config file to Debian / Ubuntu ndpi-dev packaging.
* fixed missing gcrypt library dependency in libndpi.pc
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2021-10-03 21:29:56 +02:00
Luca Deri
77710ed8b4
OpenWRT document fix
2021-06-08 21:39:28 +00:00
Luca Deri
6db20b3ba9
Updated dependency
2021-02-19 17:59:40 +01:00
Luca Deri
bdf95a5c22
Package fix
2021-02-18 22:08:15 +00:00
Luca Deri
bce54079d8
Initial geoip support
2021-02-18 22:35:25 +01:00
Luca Deri
8297dacfe5
Added Makefile for building the development version of libndpi for OpenWRT
2021-02-07 09:29:01 +00:00
Luca Deri
78f762bd36
Typo
2020-11-22 16:51:13 +01:00
Alfredo Cardigliano
e45f0a4b64
Install ndpi under /usr
2020-11-17 09:19:07 +01:00
Luca Deri
fc58e564f0
Restored Ubuntu/Debian packaging
2020-11-03 16:08:57 +01:00
Toni
8e84abfa0e
Fix/packaging ( #1047 )
...
* Fix OpenWrt build.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Fixed Debian/Ubuntu packaging.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* Added DPKG package build to a CI job.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2020-11-03 11:36:40 +01:00
Luca Deri
50ab34bfe6
Centos8 package fix
2020-10-29 18:36:56 +01:00
Alfredo Cardigliano
53f133f669
Fix libdir on centos8
2020-10-29 18:20:51 +01:00
Alfredo Cardigliano
29dbf78c4e
Removed generation of /usr/lib/.build-id
2020-10-29 17:50:05 +01:00
Alfredo Cardigliano
1c4ce8b0f4
Move libraries from /usr/local to /usr
2020-10-29 12:43:33 +01:00
Luca Deri
673d8b7fac
Updated OpenWRT instructions
2020-08-17 18:17:43 +02:00
Luca Deri
b501239d3f
Added README for building libndpi under OpenWRT
2020-08-17 17:17:09 +02:00
Luca Deri
fdf402d027
Added missing RPM files
2020-01-06 18:20:52 +01:00
Alfredo Cardigliano
b2832cee8e
rpm-sign fix for centos8
2019-10-21 09:26:40 +02:00
Alfredo Cardigliano
604abaf81c
Disabled debug_package
2019-10-18 12:30:42 +02:00
Alfredo Cardigliano
32c61d3ea1
RPM spec cleanup
2019-07-25 14:23:11 +02:00
Alfredo Cardigliano
ea80c4dacc
Removed conflict with nprobe-dev
2019-07-25 11:59:01 +02:00
lucaderi
a9ce7ccb83
Packages fixes
2019-07-24 08:47:36 +02:00
Alfredo Cardigliano
8a09ca2180
Fixed RPM pkgconfig path
2019-04-19 11:44:10 +02:00
Alfredo Cardigliano
181ec4992b
Deb fix (shared lib links)
2018-12-10 16:54:01 +01:00
Alfredo Cardigliano
60337330bf
Creating shared lib with major version
2018-12-10 16:33:09 +01:00
Alfredo Cardigliano
af0fd3b96d
RPM fix
2018-12-10 16:18:53 +01:00
Alfredo Cardigliano
b2c00b3b24
Added script to get the package version
2018-12-07 15:50:23 +01:00