-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
19c11d6
commit 53f30c4
Showing
11 changed files
with
189 additions
and
82 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 @@ | ||
# remill packaging scripts | ||
|
||
## How to generate packages | ||
|
||
1. Configure and build remill | ||
2. Set the **DESTDIR** variable to a new folder | ||
3. Run the packaging script, passing the **DESTDIR** folder | ||
|
||
Example: | ||
|
||
```sh | ||
remill_version=$(git describe --always) | ||
|
||
cpack -D REMILL_DATA_PATH="/path/to/install/directory" \ | ||
-R ${remill_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 "${REMILL_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(REMILL_DATA_PATH STREQUAL "") | ||
message(FATAL_ERROR "The REMILL_DATA_PATH variable was not set") | ||
endif() | ||
|
||
if(REMILL_PACKAGE_VERSION STREQUAL "") | ||
message(FATAL_ERROR "The REMILL_PACKAGE_VERSION variable was not set") | ||
endif() | ||
|
||
set(CPACK_PROJECT_CONFIG_FILE "${CMAKE_CURRENT_LIST_DIR}/cmake/dispatcher.cmake") | ||
|
||
set(CPACK_PACKAGE_DESCRIPTION "Library for lifting of x86, amd64, and aarch64 machine code to LLVM bitcode") | ||
set(CPACK_PACKAGE_NAME "remill") | ||
set(CPACK_PACKAGE_VENDOR "Trail of Bits") | ||
set(CPACK_PACKAGE_CONTACT "[email protected]") | ||
set(CPACK_PACKAGE_HOMEPAGE_URL "https://github.com/lifting-bits/remill") |
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