From 9cd6a421f0f41228fd065c0c0274c2ffe64cfb64 Mon Sep 17 00:00:00 2001 From: ofluffydev Date: Mon, 28 Oct 2024 08:27:38 -0500 Subject: [PATCH 1/4] init --- .gitignore | 1 + README.md | 15 +++++++++++++++ eternity.json | 29 +++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 eternity.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..05f6869 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.epk \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..69baeef --- /dev/null +++ b/README.md @@ -0,0 +1,15 @@ +# test-package + +Simple package to test both eternity and eon + +Build with + +``` +eternity build +``` + +Install with + +``` +eon install .epk +``` diff --git a/eternity.json b/eternity.json new file mode 100644 index 0000000..6f2ee44 --- /dev/null +++ b/eternity.json @@ -0,0 +1,29 @@ +{ + "metadata": { + "author": "Example", + "name": "test-package", + "desc": "A wonderful test package", + "longDesc": "A very wonderful package\nWith a very long\nDescription!", + "version": "1.0.2", + "license": "MIT", + "arch": "noarch", + "deps": [], + "specialFiles": { + "noDelete": ["/etc/config.conf"], + "noReplace": ["/var/hi/cache.thing"] + } + }, + "build": { + "type": "host", + "deps": [], + "steps": [ + "mkdir -p build/t/etc/", + "mkdir -p build/t/var/hi/", + "touch build/t/etc/config.conf", + "touch build/t/var/hi/cache.thing" + ], + "root": "build", + "hooks": "install-scripts", + "files": "resources" + } +} From 797f7a336aba75e62928a72ab58bb73fcad45313 Mon Sep 17 00:00:00 2001 From: ofluffydev Date: Mon, 28 Oct 2024 10:17:50 -0500 Subject: [PATCH 2/4] Added a simple c++ hello worl program and correct build steps --- eternity.json | 12 +++++------- src/main.cpp | 6 ++++++ 2 files changed, 11 insertions(+), 7 deletions(-) create mode 100644 src/main.cpp diff --git a/eternity.json b/eternity.json index 6f2ee44..66e4f3b 100644 --- a/eternity.json +++ b/eternity.json @@ -6,7 +6,7 @@ "longDesc": "A very wonderful package\nWith a very long\nDescription!", "version": "1.0.2", "license": "MIT", - "arch": "noarch", + "arch": "x86_64", "deps": [], "specialFiles": { "noDelete": ["/etc/config.conf"], @@ -17,13 +17,11 @@ "type": "host", "deps": [], "steps": [ - "mkdir -p build/t/etc/", - "mkdir -p build/t/var/hi/", - "touch build/t/etc/config.conf", - "touch build/t/var/hi/cache.thing" + "g++ -c src/main.cpp -o main.o", + "mkdir -p build/usr/bin", + "g++ main.o -o build/usr/bin/test-package" ], "root": "build", - "hooks": "install-scripts", - "files": "resources" + "files": "src" } } diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..f253cbe --- /dev/null +++ b/src/main.cpp @@ -0,0 +1,6 @@ +#include + +int main() { + std::cout << "Hello, World!" << std::endl; + return 0; +} \ No newline at end of file From 876aeced9fa34f607b07cb1d0fd8db78de8b7f5e Mon Sep 17 00:00:00 2001 From: ofluffydev Date: Wed, 30 Oct 2024 21:23:35 -0500 Subject: [PATCH 3/4] yeah --- README.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/README.md b/README.md index 69baeef..01cb200 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # test-package +## Usage + Simple package to test both eternity and eon Build with @@ -13,3 +15,37 @@ Install with ``` eon install .epk ``` + +## The eternity.json file + +The `eternity.json` file contains various options to configure the build and metadata of the package. Below is a breakdown of the available options: + +### metadata + +- **author**: The author of the package. Example: `"Example"` +- **name**: The name of the package. Example: `"test-package"` +- **desc**: A short description of the package. Example: `"A wonderful test package"` +- **longDesc**: A detailed description of the package. Example: `"A very wonderful package\nWith a very long\nDescription!"` +- **version**: The version of the package. Example: `"1.0.2"` +- **license**: The license under which the package is distributed. Example: `"MIT"` +- **arch**: The architecture for which the package is built. Example: `"x86_64"` +- **deps**: A list of dependencies required by the package. Example: `[]` +- **specialFiles**: Special files that have specific handling rules. + - **noDelete**: Files that should not be deleted. Example: `["/etc/config.conf"]` + - **noReplace**: Files that should not be replaced. Example: `["/var/hi/cache.thing"]` + +### build + +- **type**: The type of build environment. Example: `"host"` +- **deps**: A list of build dependencies. Example: `[]` +- **steps**: The steps to build the package. + - Example: + ```json + [ + "g++ -c src/main.cpp -o main.o", + "mkdir -p build/usr/bin", + "g++ main.o -o build/usr/bin/test-package" + ] + ``` +- **root**: The root directory for the build output. Example: `"build"` +- **files**: The directory containing the source files. Example: `"src"` \ No newline at end of file From 903f4768272e03e5629c3f86a9fc844e139c347f Mon Sep 17 00:00:00 2001 From: ofluffydev Date: Wed, 30 Oct 2024 21:28:00 -0500 Subject: [PATCH 4/4] Work bruh --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 05f6869..afe589a 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -*.epk \ No newline at end of file + +/out \ No newline at end of file