-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Static desktop-file-validate and zsyncmake (#47)
* Add install-static-desktop-file-validate.sh * Build latest desktop-file-utils statically with meson --------- Co-authored-by: TheAssassin <[email protected]>
- Loading branch information
1 parent
d870d4f
commit ad50c02
Showing
4 changed files
with
84 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#! /bin/bash | ||
|
||
set -euxo pipefail | ||
|
||
if [[ "${1:-}" == "" ]]; then | ||
echo "Usage: $0 <version>" | ||
exit 2 | ||
fi | ||
|
||
version="$1" | ||
|
||
build_dir="$(mktemp -d -t desktop-file-utils-build-XXXXXX)" | ||
|
||
cleanup () { | ||
if [ -d "$build_dir" ]; then | ||
rm -rf "$build_dir" | ||
fi | ||
} | ||
trap cleanup EXIT | ||
|
||
pushd "$build_dir" | ||
|
||
# apk add glib-static glib-dev autoconf automake # Moved to build-in-docker.sh | ||
|
||
wget -c "https://gitlab.freedesktop.org/xdg/desktop-file-utils/-/archive/"$version"/desktop-file-utils-"$version".tar.gz" | ||
tar xf desktop-file-utils-*.tar.gz | ||
cd desktop-file-utils-*/ | ||
|
||
# setting LDFLAGS as suggested in https://mesonbuild.com/Creating-Linux-binaries.html#building-and-installing | ||
env LDFLAGS=-static meson setup build --prefer-static --default-library=static | ||
|
||
if [[ "${GITHUB_ACTIONS:-}" != "" ]]; then | ||
jobs="$(nproc)" | ||
else | ||
jobs="$(nproc --ignore=1)" | ||
fi | ||
|
||
ninja -C build -j "$jobs" -v | ||
ninja -C build -j 1 -v install |
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,38 @@ | ||
#! /bin/bash | ||
|
||
set -euxo pipefail | ||
|
||
if [[ "${1:-}" == "" ]]; then | ||
echo "Usage: $0 <version>" | ||
exit 2 | ||
fi | ||
|
||
version="$1" | ||
|
||
build_dir="$(mktemp -d -t zsyncmake-build-XXXXXX)" | ||
|
||
cleanup () { | ||
if [ -d "$build_dir" ]; then | ||
rm -rf "$build_dir" | ||
fi | ||
} | ||
trap cleanup EXIT | ||
|
||
pushd "$build_dir" | ||
|
||
wget http://zsync.moria.org.uk/download/zsync-"$version".tar.bz2 -q | ||
tar xf zsync-*.tar.bz2 | ||
|
||
cd zsync-*/ | ||
|
||
find . -type f -exec sed -i -e 's|off_t|size_t|g' {} \; | ||
|
||
./configure CFLAGS=-no-pie LDFLAGS=-static --prefix=/usr --build=$(arch)-unknown-linux-gnu | ||
|
||
if [[ "${GITHUB_ACTIONS:-}" != "" ]]; then | ||
jobs="$(nproc)" | ||
else | ||
jobs="$(nproc --ignore=1)" | ||
fi | ||
|
||
make -j"$jobs" install |