upg lz4
This commit is contained in:
parent
f366d138f3
commit
dc6a886a73
3 changed files with 42 additions and 52 deletions
57
lz4/PKGBUILD
57
lz4/PKGBUILD
|
@ -8,47 +8,47 @@
|
|||
pkgname=lz4
|
||||
epoch=1
|
||||
pkgver=1.9.4
|
||||
pkgrel=01
|
||||
pkgrel=02
|
||||
pkgdesc='Extremely fast compression algorithm'
|
||||
#url='http://www.lz4.org/'
|
||||
url='https://lz4.github.io/lz4/'
|
||||
makedepends=('git' 'gcc')
|
||||
makedepends=('git' 'cmake' 'ninja')
|
||||
checkdepends=('diffutils')
|
||||
depends=('glibc')
|
||||
source=("git+https://github.com/lz4/lz4.git#tag=v$pkgver")
|
||||
|
||||
prepare() {
|
||||
cd $pkgname
|
||||
# apply patch from the source array (should be a pacman feature)
|
||||
local src
|
||||
for src in "${source[@]}"; do
|
||||
src="${src%%::*}"
|
||||
src="${src##*/}"
|
||||
[[ $src = *.patch ]] || continue
|
||||
msg2 "Applying patch $src..."
|
||||
patch -Np1 < "../$src"
|
||||
done
|
||||
}
|
||||
#prepare() {
|
||||
# cd $pkgname
|
||||
# # apply patch from the source array (should be a pacman feature)
|
||||
# local src
|
||||
# for src in "${source[@]}"; do
|
||||
# src="${src%%::*}"
|
||||
# src="${src##*/}"
|
||||
# [[ $src = *.patch ]] || continue
|
||||
# msg2 "Applying patch $src..."
|
||||
# patch -Np1 < "../$src"
|
||||
# done
|
||||
#}
|
||||
|
||||
build() {
|
||||
# do not use the main makefile, it calls sub make with -e
|
||||
# exported CLFAGS by makepkg break the version. see FS#50071
|
||||
cd $pkgname
|
||||
make -C lib PREFIX=/usr
|
||||
make -C programs PREFIX=/usr lz4 lz4c
|
||||
cmake -B build -S "$pkgname"/build/cmake \
|
||||
-G Ninja \
|
||||
-DCMAKE_BUILD_TYPE='None' \
|
||||
-DCMAKE_INSTALL_PREFIX='/usr' \
|
||||
-Wno-dev
|
||||
cmake --build build
|
||||
}
|
||||
|
||||
check() {
|
||||
rm -f passwd.lz4
|
||||
$pkgname/programs/lz4 /etc/passwd passwd.lz4
|
||||
$pkgname/programs/lz4 -d passwd.lz4 passwd
|
||||
build/lz4 /etc/passwd passwd.lz4
|
||||
build/lz4 -d passwd.lz4 passwd
|
||||
diff -q /etc/passwd passwd
|
||||
rm passwd
|
||||
}
|
||||
|
||||
package() {
|
||||
cd $pkgname
|
||||
make install PREFIX=/usr DESTDIR="$pkgdir"
|
||||
DESTDIR="$pkgdir" cmake --install build
|
||||
}
|
||||
|
||||
#---- arch license gpg-key & sha256sums ----
|
||||
|
@ -59,9 +59,10 @@ license=('GPL2')
|
|||
|
||||
sha256sums=(SKIP)
|
||||
|
||||
|
||||
|
||||
# Note to packager:
|
||||
ls -l *pkg.tar.lz
|
||||
echo "you must rename this package to meet SF naming before you move to the repo"
|
||||
mv $(ls -l $pkgname*pkg.tar.lz) $pkgname-$epoch_$pkgver-$pkgrel-$arch.pkg.tar.lz >pkg-mv.log
|
||||
#ls -l *pkg.tar.lz
|
||||
#echo "you must rename this package to meet SF naming before you move to the repo"
|
||||
#mv $(ls -l $pkgname*pkg.tar.lz) $pkgname-$epoch_$pkgver-$pkgrel-$arch.pkg.tar.lz >pkg-mv.log
|
||||
|
||||
## c87b197b2531332824b5b001b1761d6878c96b157a8d2e7ed3901918b5c9c092 lz4-1_1.9.4-02-x86_64.pkg.tar.lz
|
||||
|
||||
|
|
|
@ -3,49 +3,36 @@
|
|||
pkgname=lz4
|
||||
epoch=1
|
||||
pkgver=1.9.4
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
pkgdesc='Extremely fast compression algorithm'
|
||||
arch=('x86_64')
|
||||
url='https://lz4.github.io/lz4/'
|
||||
license=('GPL2')
|
||||
makedepends=('git')
|
||||
makedepends=('git' 'cmake' 'ninja')
|
||||
checkdepends=('diffutils')
|
||||
depends=('glibc')
|
||||
source=("git+https://github.com/lz4/lz4.git#tag=v$pkgver")
|
||||
sha256sums=('SKIP')
|
||||
|
||||
prepare() {
|
||||
cd $pkgname
|
||||
# apply patch from the source array (should be a pacman feature)
|
||||
local src
|
||||
for src in "${source[@]}"; do
|
||||
src="${src%%::*}"
|
||||
src="${src##*/}"
|
||||
[[ $src = *.patch ]] || continue
|
||||
msg2 "Applying patch $src..."
|
||||
patch -Np1 < "../$src"
|
||||
done
|
||||
}
|
||||
|
||||
build() {
|
||||
# do not use the main makefile, it calls sub make with -e
|
||||
# exported CLFAGS by makepkg break the version. see FS#50071
|
||||
cd $pkgname
|
||||
make -C lib PREFIX=/usr
|
||||
make -C programs PREFIX=/usr lz4 lz4c
|
||||
cmake -B build -S "$pkgname"/build/cmake \
|
||||
-G Ninja \
|
||||
-DCMAKE_BUILD_TYPE='None' \
|
||||
-DCMAKE_INSTALL_PREFIX='/usr' \
|
||||
-Wno-dev
|
||||
cmake --build build
|
||||
}
|
||||
|
||||
check() {
|
||||
rm -f passwd.lz4
|
||||
$pkgname/programs/lz4 /etc/passwd passwd.lz4
|
||||
$pkgname/programs/lz4 -d passwd.lz4 passwd
|
||||
build/lz4 /etc/passwd passwd.lz4
|
||||
build/lz4 -d passwd.lz4 passwd
|
||||
diff -q /etc/passwd passwd
|
||||
rm passwd
|
||||
}
|
||||
|
||||
package() {
|
||||
cd $pkgname
|
||||
make install PREFIX=/usr DESTDIR="$pkgdir"
|
||||
DESTDIR="$pkgdir" cmake --install build
|
||||
}
|
||||
|
||||
# vim:set ts=2 sw=2 et:
|
||||
|
|
2
lz4/deps
2
lz4/deps
|
@ -1,3 +1,5 @@
|
|||
git
|
||||
cmake
|
||||
ninja
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue