File: build-selinux-policy

package info (click to toggle)
openvpn3-client 24.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 19,384 kB
  • sloc: cpp: 180,128; python: 11,591; ansic: 1,878; sh: 1,767; java: 402; lisp: 81; makefile: 44
file content (26 lines) | stat: -rwxr-xr-x 696 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
#  OpenVPN 3 Linux client -- Next generation OpenVPN client
#
#  SPDX-License-Identifier: AGPL-3.0-only
#
#  Copyright (C)  OpenVPN Inc <sales@openvpn.net>
#  Copyright (C)  David Sommerseth <davids@openvpn.net>
#

##
# @file  build-selinux-policy
#
#  SELinux policy compiler helper.  This is not intended to be
#  called directly, but via the Meson custom_target() setup in
#  src/selinux/meson.build

set -eu

basename="$(basename ${4} | cut -d. -f1)"
mkdir -p "$2"
cp $1/${basename}.{fc,if,te} "$2"
make -s -C "$2" -f "$3" "${basename}.pp"
rm -f "$2/${basename}.pp.bz2"
echo "Compressing ${basename}.pp policy package"
bzip2 -9 "$2/${basename}.pp"
cp "$2/${basename}.pp.bz2" "$4"