diff options
| author | Ophestra Umiker <cat@ophivana.moe> | 2024-12-17 14:02:54 +0900 |
|---|---|---|
| committer | Ophestra Umiker <cat@ophivana.moe> | 2024-12-17 14:02:54 +0900 |
| commit | b5cbbeab9091c592bcbb09a6365de1bc0bb58d7f (patch) | |
| tree | f2aaaceed3189e5cac06d6d75ddacb49eb91fa55 /dist | |
| parent | c3ba0c3cce4548e6b3fc78bbc482493623ce4c01 (diff) | |
dist: generate distribution tarball
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
Diffstat (limited to 'dist')
| -rw-r--r-- | dist/fsurc.default | 1 | ||||
| -rwxr-xr-x | dist/install.sh | 10 | ||||
| -rwxr-xr-x | dist/release.sh | 19 |
3 files changed, 30 insertions, 0 deletions
diff --git a/dist/fsurc.default b/dist/fsurc.default new file mode 100644 index 00000000..f770d5ef --- /dev/null +++ b/dist/fsurc.default @@ -0,0 +1 @@ +1000 0
\ No newline at end of file diff --git a/dist/install.sh b/dist/install.sh new file mode 100755 index 00000000..71b00d07 --- /dev/null +++ b/dist/install.sh @@ -0,0 +1,10 @@ +#!/bin/sh +cd "$(dirname -- "$0")" || exit 1 + +install -vDm0755 "bin/fortify" "${FORTIFY_INSTALL_PREFIX}/usr/bin/fortify" +install -vDm0755 "bin/fshim" "${FORTIFY_INSTALL_PREFIX}/usr/libexec/fortify/fshim" +install -vDm0755 "bin/finit" "${FORTIFY_INSTALL_PREFIX}/usr/libexec/fortify/finit" +install -vDm0755 "bin/fuserdb" "${FORTIFY_INSTALL_PREFIX}/usr/libexec/fortify/fuserdb" + +install -vDm6511 "bin/fsu" "${FORTIFY_INSTALL_PREFIX}/usr/bin/fsu" +install -vDm0400 "fsurc.default" "${FORTIFY_INSTALL_PREFIX}/etc/fsurc" diff --git a/dist/release.sh b/dist/release.sh new file mode 100755 index 00000000..85052777 --- /dev/null +++ b/dist/release.sh @@ -0,0 +1,19 @@ +#!/bin/sh -e +cd "$(dirname -- "$0")/.." +VERSION="${FORTIFY_VERSION:-untagged}" +pname="fortify-${VERSION}" +out="dist/${pname}" + +mkdir -p "${out}" +cp "README.md" "dist/fsurc.default" "dist/install.sh" "${out}" + +go build -v -o "${out}/bin/" -ldflags "-s -w + -X git.ophivana.moe/security/fortify/internal.Version=${VERSION} + -X git.ophivana.moe/security/fortify/internal.Fsu=/usr/bin/fsu + -X git.ophivana.moe/security/fortify/internal.Finit=/usr/libexec/fortify/finit + -X main.Fmain=/usr/bin/fortify + -X main.Fshim=/usr/libexec/fortify/fshim" ./... + +rm -f "./${out}.tar.gz" && tar -C dist -czf "${out}.tar.gz" "${pname}" +rm -rf "./${out}" +sha512sum "${out}.tar.gz" > "${out}.tar.gz.sha512"
\ No newline at end of file |
