diff options
author | Kelvin M. Klann <kmk3.code@protonmail.com> | 2022-05-13 23:33:20 -0300 |
---|---|---|
committer | Kelvin M. Klann <kmk3.code@protonmail.com> | 2022-05-29 18:59:13 -0300 |
commit | 9a0fbbd719b6d6c6fe46ae0f4b2e0ccd7988edcc (patch) | |
tree | 02e0adba5386a4d9c3319d2eec953d161e56df48 /mkdeb.sh.in | |
parent | fj-mkdeb.py: run distclean before ./configure (diff) | |
download | firejail-9a0fbbd719b6d6c6fe46ae0f4b2e0ccd7988edcc.tar.gz firejail-9a0fbbd719b6d6c6fe46ae0f4b2e0ccd7988edcc.tar.zst firejail-9a0fbbd719b6d6c6fe46ae0f4b2e0ccd7988edcc.zip |
mkdeb.sh.in: pass remaining arguments to ./configure
Currently, mkdeb.sh (which is used to make a .deb package) runs
./configure with hardcoded options (some of which are automatically
detected based on configure-time variables). To work around the
hardcoding, contrib/fj-mkdeb.py is used to add additional options by
rewriting the actual call to ./configure on mkdeb.sh. For example, the
following invocation adds --disable-firetunnel to mkdeb.sh:
$ ./configure && ./contrib/fj-mkdeb.py --disable-firetunnel
To avoid depending on another script and to avoid re-generating
mkdeb.sh, just let the latter pass the remaining arguments (the first
one is an optional package filename suffix) to ./configure directly.
Example:
$ make distclean && ./configure && make dist &&
./mkdeb.sh "" --disable-firetunnel
Additionally, change contrib/fj-mkdeb.py to do roughly the same as the
above example, by simply forwarding the arguments that it receives to
./mkdeb.sh (which then forwards them to ./configure). Also, remove the
--only-fix-mkdeb option, since the script does not change mkdeb.sh
anymore. With these changes, the script's usage (other than when using
--only-fix-mkdeb) should remain the same.
Note: To clean the generated files and then make a .deb package using
the default configuration, the invocation is still the same:
$ make distclean && ./configure && make deb
Note2: Running ./configure in the above examples is only needed for
generating Makefile/mkdeb.sh from Makefile.in/mkdeb.sh.in after running
distclean, so that running `make` / `./mkdeb.sh` afterwards works.
Should fully fix #772.
Relates to #1205 #3414 #5148.
Diffstat (limited to 'mkdeb.sh.in')
-rwxr-xr-x | mkdeb.sh.in | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/mkdeb.sh.in b/mkdeb.sh.in index a18ff8021..79f8d748c 100755 --- a/mkdeb.sh.in +++ b/mkdeb.sh.in | |||
@@ -9,17 +9,9 @@ | |||
9 | set -e | 9 | set -e |
10 | NAME=@PACKAGE_NAME@ | 10 | NAME=@PACKAGE_NAME@ |
11 | VERSION=@PACKAGE_VERSION@ | 11 | VERSION=@PACKAGE_VERSION@ |
12 | HAVE_APPARMOR=@HAVE_APPARMOR@ | ||
13 | HAVE_SELINUX=@HAVE_SELINUX@ | ||
14 | EXTRA_VERSION=$1 | 12 | EXTRA_VERSION=$1 |
15 | 13 | ||
16 | CONFIG_ARGS="--prefix=/usr" | 14 | test "$#" -gt 0 && shift |
17 | if [ -n "$HAVE_APPARMOR" ]; then | ||
18 | CONFIG_ARGS="$CONFIG_ARGS --enable-apparmor" | ||
19 | fi | ||
20 | if [ -n "$HAVE_SELINUX" ]; then | ||
21 | CONFIG_ARGS="$CONFIG_ARGS --enable-selinux" | ||
22 | fi | ||
23 | 15 | ||
24 | CODE_ARCHIVE="$NAME-$VERSION.tar.xz" | 16 | CODE_ARCHIVE="$NAME-$VERSION.tar.xz" |
25 | CODE_DIR="$NAME-$VERSION" | 17 | CODE_DIR="$NAME-$VERSION" |
@@ -36,7 +28,7 @@ echo "*****************************************" | |||
36 | tar -xJvf "$CODE_ARCHIVE" | 28 | tar -xJvf "$CODE_ARCHIVE" |
37 | #mkdir -p "$INSTALL_DIR" | 29 | #mkdir -p "$INSTALL_DIR" |
38 | cd "$CODE_DIR" | 30 | cd "$CODE_DIR" |
39 | ./configure $CONFIG_ARGS | 31 | ./configure --prefix=/usr "$@" |
40 | make -j2 | 32 | make -j2 |
41 | mkdir debian | 33 | mkdir debian |
42 | DESTDIR=debian make install-strip | 34 | DESTDIR=debian make install-strip |