pantry/projects/sourceware.org/bzip2/package.yml

85 lines
1.9 KiB
YAML
Raw Normal View History

2022-08-02 04:08:18 +03:00
distributable:
url: https://sourceware.org/pub/bzip2/bzip2-{{ version }}.tar.gz
strip-components: 1
versions:
github: libarchive/bzip2/tags
strip: /^bzip2-/
provides:
- bin/bunzip2
- bin/bzcat
- bin/bzcmp
2022-08-02 04:08:18 +03:00
- bin/bzdiff
- bin/bzgrep
- bin/bzegrep
- bin/bzfgrep
2022-08-02 04:08:18 +03:00
- bin/bzip2
- bin/bzip2recover
- bin/bzmore
- bin/bzless
2022-08-02 04:08:18 +03:00
build:
script:
- make --environment-overrides
- make --environment-overrides install
# fix absolute symlinks
- run: |
for x in *; do
if [ -L $x ]; then
y="$(readlink $x)"
rm $x
ln -s $(basename "$y") $x
fi
done
working-directory: '{{prefix}}/bin'
- if: linux
run: |
make \
--file Makefile-libbz2_so \
--environment-overrides \
--jobs {{ hw.concurrency }}
mv libbz2.*.1.* {{ prefix }}/lib
cd {{ prefix }}/lib
test -e libbz2.so || ln -s libbz2.so.{{ version }} libbz2.so
test -e libbz2.so.{{ version.major }} || ln -s libbz2.so.{{ version }} libbz2.so.{{ version.major }}
- if: darwin
run: |
# necessary until brewkit v1
if [ -n "$(ls {{ prefix }}/lib/*.dylib)" ]; then
rm {{ prefix }}/lib/*.dylib
fi
make \
--file props/Makefile-libbz2_dylib \
--environment-overrides \
--jobs {{ hw.concurrency }}
cd {{ prefix }}/lib
test -e libbz2.dylib
test -e libbz2.{{version}}.dylib
ln -s libbz2.{{version}}.dylib libbz2.{{version.major}}.dylib
2022-08-17 15:22:22 +03:00
2022-08-02 04:08:18 +03:00
env:
PREFIX: ${{ prefix }}
2022-11-12 02:47:42 +03:00
darwin:
PKG_VERSION: ${{ version }}
2022-08-02 04:08:18 +03:00
test:
script:
- |
OUT=$(echo "$INPUT" | bzip2 | bunzip2)
test "$OUT" = "$INPUT"
# test symlinks are functional
# sadly bzegrep has no `--help`
- |
echo "$INPUT" > file
bzip2 file
bzegrep test-string file.bz2
2022-08-02 04:08:18 +03:00
env:
INPUT: tea.xyz.test-string