|
root / test / ports / base / hello
hello Plain Text 72 lines 1.5 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/sh
# Build script for hello package
# This is a test package that creates a simple hello world program

set -e

echo "Building hello world test package..."

# Create source directory
mkdir -p src

# Create simple hello.c
cat > src/hello.c << 'EOF'
#include <stdio.h>

int main(void) {
    printf("Hello from Coral package manager!\n");
    printf("If you see this, the build system is working.\n");
    return 0;
}
EOF

# Compile
echo "Compiling hello.c..."
gcc ${CFLAGS} -o hello src/hello.c

# Install to DESTDIR
echo "Installing to ${DESTDIR}..."
mkdir -p "${DESTDIR}/usr/bin"
install -m 755 hello "${DESTDIR}/usr/bin/hello"

# Create a simple man page
mkdir -p "${DESTDIR}/usr/share/man/man1"
cat > "${DESTDIR}/usr/share/man/man1/hello.1" << 'EOF'
.TH HELLO 1 "2025" "Coral" "User Commands"
.SH NAME
hello \- a test program for coral package manager
.SH SYNOPSIS
.B hello
.SH DESCRIPTION
A simple hello world program used to test the Coral package build system.
.SH AUTHOR
Chris Tusa <chris.tusa@leafscale.com>
EOF

echo "Build complete!"
# Hello World Package - Test Port
# This is a simple test package to verify coral build works

[package]
name = "hello"
version = "1.0.1"
release = 1
description = "A simple hello world program for testing coral"
url = "https://github.com/leafscale/zygaena"
license = "MIT"
maintainer = "Chris Tusa <chris.tusa@leafscale.com>"
arch = "x86_64"

[dependencies]
runtime = []
build = []

[sources]
# No external sources - we include the source directly
urls = []
checksums = []

[build]
parallel = true
jobs = 1