diff options
author | Jianfeng Zhang | 2018-08-17 14:05:02 -0700 |
---|---|---|
committer | Jianfeng Zhang | 2018-08-17 14:05:02 -0700 |
commit | 7c8f8e32b4d5661a5131aab847f666e7a5091192 (patch) | |
tree | 83d747033b7daa660b78bfac75ec87b5f7afb6b9 /PKGBUILD | |
parent | 20a47e3164a521ea871df28d7caca3c1dfe2cf88 (diff) | |
download | aur-7c8f8e32b4d5661a5131aab847f666e7a5091192.tar.gz |
update build process
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 43 |
1 files changed, 16 insertions, 27 deletions
@@ -2,22 +2,22 @@ pkgname=poi _pkgname=poi -pkgver=9.0.0.beta.0.0.gd40eddfd +pkgver=9.0.0.beta.1.0.gd5de3c84 pkgrel=1 pkgdesc="Scalable KanColle browser and tool" arch=('any') url="https://github.com/poooi/poi/" license=('MIT') -depends=('electron' 'sh') -makedepends=('git' 'nodejs' 'yarn' 'coreutils' 'findutils' 'sed' 'imagemagick' 'tar' 'zlib' 'unzip' 'gulp' 'npm' 'python2') +depends=('npm' 'sh') +makedepends=('git' 'nodejs' 'coreutils' 'findutils' 'sed' 'imagemagick' 'tar' 'zlib' 'unzip' 'gulp' 'npm' 'python2') provides=("${_pkgname}") conflicts=("${_pkgname}") source=("git+https://github.com/poooi/poi.git" "${_pkgname}.desktop" "${_pkgname}.sh") sha256sums=('SKIP' - '24f89c538a189a5db96be3e3228aba6e4e7d332c5a368b15dacb6e97ee6f7586' - '1d49f43801fcc28d1a2a75407422a6445314fbf815e004382fc2cb5b956ac530') + '24f89c538a189a5db96be3e3228aba6e4e7d332c5a368b15dacb6e97ee6f7586' + 'f6c559d512379263b77a043e668eb846c53f5487fc932c1003f08c7dc1ad14e2') options=('!strip') # nothing to strip @@ -31,35 +31,24 @@ pkgver() { git describe --tags --long | sed 's/^v//;s/-/./g' } -compile() { - local filename - filename="$1" - echo "[Compile] ${filename}" - node -e "console.log(require('babel-core').transformFileSync(process.argv[1], require('./babel.config.js')).code)" "$filename" > "${filename%.es}.js" \ - && rm "$filename" -} - build() { cd "${srcdir}/${_pkgname}" git clean -xdf - #sed -i 's/^.*"electron-prebuilt".*$//;s/^.*"electron-builder".*$//;s/^.*"electron-builder-squirrel-windows".*$//;s/^.*"electron".*$//' package.json - yarn install - yarn add eachr # workaround - # prevent infinite loop... - timeout 5m gulp deploy - export -f compile - # do not compile now - #find . -type f -name '*.es' -exec bash -c 'compile "$0"' {} \; - yarn install --production + npm install + npm run deploy + gulp build + # workaround: require electron >= 3.0.0 + cd app_compiled + npm install electron@beta } package() { - cd "${srcdir}" - - for path in app.js assets babel.config.js i18n index.html index.js lib LICENSE node_modules package.json PepperFlash views; do - find "${_pkgname}/${path}" -type f -exec install -Dm644 {} "${pkgdir}/usr/share/{}" \; - done + mkdir -p "${pkgdir}/usr/share" + cp -r "${srcdir}/${_pkgname}/app_compiled" "${pkgdir}/usr/share/poi" + # workaround for strange behavior of babel + mkdir -p "${pkgdir}/usr/share/poi/node_modules/.cache/@babel/register" + cd "${srcdir}" install -Dm644 "${_pkgname}.desktop" "${pkgdir}/usr/share/applications/${_pkgname}.desktop" for s in 16 24 32 48 64 96 128 512; do |