-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpack_linux.sh
More file actions
71 lines (60 loc) · 2.07 KB
/
pack_linux.sh
File metadata and controls
71 lines (60 loc) · 2.07 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/bin/bash
# Este script utiliza fpm para crear paquetes .deb y .rpm
# a partir del ejecutable de PyInstaller.
# La versión es pasada por GitHub Actions como argumento ($1)
VERSION=$1
if [ -z "$VERSION" ]; then
echo "ERROR: La versión no fue especificada."
exit 1
fi
# El directorio de PyInstaller debe existir
PYINSTALLER_DIR="dist"
if [ ! -d "$PYINSTALLER_DIR" ]; then
echo "ERROR: Directorio de PyInstaller 'dist/' no encontrado."
exit 1
fi
EXECUTABLE_PATH="$PYINSTALLER_DIR/VisageVault"
if [ ! -f "$EXECUTABLE_PATH" ]; then
echo "ERROR: Ejecutable de PyInstaller no encontrado: $EXECUTABLE_PATH"
exit 1
fi
echo "--- 📦 Creando paquetes DEB y RPM (fpm) ---"
# --- CONFIGURACIÓN ---
APP_NAME="visagevault"
APP_DESCRIPTION="Gestor de fotografías inteligente con reconocimiento facial."
APP_MAINTAINER="Daniel Serrano Armenta <dani.eus79@gmil.com>" # REEMPLAZAR
APP_VENDOR="VisageVault Project"
INSTALL_PREFIX="/opt/$APP_NAME"
# La versión debe limpiarse de caracteres de tag como 'v'
CLEAN_VERSION=$(echo "$VERSION" | sed 's/^v//')
# Crear el directorio temporal de instalación
mkdir -p "$INSTALL_PREFIX"
# Mover el binario compilado al directorio de instalación
cp "$EXECUTABLE_PATH" "$INSTALL_PREFIX/visagevault-bin"
# 1. GENERAR PAQUETE .DEB
fpm -s dir -t deb \
-n "$APP_NAME" \
-v "$CLEAN_VERSION" \
--iteration "1" \
--description "$APP_DESCRIPTION" \
--maintainer "$APP_MAINTAINER" \
--vendor "$APP_VENDOR" \
-p "$APP_NAME-$CLEAN_VERSION.deb" \
--deb-priority optional \
--deb-suggests 'ffmpeg' \
--url 'https://github.com/danitxu79/visagevault' \
-C "$INSTALL_PREFIX" \
--prefix "/"
# 2. GENERAR PAQUETE .RPM
fpm -s dir -t rpm \
-n "$APP_NAME" \
-v "$CLEAN_VERSION" \
--iteration "1" \
--description "$APP_DESCRIPTION" \
--maintainer "$APP_MAINTAINER" \anabasasoft@gmail.com.com
--vendor "$APP_VENDOR" \
-p "$APP_NAME-$CLEAN_VERSION.rpm" \
--url 'https://github.com/danitxu79/visagevault' \
-C "$INSTALL_PREFIX" \
--prefix "/"
echo "--- ✅ Paquetes DEB y RPM creados. ---"