Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
192 lines (175 sloc) 4.95 KB
name: makemkv
summary: Backup your Bluray and DVD discs
description: |
Backup your Bluray and DVD discs
grade: stable
confinement: strict
adopt-info: makemkv-oss
base: core18
architectures:
- build-on: amd64
- build-on: i386
layout:
/etc/wgetrc:
bind-file: $SNAP/etc/wgetrc
/usr/bin/wget:
bind-file: $SNAP/usr/bin/wget
# plugs:
# optical-write:
# interface: optical-drive
# write: true
apps:
makemkv:
command: desktop-launch snapcraft-preload $SNAP/usr/bin/makemkv
desktop: usr/share/applications/makemkv.desktop
environment:
MAKEMKVCON: $SNAP/usr/bin/makemkvcon
JAVA_HOME: $SNAP/usr
plugs:
- desktop
- desktop-legacy
- gsettings
- hardware-observe
- home
- network
- opengl
- optical-drive
- process-control
- removable-media
- unity7
- wayland
- x11
makemkvcon:
command: snapcraft-preload $SNAP/usr/bin/makemkvcon.real
environment:
JAVA_HOME: $SNAP/usr
plugs:
- hardware-observe
- home
- network
- optical-drive
- process-control
- removable-media
parts:
libav:
source: https://ffmpeg.org/releases/ffmpeg-4.2.tar.xz
plugin: autotools
build-packages:
- libfdk-aac-dev
- yasm
configflags:
- --prefix=/usr
- --enable-static
- --disable-shared
- --enable-pic
- --enable-libfdk-aac
stage-packages:
- libfdk-aac1
- libxcb-shape0
snapcraft-preload:
source: https://github.com/diddledan/snapcraft-preload.git
source-branch: semaphore-support
plugin: cmake
build-packages:
- gcc-multilib
- g++-multilib
stage-packages:
- on amd64:
- lib32stdc++6
desktop-qt5:
source: https://github.com/ubuntu/snapcraft-desktop-helpers.git
source-subdir: qt
plugin: make
make-parameters: ["FLAVOR=qt5"]
build-packages:
- qtbase5-dev
- dpkg-dev
stage-packages:
- libxkbcommon0
- ttf-ubuntu-font-family
- dmz-cursor-theme
- light-themes
- adwaita-icon-theme
- gnome-themes-standard
- shared-mime-info
- libqt5gui5
- libgdk-pixbuf2.0-0
- libqt5svg5 # for loading icon themes which are svg
- locales-all
makemkv-oss:
after: [desktop-qt5, libav]
plugin: autotools
build-packages:
- curl
- libexpat1-dev
- libegl1-mesa-dev
- libgl1-mesa-dev
- libssl-dev
- qtbase5-dev
- tar
- zlib1g-dev
source: http://www.makemkv.com/download/makemkv-oss-x.xx.x.tar.gz
override-pull: |
VERSION="$(curl --silent --show-error --location \
'https://makemkv.com/forum/viewtopic.php?f=3&t=224' \
| grep -E 'http://www.makemkv.com/download/makemkv-bin-[0-9]+\.[0-9]+\.[0-9]+\.tar\.gz' \
| head -n1 | sed -E -e \
's|^.*\"http://www.makemkv.com/download/makemkv-bin-([0-9]+\.[0-9]+\.[0-9]+)\.tar\.gz\".*|\1|')"
echo "Setting snap version to '$VERSION'"
snapcraftctl set-version "$VERSION"
echo "$VERSION" > version
curl --silent --show-error --location "http://www.makemkv.com/download/makemkv-oss-$VERSION.tar.gz" | tar xz --strip-components=1
override-build: |
sed -i 's|Icon=.*|Icon=${SNAP}/usr/share/icons/hicolor/128x128/apps/makemkv.png|' makemkvgui/share/makemkv.desktop
snapcraftctl build
cp version $SNAPCRAFT_PART_INSTALL/version
configflags:
- --prefix=/usr
stage-packages:
- libexpat1
- libgconf-2-4
- libqt5core5a
- libqt5dbus5
- libqt5gui5
- libqt5widgets5
- libqt5waylandclient5
- libssl1.0.0
- libwayland-client0
- libwayland-cursor0
- libx11-6
- lsscsi
- qtwayland5
- zlib1g
prime:
- -version
makemkv-bin:
after: [makemkv-oss]
plugin: make
build-packages:
- openjdk-8-jre-headless # used to work out the right symlink dir in `override-build`
- execstack
source: http://www.makemkv.com/download/makemkv-bin-x.xx.x.tar.gz
override-pull: |
curl --silent --show-error --location "http://www.makemkv.com/download/makemkv-bin-$(cat "$SNAPCRAFT_STAGE/version").tar.gz" | tar xz --strip-components=1
override-build: |
mkdir tmp && touch tmp/eula_accepted
execstack -c bin/amd64/makemkvcon
execstack -c bin/i386/makemkvcon
snapcraftctl build
JDK=$(find /usr/lib/jvm -type d -name "java-8-openjdk-*" | head -n1 | xargs basename)
JDKBIN=../lib/jvm/$JDK/jre/bin
for exec in java javaws jexec jjs; do
ln -sf $JDKBIN/$exec $SNAPCRAFT_PART_INSTALL/usr/bin/$exec
done
mv $SNAPCRAFT_PART_INSTALL/usr/bin/makemkvcon $SNAPCRAFT_PART_INSTALL/usr/bin/makemkvcon.real
mkdir -p $SNAPCRAFT_PART_INSTALL/usr/bin
cat <<EOF > $SNAPCRAFT_PART_INSTALL/usr/bin/makemkvcon
#!/bin/sh
exec \$SNAP/bin/snapcraft-preload \$SNAP/usr/bin/makemkvcon.real "\$@"
EOF
chmod +x $SNAPCRAFT_PART_INSTALL/usr/bin/makemkvcon
stage:
- -usr/lib/jvm/java-8-openjdk-*/jre/lib/security/cacerts
stage-packages:
- openjdk-8-jre-headless
- wget
You can’t perform that action at this time.