Contributing to KPM
We welcome contributions to KPM! This page outlines how you can help make KPM even better.
Ways to Contribute
There are many ways to contribute to KPM:
- Code Contributions: Help improve the KPM codebase
- Documentation: Help improve or translate the documentation
- Package Creation: Create and maintain packages
- Bug Reports: Report issues you encounter
- Feature Requests: Suggest new features or improvements
- Community Support: Help other users in the forums or chat
Development Setup
To set up a development environment for KPM:
- Clone the repository:
git clone https://github.com/gingrspacecadet/kpm.git
cd kpm
- KPM is written in C and uses standard libraries. You'll need:
- GCC
- Make
- An ARMv7 environment (more on that later)
- Basic development tools
- Build KPM:
make local
This will build the kpm
binary that you can test locally.
If you plan on creating binaries for kpm, run this script:
./emulate-download.sh
It will install a virtual environment similar to the kindle for you to compile binaries in. Enter it with
./enter-kindle.sh
Pull Request Workflow
- Fork the repository on GitHub
- Create a new branch for your feature or bugfix
- Make your changes and commit them
- Push your branch to your fork
- Create a pull request from your branch to the main repository
Contributing New Packages
To add a new package to KPM:
- Create a new directory in the
packages
folder with your package name
mkdir -p packages/my-package
- Create the necessary files:
install.sh
: Installation scriptuninstall.sh
: Uninstallation script- Any other files needed by your package
- Make sure your scripts are executable:
chmod +x packages/my-package/install.sh packages/my-package/uninstall.sh
Add your package name to
packages.conf
Create documentation for your package in the wiki:
touch wiki/pages/packages/my-package.md
- Submit a pull request with your changes
Coding Standards
- Use 4 spaces for indentation
- Follow the existing code style
- Try not to need comments by writing clear code
- Write tests for new features
- Update documentation for user-facing changes
Documentation Contributions
The KPM documentation is written in Markdown and stored in the wiki/pages
directory. To contribute:
- Edit the appropriate Markdown files
- Preview your changes locally using a Markdown previewer
- Submit a pull request with your changes
Creating and Maintaining Packages
If you're interested in creating or maintaining packages:
- Follow the Creating Packages guide
- Test your packages thoroughly
- Submit them to the official KPM repository or host your own
Community Guidelines
- Be respectful and kind to other contributors
- Provide constructive feedback
- Help newcomers get started
- Follow the code of conduct
Recognition
All contributors are recognized on our Contributors page and on the GitHub repository. We appreciate every contribution, no matter how small!