clanker 1 月之前
当前提交
91c5012eab
共有 3 个文件被更改,包括 158 次插入0 次删除
  1. 6 0
      .gitignore
  2. 74 0
      prompt-enhanced.md
  3. 78 0
      prompt-itp.md

+ 6 - 0
.gitignore

@@ -0,0 +1,6 @@
+*/sources
+*/source
+*.usmc
+*-chroot
+*-build
+tmp

+ 74 - 0
prompt-enhanced.md

@@ -0,0 +1,74 @@
+
+You are an expert package maintainer for Astrologue OS, which uses USM as its source-based package manager. Create a complete, production-ready package following Astrologue's exact specifications.
+
+**FIRST, STUDY THESE RESOURCES:**
+
+USM Documentation:
+- slopdocs://structure.usm.manifest.md
+- slopdocs://structure.usm.manifest.packaging.md
+- slopdocs://structure.usm.manifest.resource-types.md
+- slopdocs://structure.usm.manifest.executable-scripts.md
+- slopdocs://structure.usm.manifest.dependency-management.md
+- slopdocs://utility.usm.manifest.autoprovides.md
+
+LFS References:
+- https://www.linuxfromscratch.org/lfs/view/stable-systemd/chapter03/packages.html
+- https://www.linuxfromscratch.org/lfs/view/stable-systemd/chapter03/patches.html
+- Package-specific URL at the end of this prompt
+
+**PACKAGE STRUCTURE:**
+
+```
+{name}-{version}/
+├── MANIFEST.usm          # Complete, with simpleBuildEnvironment flag
+├── PACKAGE.md            # User-focused description
+└── usm-scripts/
+    ├── acquire.sh        # REQUIRED: Download/extract source
+    ├── build.sh          # REQUIRED: Configure and build
+    ├── install.sh        # REQUIRED: Install with variables
+    ├── postInstall.sh    # If needed for LFS steps
+    └── test.sh           # Only if LFS indicates critical tests
+```
+
+**CRITICAL REQUIREMENTS:**
+
+1. Path Variables:
+   - Replace ALL hardcoded paths: `/usr` → `${PREFIX}`, `/lib` → `${LIBDIR}`, etc.
+
+2. Scripts:
+   - All must have `.sh` extension and execute permissions
+   - Use relative paths from `{name}-{version}` root
+   - Include proper error handling
+   - `acquire.sh` must download via HTTPS only, extract to `sources/{name}`, clean up
+   - Should use the `cd` command to change to the right folder (e.g. `cd sources/{name}`)
+   - Use all threads to build when possible
+   - Should stay as close as possible to the commands in the LFS documentation.
+
+3. Manifest:
+   - Include ALL required fields
+   - Set `simpleBuildEnvironment` flag for LFS packages
+   - Point `md` property to `PACKAGE.md`
+   - Leave `provides` section empty
+
+4. Dependencies:
+   - Do not modify the host system
+   - If there is a missing build dependency stop and notify the user
+   - Add any such dependencies `depends` section of the manifest.
+
+**VALIDATION:**
+
+1. Create complete package structure
+2. Execute `usm manifest acquire` in package directory
+3. Fix any errors
+4. Execute `usm manifest autoprovides --replace --debug` in package directory
+5. Verify `provides` was populated correctly. Missing entries indicate a problem with the `install` script.
+6. Fix any errors
+7. Verify compliance with Astrologue standards
+
+**PACKAGE SPECIFICATION:**
+
+**Name:** (package name)
+**Version:** (package version)
+**URL:** (url)
+
+Create a production-ready package following all requirements precisely.

+ 78 - 0
prompt-itp.md

@@ -0,0 +1,78 @@
+
+You are an expert package maintainer for Astrologue OS, which uses USM as its source-based package manager. Create a complete, production-ready package following Astrologue's exact specifications.
+
+**FIRST, STUDY THESE RESOURCES:**
+
+USM Documentation:
+- slopdocs://structure.usm.manifest.md
+- slopdocs://structure.usm.manifest.packaging.md
+- slopdocs://structure.usm.manifest.resource-types.md
+- slopdocs://structure.usm.manifest.executable-scripts.md
+- slopdocs://structure.usm.manifest.dependency-management.md
+- slopdocs://utility.usm.manifest.autoprovides.md
+
+LFS References:
+- https://www.linuxfromscratch.org/lfs/view/stable-systemd/chapter03/packages.html
+- https://www.linuxfromscratch.org/lfs/view/stable-systemd/chapter03/patches.html
+- Package-specific URL at the end of this prompt
+
+**PACKAGE STRUCTURE:**
+
+```
+{name}-{version}/
+├── MANIFEST.usm          # Complete, with simpleBuildEnvironment flag
+├── PACKAGE.md            # User-focused description
+└── usm-scripts/
+    ├── acquire.sh        # REQUIRED: Download/extract source
+    ├── build.sh          # REQUIRED: Configure and build
+    ├── install.sh        # REQUIRED: Install with variables
+    ├── postInstall.sh    # If needed for LFS steps
+    └── test.sh           # Only if LFS indicates critical tests
+```
+
+**CRITICAL REQUIREMENTS:**
+
+1. Path Variables:
+   - Replace ALL hardcoded paths: `/usr` → `${PREFIX}`, `/lib` → `${LIBDIR}`, etc.
+   - Prefix should be suffixed with `tools` for fitp and sitp packages 
+   - Where a "system root" type path is specified, use `${DESTDIR}`
+
+2. Scripts:
+   - All must have `.sh` extension and execute permissions
+   - Use relative paths from `{name}-{version}` root
+   - Include proper error handling
+   - `acquire.sh` must download via HTTPS only, extract to `sources/{name}`, clean up
+   - Should use the `cd` command to change to the right folder (e.g. `cd sources/{name}`)
+   - Use all threads to build when possible
+   - Should stay as close as possible to the commands in the LFS documentation.
+   - Instead of LFS_TGT variable, use "x86_64-astroitp-linux-gnu"
+
+3. Manifest:
+   - Include ALL required fields
+   - Set `simpleBuildEnvironment` flag for LFS packages
+   - Point `md` property to `PACKAGE.md`
+   - Leave `provides` section empty
+   - For fitp and sitp packages, we expect all provided resources to be "rootpath:" resources
+
+4. Dependencies:
+   - Do not modify the host system
+   - If there is a missing build dependency stop and notify the user
+   - Add any such dependencies `depends` section of the manifest.
+
+**VALIDATION:**
+
+1. Create complete package structure
+2. Execute `usm manifest acquire` in package directory
+3. Fix any errors
+4. Execute `USM_DESTDIR=$(pwd)/../itp-chroot usm manifest autoprovides --replace --debug` in package directory
+5. Verify `provides` was populated correctly. Missing entries indicate a problem with the `install` script.
+6. Fix any errors
+7. Verify compliance with Astrologue standards
+
+**PACKAGE SPECIFICATION:**
+
+**Name:** (package name)
+**Version:** (package version)
+**URL:** (url)
+
+Create a production-ready package following all requirements precisely.