Browse Source

Builder source code

builder
Nemo 3 years ago
commit
59af1a4a69
  1. 9
      Dockerfile
  2. 21
      generate.sh

9
Dockerfile

@ -0,0 +1,9 @@
FROM ubuntu:18.10
RUN apt-get clean && apt-get update && apt-get install --yes gnupg2 ca-certificates && \
apt-key adv --fetch-keys https://updates.signal.org/desktop/apt/keys.asc
RUN echo "deb [arch=amd64] https://updates.signal.org/desktop/apt xenial main" | tee -a /etc/apt/sources.list.d/signal-xenial.list
COPY generate.sh /generate.sh
ENTRYPOINT ["/generate.sh"]

21
generate.sh

@ -0,0 +1,21 @@
#!/bin/bash
# docker build -t signal-builder .
# docker run --volume `pwd`:/data
apt-get update >/dev/null 2>&1
FILE="apt-cache.output"
PACKAGE="signal-desktop-beta"
apt-cache show $PACKAGE > $FILE
SHA256=$(awk '/SHA256: (.*)/{ print $2 }' $FILE)
VERSION=$(awk '/Version: .*/{ print $2 }' $FILE)
URL=$(awk '/Filename: .*/{ print $2 }' $FILE)
# Arch doesn't like dashes in Version numbers
ARCH_VERSION=$(echo $VERSION | tr -d '-')
cat << EOF >> PKGBUILD
pgver=$ARCH_VERSION
source=("https://updates.signal.org/desktop/apt/$URL")
sha256sums=('$SHA256')
EOF
cat PKGBUILD
Loading…
Cancel
Save