Skip to content

Commit

Permalink
Merge pull request #3 from txtsd/ci
Browse files Browse the repository at this point in the history
  • Loading branch information
txtsd committed Oct 20, 2023
2 parents d7015a9 + fe66aa7 commit c82831a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion blockbench/.SRCINFO
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pkgbase = blockbench
pkgdesc = A low-poly 3D model editor
pkgver = 4.8.3
pkgrel = 1
pkgrel = 2
url = https://blockbench.net/
arch = x86_64
license = GPL3
Expand Down
32 changes: 16 additions & 16 deletions blockbench/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,46 +2,46 @@
# Contributor: mrAppleXZ <mr.applexz@gmail.com>

pkgname=blockbench
_pkgname=Blockbench
pkgver=4.8.3
pkgrel=1
pkgrel=2
pkgdesc="A low-poly 3D model editor"
arch=('x86_64')
url="https://blockbench.net/"
license=('GPL3')
provides=(blockbench)
conflicts=(blockbench)

_pkgname=blockbench
_electron=electron
_electronDist=/usr/lib/${_electron}
_electronVersion=$(cat ${_electronDist}/version)
_electronVersionMajor=${_electronVersion%%.*}

depends=("${_electron}" 'giblib')
makedepends=(git npm)
source=("${_pkgname}::git+https://github.com/JannisX11/blockbench#tag=v${pkgver}"
"${_pkgname}.desktop")
source=("${pkgname}::git+https://github.com/JannisX11/blockbench#tag=v${pkgver}"
"${pkgname}.desktop")
sha256sums=('SKIP'
'74731a9f68dbef112c93dafee1a1a8665b9de0816f94643169419ad838dbf66c')

prepare() {
cd "${srcdir}/${_pkgname}"
cd "${srcdir}/${pkgname}"

_electronDist=/usr/lib/${_electron}
_electronVersion=$(cat ${_electronDist}/version)
_electronVersionMajor=${_electronVersion%%.*}

npm install
}

build() {
cd "${srcdir}/${_pkgname}"
cd "${srcdir}/${pkgname}"
npm run dist -- --linux --x64 --dir -c.electronDist=${_electronDist} -c.electronVersion=${_electronVersion}
}

package() {
install -d "${pkgdir}/usr/"{bin,share/{pixmaps,applications}}
install -d "${pkgdir}/${_electronDist}${_electronVersionMajor}/resources"
echo -e "#!/bin/bash\nexec ${_electron} ${_electronDist}${_electronVersionMajor}/resources/${_pkgname}.asar \"\$@\"" > "${pkgdir}/usr/bin/${_pkgname}"
chmod 755 "${pkgdir}/usr/bin/${_pkgname}"
install "${srcdir}/${_pkgname}/icon.png" "${pkgdir}/usr/share/pixmaps/${_pkgname}.png"
install "${srcdir}/${_pkgname}.desktop" "${pkgdir}/usr/share/applications/${_pkgname}.desktop"
install "${srcdir}/${_pkgname}/dist/linux-unpacked/resources/app.asar" "${pkgdir}${_electronDist}${_electronVersionMajor}/resources/${_pkgname}.asar"
cp -r "${srcdir}/${_pkgname}/dist/linux-unpacked/resources/app.asar.unpacked" "${pkgdir}${_electronDist}${_electronVersionMajor}/resources/${_pkgname}.asar.unpacked"
echo -e "#!/bin/bash\nexec ${_electron} ${_electronDist}${_electronVersionMajor}/resources/${pkgname}.asar \"\$@\"" > "${pkgdir}/usr/bin/${pkgname}"
chmod 755 "${pkgdir}/usr/bin/${pkgname}"
install "${srcdir}/${pkgname}/icon.png" "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
install "${srcdir}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
install "${srcdir}/${pkgname}/dist/linux-unpacked/resources/app.asar" "${pkgdir}${_electronDist}${_electronVersionMajor}/resources/${pkgname}.asar"
cp -r "${srcdir}/${pkgname}/dist/linux-unpacked/resources/app.asar.unpacked" "${pkgdir}${_electronDist}${_electronVersionMajor}/resources/${pkgname}.asar.unpacked"
}

0 comments on commit c82831a

Please sign in to comment.