-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild-cgif.sh
49 lines (35 loc) · 1.42 KB
/
build-cgif.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/bash -eu
source /env.sh
if [ "$(lsb_release -cs)" != "focal" ]; then
echo "No need to build cgif on $(lsb_release -cs)"
exit 0
fi
SOURCE_DIST=oracular
# Get source from unstable so we get the latest available source
echo "deb-src http://archive.ubuntu.com/ubuntu/ $SOURCE_DIST universe restricted" > "/etc/apt/sources.list.d/ubuntu-unstable-sources.list"
apt-get update
# Make available modern meson, required by libvips
add-apt-repository -y ppa:ubuntu-support-team/meson
mkdir -p /tmp/build-cgif && cd /tmp/build-cgif
apt-get -q -y source cgif
SRCDIR=$(find . -mindepth 1 -maxdepth 1 -type d)
cd "$SRCDIR"
if [ "$(lsb_release -cs)" == "focal" ]; then
# Correct debhelper-compat for focal
sed --in-place 's/debhelper-compat (= 13)/debhelper-compat (= 12)/' debian/control
# The DEB_HOST_MULTIARCH variable doesn't appear to work (files not found)
sed --in-place -e 's/${DEB_HOST_MULTIARCH}/\*/' debian/*.install
elif [ "$(lsb_release -cs)" == "jammy" ]; then
true
fi
apt-get build-dep -y .
dch --local "~$(lsb_release -sc)$(date +%Y%m%d%H%M)" --distribution $(lsb_release -sc) 'New upstream release backported.'
# Test that we can actually build it, it's easier to do that locally than wait for launchpad to do it
# even though it makes this take longer
debuild
# Build the source
debuild -S -sd
cd ..
dput ppa:$PPANAME/vips $(find . -type f -name '*source.changes')
# Install so we can build vips with it
dpkg --install *.deb