Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,8 @@ The Package Context is used by [Packager](https://github.com/bacpack-system/pack
Packages and Apps defined in the Context.

Packages defined in this Package Context are used by [example Project](https://github.com/bacpack-system/example-project).

for CMCONF Global Config see [config/]


[config/]: ./config/
2 changes: 2 additions & 0 deletions config/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
_build
_tmp
49 changes: 49 additions & 0 deletions config/CMCONF_EXAMPLEConfig.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#
# Example configuration for CMCONF system.
#

FIND_PACKAGE(CMLIB REQUIRED COMPONENTS CMCONF)

CMCONF_INIT_SYSTEM(EXAMPLE)

#
# Setting using upstream Package Repository by default for this system. This can be overridden by
# App in CMakeLists.txt.
#
CMCONF_SET(BA_PACKAGE_LOCAL_USE OFF)
CMCONF_SET(BA_PACKAGE_LOCAL_PATH "")

#
# The http authorization header is usually used for accessing private Package Repositories. This
# example does not need it, but the variable must be set.
#
CMCONF_SET(BA_PACKAGE_HTTP_AUTHORIZATION_HEADER "")

#
# Authorization header can be set from ENV variable
#
#CMCONF_SET(BA_PACKAGE_HTTP_AUTHORIZATION_HEADER "$ENV{ACCESS_TOKEN_ROCKS}")

#
# Setting BringAuto's Package Repository URI Template
#
CMCONF_SET(BA_PACKAGE_URI_REVISION master)
CMCONF_SET(BA_PACKAGE_URI_TEMPLATE_REMOTE "https://gitea.example.com/my-project/package-repository/media/<REVISION>/package/<GIT_PATH>/<PACKAGE_GROUP_NAME>/<ARCHIVE_NAME>")

#
# Gitea hosted public Package Repository:
#
#CMCONF_SET(BA_PACKAGE_URI_TEMPLATE_REMOTE "https://gitea.example.com/username/repository/media/<REVISION>/package/<GIT_PATH>/<PACKAGE_GROUP_NAME>/<ARCHIVE_NAME>")

#
# Gitea hosted private Package Repository.
# Do not forget to specify Access Token
#
#CMCONF_SET(BA_PACKAGE_HTTP_AUTHORIZATION_HEADER "token <token>")
#CMCONF_SET(BA_PACKAGE_URI_TEMPLATE_REMOTE "https://gitea.example.com/username/repository/raw/<REVISION>/package/<GIT_PATH>/<PACKAGE_GROUP_NAME>/<ARCHIVE_NAME>")

#
# Gitlab hosted private Package Repository.
#
#CMCONF_SET(BA_PACKAGE_HTTP_AUTHORIZATION_HEADER "Bearer <token>")
#CMCONF_SET(BA_PACKAGE_URI_TEMPLATE_REMOTE "https://gitlab.example.com/username/repository/-/raw/<REVISION>/package/<GIT_PATH>/<PACKAGE_GROUP_NAME>/<ARCHIVE_NAME>")
36 changes: 36 additions & 0 deletions config/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

# EXAMPLE Configuration

## Prerequisites

- [cmakelib] installed
- [example-project] forked
- prepare Package Repository as described by [example usage documentation]

## Install EXAMPLE Config

The EXAMPLE config is in `CMCONF_EXAMPLEConfig.cmake` file. To install it, run following command:

```bash
cmake -DCMCONF_INSTALL_AS_SYMLINK=ON -P ./CMCONF_EXAMPLEConfig.cmake
```

To uninstall it, run following command:

```bash
cmake -DCMCONF_UNINSTALL=ON -P ./CMCONF_EXAMPLEConfig.cmake
```

## Change System Name

Let `X` be the SYSTEM name.

- Rename `CMCONF_EXAMPLEConfig.cmake` to `CMCONF_XConfig.cmake`,
- Rename `EXAMPLE` to `X` in `CMCONF_XConfig.cmake`,
- Rename `EXAMPLE` to `X` in `CMLibStorage.cmake` in the forked example-project Git repository.
- Install `CMCONF_XConfig.cmake` as described above.


[example-project]: https://github.com/bacpack-system/example-project
[cmakelib]: https://github.com/cmakelib/cmakelib
[example usage documentation]: https://bacpack-system.github.io/example_usage