Merge pull request #802 from sever-sever/T6765

T6765: Fix build python3-vici package
This commit is contained in:
Viacheslav Hletenko 2024-10-08 14:43:10 +03:00 committed by GitHub
commit 9eb61d3b6c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,7 +4,7 @@ set -e
SRC="strongswan/src/libcharon/plugins/vici/python" SRC="strongswan/src/libcharon/plugins/vici/python"
if [ ! -d ${SRC} ]; then if [ ! -d ${SRC} ]; then
echo "Source directory does not exists, please 'git clone'" echo "Source directory does not exist, please 'git clone'"
exit 1 exit 1
fi fi
@ -28,30 +28,31 @@ Depends: \${misc:Depends}, \${python3:Depends}
Description: Native Python interface for strongSwan's VICI protocol Description: Native Python interface for strongSwan's VICI protocol
EOF EOF
# Create rules file # Create rules file
echo "I: create $SRC/rules" echo "I: create $SRC/debian/rules"
cat <<EOF > debian/rules cat <<EOF > debian/rules
#!/usr/bin/make -f #!/usr/bin/make -f
%: %:
dh \$@ --with python3 dh \$@ --with python3
EOF EOF
# Make the rules file executable
chmod +x debian/rules chmod +x debian/rules
echo '10' > debian/compat echo '10' > debian/compat
# Add the 'install' file to copy the vici package to the correct directory
echo "I: create $SRC/debian/install"
cat <<EOF > debian/install
vici /usr/lib/python3/dist-packages/
EOF
# Copy changelog # Copy changelog
cp ../../../../../debian/changelog debian/ cp ../../../../../debian/changelog debian/
# Build the package
ls -la
pwd
echo "I: Build Debian Package" echo "I: Build Debian Package"
dpkg-buildpackage -uc -us -tc -b -d dpkg-buildpackage -uc -us -tc -b -d
# Copy the resulting .deb packages
echo "I: copy packages" echo "I: copy packages"
cp ../*.deb ../../../../../../ cp ../*.deb ../../../../../../