ppp-sync/amdgpu.sh

70 lines
2.2 KiB
Bash
Raw Normal View History

2023-08-23 13:01:20 +02:00
#! /bin/bash
2023-08-23 13:23:16 +02:00
set -e
2023-08-23 13:08:14 +02:00
2023-08-23 13:44:37 +02:00
# AMDGPU MIRROR
2023-08-23 13:01:20 +02:00
mkdir -p ./output/amdgpu
2023-08-23 13:23:16 +02:00
cd ./output/amdgpu
2023-08-23 13:44:37 +02:00
# amdgpu drm dir
mkdir -p ./libd
cd ./libd
2023-08-24 16:02:06 +02:00
wget --recursive --no-parent -R "*20.04*.deb" -A "*" -m http://repo.radeon.com/amdgpu/5.5.3/ubuntu/pool/main/libd/
2023-08-24 15:46:51 +02:00
# Return to AMDGPU MIRROR
2023-08-23 13:44:37 +02:00
cd ../
2023-09-01 23:07:54 +02:00
# amdgpu mesa dir (depends only)
mkdir -p ./mesa
cd ./mesa
wget --recursive --no-parent -R "*20.04*.deb" -A "*" -m http://repo.radeon.com/amdgpu/5.5.3/ubuntu/pool/main/m/mesa-amdgpu/
# Return to AMDGPU MIRROR
cd ../
2023-08-23 13:44:37 +02:00
# amdgpu proprietary dir
mkdir -p ./proprietary
cd ./proprietary
2023-08-24 16:02:06 +02:00
wget --recursive --no-parent -R "*20.04*.deb" -A "*" -m https://repo.radeon.com/amdgpu/5.5.3/ubuntu/pool/proprietary/
2023-08-24 15:46:51 +02:00
# Return to AMDGPU MIRROR
2023-08-23 13:47:25 +02:00
cd ../
2023-08-24 15:13:08 +02:00
# amdgpu-dkms-firmware dir
mkdir -p ./amdgpu-dkms-firmware
cd ./amdgpu-dkms-firmware
2023-08-24 15:27:16 +02:00
wget http://repo.radeon.com/amdgpu/5.5.3/ubuntu/pool/main/a/amdgpu-dkms/amdgpu-dkms-firmware_6.0.5.50503-1620033.20.04_all.deb
2023-08-24 15:46:51 +02:00
# Return to AMDGPU MIRROR
2023-08-24 15:13:08 +02:00
cd ../
2023-08-24 15:02:08 +02:00
mkdir -p ./output
2023-09-02 22:09:00 +02:00
mkdir -p ./output-tmp
find . -name \*.deb -exec cp -vf {} ./output-tmp \;
cd ./output-tmp
for i in ./*.deb
do
mkdir $i-tmp
dpkg-deb -R $i $i-tmp
2023-09-02 22:48:57 +02:00
cat $i-tmp/DEBIAN/control | grep Version: | head -n1 | cut -d":" -f2- | tr -d ' ' > $i-version
2023-09-02 23:07:13 +02:00
sed -i "s#$(cat $i-version)#$(cat $i-version)-pika$(date +"%Y%m%d").lunar3#g" $i-tmp/DEBIAN/control
2023-09-02 22:09:00 +02:00
dpkg-deb -b $i-tmp $i-fixed.deb
done
cd ../
2023-09-02 22:13:26 +02:00
mv -v ./output-tmp/*-fixed.deb ./output/
2023-08-23 12:42:54 +02:00
2023-08-24 15:13:08 +02:00
# Sign the packages
dpkg-sig --sign builder ./output/*.deb
# Pull down existing ppa repo db files etc
rsync -azP --exclude '*.deb' ferreo@direct.pika-os.com:/srv/www/pikappa/ ./output/repo
2023-08-24 15:27:16 +02:00
# Check if the amdgpu component exists
2023-08-24 15:32:26 +02:00
if cat ./output/repo/conf/distributions | grep Components: | grep amdgpu
2023-08-24 15:27:16 +02:00
then
true
else
2023-08-24 15:32:26 +02:00
sed -i "s#Components:#Components: amdgpu#" ./output/repo/conf/distributions
2023-08-24 15:27:16 +02:00
fi
2023-08-28 14:17:35 +02:00
apt remove reprepro -y
wget -nv https://launchpad.net/ubuntu/+archive/primary/+files/reprepro_5.3.0-1.4_amd64.deb
apt install -y ./reprepro_5.3.0-1.4_amd64.deb
2023-08-23 12:42:54 +02:00
# Add the new package to the repo
2023-08-24 15:13:08 +02:00
reprepro -C amdgpu -V --basedir ./output/repo/ includedeb lunar ./output/*.deb
2023-08-23 12:42:54 +02:00
# Push the updated ppa repo to the server
2023-08-24 15:13:08 +02:00
rsync -azP ./output/repo/ ferreo@direct.pika-os.com:/srv/www/pikappa/