Added pre-installation steps to remove venv and web folder for RPM and Debian.

This commit is contained in:
Akshay Joshi 2023-04-04 18:28:26 +05:30
parent abea2c7172
commit fdf7a459eb
2 changed files with 12 additions and 0 deletions

View File

@ -31,6 +31,14 @@ _copy_code
echo "Creating the server package..." echo "Creating the server package..."
mkdir "${SERVERROOT}/DEBIAN" mkdir "${SERVERROOT}/DEBIAN"
echo "Creating preinst script..."
cat << EOF > "${SERVERROOT}/DEBIAN/preinst"
#!/bin/sh
rm -rf /usr/pgadmin4/venv
rm -rf /usr/pgadmin4/web
EOF
cat << EOF > "${SERVERROOT}/DEBIAN/control" cat << EOF > "${SERVERROOT}/DEBIAN/control"
Package: ${APP_NAME}-server Package: ${APP_NAME}-server
Version: ${APP_LONG_VERSION} Version: ${APP_LONG_VERSION}

View File

@ -67,6 +67,10 @@ Requires: ${PYTHON_BINARY}, libpq5, krb5-libs
%description %description
The core server package for pgAdmin. pgAdmin is the most popular and feature rich Open Source administration and development platform for PostgreSQL, the most advanced Open Source database in the world. The core server package for pgAdmin. pgAdmin is the most popular and feature rich Open Source administration and development platform for PostgreSQL, the most advanced Open Source database in the world.
%pre
rm -rf /usr/pgadmin4/venv
rm -rf /usr/pgadmin4/web
%build %build
%install %install