Răsfoiți Sursa

Add USM manifest

clanker 1 lună în urmă
părinte
comite
dac1bc14d8
3 a modificat fișierele cu 121 adăugiri și 0 ștergeri
  1. 47 0
      MANIFEST.usm
  2. 51 0
      scripts/build
  3. 23 0
      scripts/install

+ 47 - 0
MANIFEST.usm

@@ -0,0 +1,47 @@
+{
+  "name": "valaq",
+  "version": "0.0.1",
+  "summary": "Query Vala APIs",
+  "licences": [
+    {
+      "name": "GPL-3.0",
+      "text": "LICENSE",
+      "category": "libre"
+    }
+  ],
+  "provides": {
+    "bin:valaq": "as-expected",
+    "rootpath:/usr/share/man/man1/valaq.1": "as-expected"
+  },
+  "depends": {
+    "runtime": [
+      "lib:libglib-2.0.so.0",
+      "lib:libgobject-2.0.so.0",
+      "lib:libjson-glib-1.0.so.0",
+      "lib:libgio-2.0.so.0",
+      "lib:libgee-0.8.so.2",
+      "lib:libvala-0.56.so.0",
+      "lib:libc.so.6"
+    ],
+    "build": [
+      "bin:meson",
+      "bin:ninja",
+      "bin:valac",
+      "pc:glib-2.0.pc",
+      "pc:gobject-2.0.pc",
+      "pc:json-glib-1.0.pc",
+      "pc:gio-2.0.pc",
+      "pc:gee-0.8.pc",
+      "pc:libvala-0.56.pc"
+    ],
+    "manage": [
+      "bin:bash"
+    ]
+  },
+  "flags": [],
+  "execs": {
+    "build": "scripts/build",
+    "install": "scripts/install"
+  },
+  "md": "README.md"
+}

+ 51 - 0
scripts/build

@@ -0,0 +1,51 @@
+#!/bin/sh
+# Build script for valaq
+
+# Build directory is passed as the first argument
+BUILD_DIR="$1"
+
+if [ -z "$BUILD_DIR" ]; then
+    echo "Error: Build directory not specified"
+    exit 1
+fi
+
+echo "Building valaq in $BUILD_DIR"
+
+# Function to find the source directory (updated for flattened extraction)
+find_source_dir() {
+    local search_dir="$1"
+    
+    # With flattened extraction, check current directory first
+    if [ -f "$search_dir/meson.build" ]; then
+        echo "$search_dir"
+        return 0
+    fi
+    
+    # Look for common indicators of a Meson source directory
+    for item in "$search_dir"/*; do
+        if [ -d "$item" ]; then
+            # Check for Meson files
+            if [ -f "$item/meson.build" ]; then
+                echo "$item"
+                return 0
+            fi
+        fi
+    done
+    
+    # If still not found, return the search directory
+    echo "$search_dir"
+}
+
+# Find the source directory
+SOURCE_DIR=$(find_source_dir ".")
+echo "Using source directory: $SOURCE_DIR"
+
+# Configure the build
+echo "Configuring with Meson..."
+meson setup "$BUILD_DIR" --prefix=/usr "$SOURCE_DIR"
+
+# Build the package
+echo "Building..."
+meson compile -C "$BUILD_DIR"
+
+echo "Build completed for valaq"

+ 23 - 0
scripts/install

@@ -0,0 +1,23 @@
+#!/bin/sh
+# Install script for valaq
+
+# Build directory is passed as the first argument
+# Install directory is passed as the second argument
+# Install type is passed as the third argument (fresh, upgrade, downgrade)
+
+BUILD_DIR="$1"
+INSTALL_DIR="$2"
+INSTALL_TYPE="$3"
+
+if [ -z "$BUILD_DIR" ] || [ -z "$INSTALL_DIR" ]; then
+    echo "Error: Build directory or install directory not specified"
+    exit 1
+fi
+
+echo "Installing valaq to $INSTALL_DIR (type: $INSTALL_TYPE)"
+
+# Install the package
+echo "Installing..."
+meson install -C "$BUILD_DIR" --destdir "$INSTALL_DIR"
+
+echo "Installation completed for valaq"