Copyright Headers
All source files in the HelixScreen project must include an SPDX license identifier.
SPDX License Identifier (Required)
Section titled “SPDX License Identifier (Required)”All source files must include this header at the top of the file:
C/C++ Files (.c, .cpp, .h, .hpp)
Section titled “C/C++ Files (.c, .cpp, .h, .hpp)”// Copyright (C) 2025-2026 356C LLCPython Files (.py)
Section titled “Python Files (.py)”# Copyright (C) 2025-2026 356C LLCBash Scripts (.sh)
Section titled “Bash Scripts (.sh)”#!/usr/bin/env bash# Copyright (C) 2025-2026 356C LLC# SPDX-License-Identifier: GPL-3.0-or-laterXML Files (.xml)
Section titled “XML Files (.xml)”<?xml version="1.0"?><!-- Copyright (C) 2025-2026 356C LLC --><!-- SPDX-License-Identifier: GPL-3.0-or-later -->Why SPDX?
Section titled “Why SPDX?”SPDX (Software Package Data Exchange) identifiers are:
- Machine-readable: Automated tools can instantly detect licenses
- Industry standard: Used by Linux kernel, LLVM, and major open source projects
- Legally equivalent: SPDX + LICENSE file = complete legal notice
- Concise: 2 lines instead of 20+ lines of boilerplate per file
The full copyright notice and GPL license text are in the COPYRIGHT and LICENSE files at the repository root.
Adding Headers to New Files
Section titled “Adding Headers to New Files”When creating new source files:
- Add the appropriate SPDX header at the top (see examples above)
- Preserve special first lines (shebang
#!/usr/bin/env, XML declaration<?xml) - Leave a blank line after the header before code begins
Batch Application
Section titled “Batch Application”To add SPDX headers to multiple files:
# Dry-run (shows what would be changed)./scripts/add-spdx-headers.sh
# Apply to all source files./scripts/add-spdx-headers.sh --apply
# Apply to specific files./scripts/add-spdx-headers.sh --apply src/myfile.cpp include/myheader.h
# Verbose output with diffs./scripts/add-spdx-headers.sh --verboseThe script automatically:
- Detects file type (C/C++, Python, Bash, XML)
- Preserves shebangs and XML declarations
- Removes old verbose copyright boilerplate
- Adds clean SPDX headers
- Skips files that already have SPDX identifiers
Verification
Section titled “Verification”To check that all files have SPDX identifiers:
# Run quality checks (includes SPDX verification)./scripts/quality-checks.sh
# Manual check for missing SPDX in C/C++ filesgrep -L "SPDX-License-Identifier: GPL-3.0-or-later" src/*.cpp include/*.h
# Check specific filehead -5 src/main.cpp | grep SPDXPre-commit Hook
Section titled “Pre-commit Hook”The quality checks script runs automatically via pre-commit hook if configured:
# Install pre-commit hookcp scripts/pre-commit .git/hooks/pre-commitchmod +x .git/hooks/pre-commitThis ensures all committed files have proper SPDX headers.
Full Copyright Notice
Section titled “Full Copyright Notice”For the complete copyright and license information, see:
COPYRIGHT- Comprehensive copyright noticeLICENSE- Full GPL-3.0-or-later license text
Third-Party Code
Section titled “Third-Party Code”Third-party libraries in lib/ retain their original licenses and copyright notices. See individual library directories for their license information.
- Year: Update to current year for new files (e.g., 2026, 2027)
- No verbose headers: SPDX identifiers replace verbose GPL boilerplate
- Machine-readable: Tools like
reusecan verify SPDX compliance - Standards compliant: Follows REUSE 3.0 best practices