generated from general-packages/pika-pkg-template
fetcher
This commit is contained in:
parent
2b325e9efd
commit
19bac3b0aa
38
fetch.sh
Executable file
38
fetch.sh
Executable file
@ -0,0 +1,38 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
. ./pika-build-config.sh
|
||||||
|
|
||||||
|
if [[ $PIKA_BUILD_ARCH == "amd64-v3" ]]
|
||||||
|
then
|
||||||
|
export PIKA_BIN_ARCH="amd64"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $PIKA_BUILD_ARCH == "i386" ]]
|
||||||
|
then
|
||||||
|
export PIKA_BIN_ARCH="i386"
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p ./output
|
||||||
|
|
||||||
|
#
|
||||||
|
for bin_pkg in $(apt showsrc "PIKA_PACKAGE_VERSION" | grep -E "^Binary:" | cut -d":" -f2- | sed 's/\,/\n/g' | sed 's/\ /\n/g' | sed '/^$/d')
|
||||||
|
do
|
||||||
|
BIN_VERSION=$(apt show $bin_pkg:$PIKA_BIN_ARCH 2>&1 | grep Version: | head -n1 | cut -f2- -d":" | cut -f2- -d":" | tr -d ' ')
|
||||||
|
TARGET_VERSION=$(echo $BIN_VERSION | sed 's/\+b.*//')
|
||||||
|
apt download -y $bin_pkg:$PIKA_BIN_ARCH || echo "$bin_pkg doesn't exist in $PIKA_BIN_ARCH"
|
||||||
|
if [[ $BIN_VERSION == $TARGET_VERSION ]]
|
||||||
|
then
|
||||||
|
mv ./*.deb ./output/
|
||||||
|
else
|
||||||
|
for i in ./*.deb
|
||||||
|
do
|
||||||
|
mkdir $i-tmp
|
||||||
|
dpkg-deb -R $i $i-tmp
|
||||||
|
sed -i "s#$BIN_VERSION#$TARGET_VERSION#g" $i-tmp/DEBIAN/control
|
||||||
|
dpkg-deb -b $i-tmp $i-fixed.deb
|
||||||
|
mv ./*-fixed.deb ./output/
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
done
|
17
main.sh
17
main.sh
@ -6,15 +6,24 @@ set -e
|
|||||||
### TEMP UNTIL BUILDER IS ADAPTED
|
### TEMP UNTIL BUILDER IS ADAPTED
|
||||||
if [[ "$PIKA_BUILD_ARCH" == "i386" ]]
|
if [[ "$PIKA_BUILD_ARCH" == "i386" ]]
|
||||||
then
|
then
|
||||||
export PIKA_BUILD_USE_PBUILDER=1
|
#export PIKA_BUILD_BUILDSYSTEM="pbuilder"
|
||||||
|
export PIKA_BUILD_BUILDSYSTEM="fetch"
|
||||||
else
|
else
|
||||||
export PIKA_BUILD_USE_PBUILDER=1
|
export PIKA_BUILD_BUILDSYSTEM="native"
|
||||||
fi
|
fi
|
||||||
###
|
###
|
||||||
|
|
||||||
if [[ "$PIKA_BUILD_USE_PBUILDER" == "1" ]]
|
if [[ "$PIKA_BUILD_BUILDSYSTEM" == "pbuilder" ]]
|
||||||
then
|
then
|
||||||
./pbuilder.sh
|
./pbuilder.sh
|
||||||
else
|
fi
|
||||||
|
|
||||||
|
if [[ "$PIKA_BUILD_BUILDSYSTEM" == "native" ]]
|
||||||
|
then
|
||||||
./native.sh
|
./native.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ "$PIKA_BUILD_BUILDSYSTEM" == "fetch" ]]
|
||||||
|
then
|
||||||
|
./fetch.sh
|
||||||
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user