makedeb


vvvvvv 2.4.1-0


A retro-styled 2D platformer

Viewing /PKGBUILD.

View raw.

Click here to go back to the Git tree for vvvvvv.

# Maintainer: exponential <echo ZXhwb25lbnRpYWxtYXRyaXhAcHJvdG9ubWFpbC5jb20K | base64 -d>
# Contributor: gadget3000 (AUR) <gadget3000 at msn dot com>
# Contributor: mikers (AUR) <mikeonthecomputer at gmail dot com>
# Contributor: Eric Anderson (AUR) <ejona86@gmail.com>

pkgname=vvvvvv
_pkgname=VVVVVV
pkgver=2.4.1
pkgrel=0
pkgdesc='A retro-styled 2D platformer'
arch=('i386' 'amd64')
url='https://thelettervsixtim.es/'
license=('custom')
depends=('libsdl2-mixer-2.0-0')
makedepends=('cmake' 'libsdl2-mixer-dev')
source=("${_pkgname}-${pkgver}.zip::https://github.com/TerryCavanagh/${_pkgname}/releases/download/${pkgver}/${_pkgname}-${pkgver}.zip"
        "https://thelettervsixtim.es/makeandplay/data.zip")
sha256sums=('c453373cfa29456318c2ece7d452b2e971595004c1b353cd7073f6912b3c3d12'
            'c767809594f6472da9f56136e76657e38640d584164a46112250ac6293ecc0ea')
noextract=("data.zip" "${_pkgname}-${pkgver}.zip")

prepare() {
  cd "${srcdir}"
  # extract archive
  mkdir -p "${_pkgname}-${pkgver}"
  bsdtar -xf "${_pkgname}-${pkgver}.zip" -C "${_pkgname}-${pkgver}"
  # extract icon 
  mkdir -p data
  cd data
  bsdtar -xf ../data.zip VVVVVV.png
}

build() {
  cd "${srcdir}/${_pkgname}-${pkgver}/${_pkgname}/desktop_version"
  # build
  mkdir -p build
  cd build
  cmake -DOFFICIAL_BUILD=ON ..
  make
  # data license
  cd "${srcdir}/data"
  cat >> LICENSE <<EOF
Please note that the game was compiled with the original levels, so game assets
data.zip and vvvvvv.png are not redistributable. Only for personal use.
EOF
}

package() {
  cd "${srcdir}/${_pkgname}-${pkgver}/${_pkgname}"

  install -D -m755 "desktop_version/build/${_pkgname}" \
      "${pkgdir}/usr/libexec/${pkgname}/${_pkgname}"
  install -D -m644 "LICENSE.md" \
      "${pkgdir}/usr/share/doc/${pkgname}/LICENSE"

  cd "${srcdir}/data"

  install -D -m644 "LICENSE" \
      "${pkgdir}/usr/share/doc/${pkgname}/LICENSE-data"
  install -D -m644 "VVVVVV.png" \
      "${pkgdir}/usr/share/pixmaps/${pkgname}.png"

  install -D -m644 "${srcdir}/data.zip" "${pkgdir}/usr/share/games/${pkgname}/data.zip"

  install -d "${pkgdir}/usr/games"
  ln -s "../libexec/${pkgname}/${_pkgname}" "${pkgdir}/usr/games/${pkgname}"
  ln -s "../../share/games/${pkgname}/data.zip" "${pkgdir}/usr/libexec/${pkgname}/data.zip"

  install -d -m644 "${pkgdir}/usr/share/applications"
 
  echo "[Desktop Entry]
Version=1.0
Type=Application
Name=$_pkgname
Comment=A retro styled 2D platformer
Exec=/usr/games/$pkgname
Icon=$pkgname
Terminal=false
Categories=Game" > "${pkgdir}/usr/share/applications/${pkgname}.desktop"

}