makedeb


surgescript-bullseye 0.5.5-1


SurgeScript is a scripting language for games (bullseye version).

Viewing /PKGBUILD.

View raw.

Click here to go back to the Git tree for surgescript-bullseye.

# Maintainer: exponential <echo ZXhwb25lbnRpYWxtYXRyaXhAcHJvdG9ubWFpbC5jb20K | base64 -d>
# Contributor: José Rebelo (AUR) <joserebelo at outlook dot com>

_name=surgescript
pkgname=surgescript-bullseye
pkgver=0.5.5
pkgrel=1
pkgdesc='SurgeScript is a scripting language for games (bullseye version).'
arch=('i386' 'amd64' 'arm' 'armel' 'armhf' 'arm64')
url='https://github.com/alemart/surgescript'
license=('Apache-2.0')
provides=('surgescript')
conflicts=('surgescript')
makedepends=('cmake')
source=("$pkgname-$pkgver.tar.gz::https://github.com/alemart/surgescript/archive/v$pkgver.tar.gz")
sha256sums=('c9f59131d5cd921a11fb1335fe93bd754f4b1eefa1ed95aaa0343a28437f3f78')

prepare() {
  cd $_name-$pkgver
  # remove full path of complilation dir
  sed -i 's!^# Build the library$!function(drop_compilation_paths TARGET)\nif(NOT MSVC)\ntarget_compile_options(\${TARGET} PUBLIC "-ffile-prefix-map=\${CMAKE_SOURCE_DIR}=.")\nendif()\nendfunction()\n\n# Build the library!' CMakeLists.txt
  sed -i 's!set_target_properties(surgescript PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${LIB_SOVERSION})!set_target_properties(surgescript PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${LIB_SOVERSION})\ndrop_compilation_paths(surgescript)!' CMakeLists.txt
  sed -i 's!set_target_properties(surgescript-static PROPERTIES VERSION ${PROJECT_VERSION})!set_target_properties(surgescript-static PROPERTIES VERSION ${PROJECT_VERSION})\ndrop_compilation_paths(surgescript-static)!' CMakeLists.txt
  sed -i 's!set_target_properties(surgescript.bin PROPERTIES OUTPUT_NAME surgescript)!set_target_properties(surgescript.bin PROPERTIES OUTPUT_NAME surgescript)\ndrop_compilation_paths(surgescript.bin)!' CMakeLists.txt
}

build() {
  cd $_name-$pkgver

  mkdir -p build && cd build

  cmake ..
  make
}

package() {
  cd $_name-$pkgver/build
  make DESTDIR="$pkgdir/" install

  cd ..
  install -Dm644 "LICENSE" "$pkgdir/usr/share/doc/$pkgname/license"
  install -Dm644 "README.md" "$pkgdir/usr/share/doc/$pkgname/readme"
  install -Dm644 "CHANGES.md" "$pkgdir/usr/share/doc/$pkgname/changelog"
  gzip "$pkgdir/usr/share/doc/$pkgname/changelog"
}