neue deb pakete

This commit is contained in:
steffen committed 2026-11-12 22:20:40 +01:00
1 parent 9a713a07cb
commit 9a04c3835c
6 files changed
+55

No files matched your search

+55
View File
@@ -0,0 +1,55 @@
#!/bin/bash
MODULE="$1"
if [ -z "$MODULE" ]; then
echo "Fehler: Kein CPAN-Modul angegeben."
echo "Verwendung: $0 <CPAN-Modul-Name>"
echo "Beispiel: $0 JSON::XS"
exit 1
fi
if ! command -v jq &> /dev/null; then
echo "jq ist nicht installiert. Bitte mit 'sudo apt-get install jq' installieren."
exit 1
fi
echo "Suche Modul-Informationen für: $MODULE ..."
# 1. Modul-Details abrufen
MODULE_JSON=$(curl -s "https://fastapi.metacpan.org/v1/module/$MODULE")
# Prüfen, ob das Modul existiert
ERROR_MSG=$(echo "$MODULE_JSON" | jq -r '.message // empty')
if [ -n "$ERROR_MSG" ]; then
echo "Fehler: Modul '$MODULE' wurde auf MetaCPAN nicht gefunden."
exit 1
fi
# CPAN-ID des Autors extrahieren
AUTHOR_ID=$(echo "$MODULE_JSON" | jq -r '.author')
# 2. Autoren-Details mit der AUTHOR_ID abrufen
AUTHOR_JSON=$(curl -s "https://fastapi.metacpan.org/v1/author/$AUTHOR_ID")
AUTHOR_NAME=$(echo "$AUTHOR_JSON" | jq -r '.name // "Nicht angegeben"')
# Manche Autoren haben mehrere E-Mails, wir nehmen die erste aus dem Array
AUTHOR_EMAIL=$(echo "$AUTHOR_JSON" | jq -r '.email[0] // .email // "Keine E-Mail öffentlich"')
export DEBFULLNAME="$AUTHOR_NAME"
export DEBEMAIL="$AUTHOR_EMAIL"
# 1. Prüfen, ob dh-make-perl installiert ist
if ! command -v cpan2deb &> /dev/null; then
echo "cpan2deb (dh-make-perl) nicht gefunden. Installiere benötigte Werkzeuge..."
sudo apt-get update
sudo apt-get install -y dh-make-perl build-essential libapt-pkg-perl
fi
echo "--------------------------------------------------"
echo "Starte Erstellung für: $MODULE"
echo "Maintainer: $DEBFULLNAME <$DEBEMAIL>"
echo "--------------------------------------------------"
# 2. Paket bauen
cpan2deb --build --install-deps "$MODULE"
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.