generated from aboutcode-org/skeleton
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from aboutcode-org/build-src
Build src
- Loading branch information
Showing
23 changed files
with
514 additions
and
940 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
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,31 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Copyright (c) nexB Inc. http://www.nexb.com/ - All rights reserved. | ||
# | ||
|
||
set -e | ||
|
||
base_name=GoReSym-3.0.1 | ||
GOOS=linux | ||
|
||
if [ $(uname -m) == 'aarch64' ]; then | ||
GOARCH="arm64" | ||
else | ||
GOARCH="amd64" | ||
fi | ||
|
||
cd lib-src/ | ||
|
||
rm -rf $base_name | ||
tar -xf $base_name.tar.gz | ||
|
||
cd $base_name/ | ||
|
||
echo Build GoReSym | ||
go build && mv GoReSym GoReSym_lin | ||
strip GoReSym_lin | ||
cp GoReSym_lin ../../src/go_inspector/bin/ | ||
cd .. | ||
echo Done building GoReSym | ||
|
||
rm -rf $base_name/ |
Binary file not shown.
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,8 @@ | ||
about_resource: GoReSym-3.0.1.tar.gz | ||
name: GoReSym | ||
version: 3.0.1 | ||
download_url: https://github.com/mandiant/GoReSym/archive/refs/tags/v3.0.1.tar.gz | ||
package_url: pkg:github/mandiant/[email protected] | ||
copyright: Copyright (c) 2022 MANDIANT | ||
license_expression: mit | ||
license_text_file: GoReSym_lin.LICENSE |
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2022 MANDIANT | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
@@ -1,6 +1,31 @@ | ||
#!/usr/bin/env python | ||
|
||
import subprocess | ||
from distutils.command.build import build as distutils_build | ||
from distutils.errors import LibError | ||
|
||
import setuptools | ||
from setuptools.command.develop import develop as setuptools_develop | ||
|
||
|
||
def run_native_build(): | ||
exitcode, output = subprocess.getstatusoutput(["./build.sh"]) | ||
print(output) | ||
if exitcode: | ||
raise LibError("Unable to build native") | ||
|
||
|
||
class BuildNative(distutils_build): | ||
def run(self): | ||
self.execute(run_native_build, (), msg="Building native code") | ||
distutils_build.run(self) | ||
|
||
|
||
class DevelopNative(setuptools_develop): | ||
def run(self): | ||
self.execute(run_native_build, (), msg="Building develop native code") | ||
setuptools_develop.run(self) | ||
|
||
|
||
if __name__ == "__main__": | ||
setuptools.setup() | ||
setuptools.setup(cmdclass={"build": BuildNative, "develop": DevelopNative}) |
This file was deleted.
Oops, something went wrong.
Binary file not shown.
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 |
---|---|---|
@@ -1,10 +1,8 @@ | ||
about_resource: GoReSym_lin | ||
name: goresym | ||
version: 011fc7d5c9c2362871dfe88a1295a43ee6b4d273 | ||
download_url: https://github.com/pombredanne/GoReSym/archive/011fc7d5c9c2362871dfe88a1295a43ee6b4d273.zip | ||
package_url: pkg:github/pombredanne/GoReSym@011fc7d5c9c2362871dfe88a1295a43ee6b4d273 | ||
name: GoReSym | ||
version: 3.0.1 | ||
package_url: pkg:github/mandiant/[email protected] | ||
copyright: Copyright (c) 2022 MANDIANT | ||
license_expression: mit | ||
license_text_file: GoReSym_lin.LICENSE | ||
notes: this is a patched version until https://github.com/mandiant/GoReSym/pull/60 is accepted | ||
and merged. | ||
notes: this is built from the source files contained in the go-inspector/lib-src directory |
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
Oops, something went wrong.