Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- name: wine-platform-5-devel
- adopt-info: wine
- summary: wine platform snap it provides devel WINE 5 for snaps
- description: |
- This snap creates a WINE devel 5 via content sharing to be used by other snaps that are using WINE.
- grade: stable
- confinement: strict
- architectures:
- - build-on: amd64
- - build-on: i386
- base: core18
- slots:
- wine-5-devel:
- interface: content
- source:
- read:
- - $SNAP/opt/wine-devel
- parts:
- faudio-amd64:
- source: https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_18.04/amd64/libfaudio0_19.07-0~bionic_amd64.deb
- plugin: dump
- source-type: deb
- override-build: |
- snapcraftctl build
- faudio-i386:
- source: https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_18.04/i386/libfaudio0_19.07-0~bionic_i386.deb
- plugin: dump
- source-type: deb
- override-build: |
- snapcraftctl build
- wine:
- plugin: nil
- build-packages:
- - dpkg
- - wget
- override-build: |
- snapcraftctl build
- ARCH="$(dpkg --print-architecture)"
- WINE_VER="$(wget -qO- https://dl.winehq.org/wine-builds/ubuntu/dists/bionic/main/binary-amd64/ | grep wine-dev | sed 's|_| |g;s|~| |g' | awk '{print $5}' | tail -n1)"
- # set snap version
- snapcraftctl set-version "$WINE_VER"
- # wget and dpkg extract the wine debs
- ## supporting binaries which are arch-specific but the same filenames in both architectures so we only install the native architecture
- DEB_URLS="$DEB_URLS https://dl.winehq.org/wine-builds/ubuntu/dists/bionic/main/binary-${ARCH}/wine-devel_${WINE_VER}~bionic_${ARCH}.deb"
- ## wine loaders - this one is the native system architecture
- DEB_URLS="$DEB_URLS https://dl.winehq.org/wine-builds/ubuntu/dists/bionic/main/binary-${ARCH}/wine-devel-${ARCH}_${WINE_VER}~bionic_${ARCH}.deb"
- if [ "$ARCH" = "amd64" ]; then
- ## on amd64 builds we need to also bundle the i386 wine loaders
- DEB_URLS="$DEB_URLS https://dl.winehq.org/wine-builds/ubuntu/dists/bionic/main/binary-i386/wine-devel-i386_${WINE_VER}~bionic_i386.deb"
- fi
- for DEB_URL in ${DEB_URLS}; do
- DEB=$(basename "${DEB_URL}")
- echo "Downloading ${DEB_URL}..."
- wget --quiet "${DEB_URL}" -O "${SNAPCRAFT_PART_INSTALL}/${DEB}"
- echo "Unpacking ${DEB}..."
- dpkg -x "${SNAPCRAFT_PART_INSTALL}/${DEB}" ${SNAPCRAFT_PART_INSTALL}
- rm -f "${SNAPCRAFT_PART_INSTALL}/${DEB}"
- done
- # Cleanup
- rm -rf ${SNAPCRAFT_PART_INSTALL}/opt/wine-devel/share/applications
- rm -rf ${SNAPCRAFT_PART_INSTALL}/opt/wine-devel/share/man
- rm -rf ${SNAPCRAFT_PART_INSTALL}/usr
- # Disable winemenubuilder
- sed -i 's/winemenubuilder.exe -a -r/winemenubuilder.exe -r/g' "${SNAPCRAFT_PART_INSTALL}"/opt/wine-devel/share/wine/wine.inf
Add Comment
Please, Sign In to add comment