-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* CMake: Add packaging support * CI: Upload artifacts, auto-create releases from tags * Build: Lock the cxx-common version
- Loading branch information
1 parent
de43af8
commit eea7a54
Showing
10 changed files
with
298 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# rellic packaging scripts | ||
|
||
## How to generate packages | ||
|
||
1. Configure and build rellic | ||
2. Set the **DESTDIR** variable to a new folder | ||
3. Run the packaging script, passing the **DESTDIR** folder | ||
|
||
Example: | ||
|
||
```sh | ||
rellic_version=$(git describe --always) | ||
|
||
cpack -D RELLIC_DATA_PATH="/path/to/install/directory" \ | ||
-R ${rellic_version} \ | ||
--config "packaging/main.cmake" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# | ||
# Copyright (c) 2021-present, Trail of Bits, Inc. | ||
# All rights reserved. | ||
# | ||
# This source code is licensed in accordance with the terms specified in | ||
# the LICENSE file found in the root directory of this source tree. | ||
# | ||
|
||
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_PROCESSOR}") | ||
set(CPACK_INSTALLED_DIRECTORIES "${RELLIC_DATA_PATH};.") | ||
|
||
string(TOLOWER "${CMAKE_SYSTEM_NAME}" system_name) | ||
if(system_name STREQUAL "darwin") | ||
set(system_name "macos") | ||
endif() | ||
|
||
set(common_include "${CMAKE_CURRENT_LIST_DIR}/system/${system_name}/common.cmake") | ||
if(EXISTS "${common_include}") | ||
include("${common_include}") | ||
endif() | ||
|
||
string(TOLOWER "${CPACK_GENERATOR}" cpack_generator) | ||
include("${CMAKE_CURRENT_LIST_DIR}/system/${system_name}/generators/${cpack_generator}.cmake") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# | ||
# Copyright (c) 2021-present, Trail of Bits, Inc. | ||
# All rights reserved. | ||
# | ||
# This source code is licensed in accordance with the terms specified in | ||
# the LICENSE file found in the root directory of this source tree. | ||
# | ||
|
||
set(CPACK_DEBIAN_PACKAGE_PRIORITY "extra") | ||
set(CPACK_DEBIAN_PACKAGE_SECTION "default") | ||
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "${CPACK_PACKAGE_HOMEPAGE_URL}") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# | ||
# Copyright (c) 2021-present, Trail of Bits, Inc. | ||
# All rights reserved. | ||
# | ||
# This source code is licensed in accordance with the terms specified in | ||
# the LICENSE file found in the root directory of this source tree. | ||
# | ||
|
||
set(CPACK_RPM_PACKAGE_RELEASE "${CPACK_PACKAGE_VERSION}") | ||
set(CPACK_RPM_FILE_NAME "RPM-DEFAULT") | ||
set(CPACK_RPM_PACKAGE_DESCRIPTION "${CPACK_PACKAGE_DESCRIPTION}") | ||
set(CPACK_RPM_PACKAGE_GROUP "default") | ||
set(CPACK_RPM_PACKAGE_LICENSE "GNU Affero General Public License v3.0") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# | ||
# Copyright (c) 2021-present, Trail of Bits, Inc. | ||
# All rights reserved. | ||
# | ||
# This source code is licensed in accordance with the terms specified in | ||
# the LICENSE file found in the root directory of this source tree. | ||
# | ||
|
||
set(CPACK_SET_DESTDIR ON) | ||
set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# | ||
# Copyright (c) 2021-present, Trail of Bits, Inc. | ||
# All rights reserved. | ||
# | ||
# This source code is licensed in accordance with the terms specified in | ||
# the LICENSE file found in the root directory of this source tree. | ||
# | ||
|
||
set(CPACK_SET_DESTDIR ON) | ||
set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# | ||
# Copyright (c) 2021-present, Trail of Bits, Inc. | ||
# All rights reserved. | ||
# | ||
# This source code is licensed in accordance with the terms specified in | ||
# the LICENSE file found in the root directory of this source tree. | ||
# | ||
|
||
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") | ||
set(CPACK_GENERATOR "TGZ;DEB;RPM") | ||
|
||
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin") | ||
set(CPACK_GENERATOR "TGZ") | ||
endif() | ||
|
||
if(RELLIC_DATA_PATH STREQUAL "") | ||
message(FATAL_ERROR "The RELLIC_DATA_PATH variable was not set") | ||
endif() | ||
|
||
if(RELLIC_PACKAGE_VERSION STREQUAL "") | ||
message(FATAL_ERROR "The RELLIC_PACKAGE_VERSION variable was not set") | ||
endif() | ||
|
||
set(CPACK_PROJECT_CONFIG_FILE "${CMAKE_CURRENT_LIST_DIR}/cmake/dispatcher.cmake") | ||
|
||
set(CPACK_PACKAGE_DESCRIPTION "Rellic produces goto-free C output from LLVM bitcode") | ||
set(CPACK_PACKAGE_NAME "rellic") | ||
set(CPACK_PACKAGE_VENDOR "Trail of Bits") | ||
set(CPACK_PACKAGE_CONTACT "[email protected]") | ||
set(CPACK_PACKAGE_HOMEPAGE_URL "https://github.com/lifting-bits/rellic") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters