mirror of
https://github.com/archlinux/aur.git
synced 2026-03-05 19:32:33 +01:00
update to 1.3.0.r3.g080670f
This commit is contained in:
parent
36b430df45
commit
0332fbdb51
2 changed files with 37 additions and 26 deletions
4
.SRCINFO
4
.SRCINFO
|
|
@ -1,6 +1,6 @@
|
|||
pkgbase = miru-viewer-git
|
||||
pkgdesc = GitHub Issue/Pull Request/Release viewer
|
||||
pkgver = 1.3.0.r0.g62fb2fd
|
||||
pkgdesc = GitHub Issue/Pull Request/Release viewer.Use system-wide electron.
|
||||
pkgver = 1.3.0.r3.g080670f
|
||||
pkgrel = 1
|
||||
url = https://github.com/ytakahashi/miru
|
||||
arch = any
|
||||
|
|
|
|||
59
PKGBUILD
59
PKGBUILD
|
|
@ -1,11 +1,11 @@
|
|||
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
|
||||
_pkgname=miru
|
||||
pkgname="${_pkgname}-viewer-git"
|
||||
pkgver=1.3.0.r0.g62fb2fd
|
||||
pkgver=1.3.0.r3.g080670f
|
||||
_electronversion=31
|
||||
_nodeversion=18
|
||||
_nodeversion=20
|
||||
pkgrel=1
|
||||
pkgdesc="GitHub Issue/Pull Request/Release viewer"
|
||||
pkgdesc="GitHub Issue/Pull Request/Release viewer.Use system-wide electron."
|
||||
arch=('any')
|
||||
url="https://github.com/ytakahashi/miru"
|
||||
license=("MIT")
|
||||
|
|
@ -32,45 +32,56 @@ sha256sums=('SKIP'
|
|||
'291f50480f5a61bc9c68db7d44cd0412071128706baa868a9cb854f8779a1980')
|
||||
pkgver() {
|
||||
cd "${srcdir}/${pkgname%-git}.git"
|
||||
git describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/v//g'
|
||||
set -o pipefail
|
||||
git describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/v//g' ||
|
||||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
|
||||
}
|
||||
_ensure_local_nvm() {
|
||||
export NVM_DIR="${srcdir}/.nvm"
|
||||
local NVM_DIR="${srcdir}/.nvm"
|
||||
source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]]
|
||||
nvm install "${_nodeversion}"
|
||||
nvm use "${_nodeversion}"
|
||||
}
|
||||
build() {
|
||||
sed -e "s|@electronversion@|${_electronversion}|" \
|
||||
-e "s|@appname@|${pkgname%-git}|g" \
|
||||
-e "s|@runname@|app.asar|g" \
|
||||
-e "s|@cfgdirname@|${_pkgname}|g" \
|
||||
-e "s|@options@|env ELECTRON_OZONE_PLATFORM_HINT=auto|g" \
|
||||
-i "${srcdir}/${pkgname%-git}.sh"
|
||||
sed -e "
|
||||
s/@electronversion@/${_electronversion}/g
|
||||
s/@appname@/${pkgname%-git}/g
|
||||
s/@runname@/app.asar/g
|
||||
s/@cfgdirname@/${_pkgname}/g
|
||||
s/@options@/env ELECTRON_OZONE_PLATFORM_HINT=auto/g
|
||||
" -i "${srcdir}/${pkgname%-git}.sh"
|
||||
_ensure_local_nvm
|
||||
gendesk -q -f -n --pkgname="${_pkgname}-viewer-git" --pkgdesc="${pkgdesc}" --categories="Utility" --name="${pkgname%-git}" --exec="${pkgname%-git} %U"
|
||||
cd "${srcdir}/${pkgname%-git}.git"
|
||||
export npm_config_build_from_source=true
|
||||
electronDist="/usr/lib/electron${_electronversion}"
|
||||
export ELECTRON_SKIP_BINARY_DOWNLOAD=1
|
||||
export SYSTEM_ELECTRON_VERSION="$(electron${_electronversion} -v | sed 's/v//g')"
|
||||
export ELECTRONVERSION="${_electronversion}"
|
||||
HOME="${srcdir}/.electron-gyp"
|
||||
mkdir -p "${srcdir}/.electron-gyp"
|
||||
touch "${srcdir}/.electron-gyp/.yarnrc"
|
||||
if [[ "$(curl -s ipinfo.io/country)" == *"CN"* ]]; then
|
||||
export npm_config_registry=https://registry.npmmirror.com
|
||||
export npm_config_disturl=https://registry.npmmirror.com/-/binary/node/
|
||||
export npm_config_electron_mirror=https://registry.npmmirror.com/-/binary/electron/
|
||||
export npm_config_electron_builder_binaries_mirror=https://registry.npmmirror.com/-/binary/electron-builder-binaries/
|
||||
else
|
||||
echo "Your network is OK."
|
||||
{
|
||||
echo -e '\n'
|
||||
echo 'registry "https://registry.npmmirror.com"'
|
||||
echo 'disturl "https://registry.npmmirror.com/-/binary/node/"'
|
||||
echo 'electron_mirror "https://registry.npmmirror.com/-/binary/electron/"'
|
||||
echo 'electron_builder_binaries_mirror "https://registry.npmmirror.com/-/binary/electron-builder-binaries/"'
|
||||
echo "cacheFolder "${srcdir}"/.yarn/cache"
|
||||
echo "pluginsFolder "${srcdir}"/.yarn/plugins"
|
||||
echo "globalFolder "${srcdir}"/.yarn/global"
|
||||
echo 'useHardlinks true'
|
||||
#echo 'buildFromSource true'
|
||||
echo 'linkWorkspacePackages true'
|
||||
echo 'fetchRetries 3'
|
||||
echo 'fetchRetryTimeout 10000'
|
||||
} >> .yarnrc
|
||||
sed -i "s/registry.yarnpkg.com/registry.npmmirror.com/g" yarn.lock
|
||||
fi
|
||||
yarn run rm-dist
|
||||
sed "s|electron-builder --config|electron-builder -l dir --config|g;/\"electron\": /d;30i\ \"electron\": \"${SYSTEM_ELECTRON_VERSION}\"," \
|
||||
-i package.json
|
||||
sed "s|\/\${version}||g;s|mac|linux|g;s|icon.icns|icon.png|g" -i electron-builder.json
|
||||
sed -i "s/\"electron\": \"[^\"]*\"/\"electron\": \"${SYSTEM_ELECTRON_VERSION}\"/g" package.json
|
||||
sed -i "s/\/\${version}//g" electron-builder.json
|
||||
NODE_ENV=development yarn install --cache-folder "${srcdir}/.yarn_cache"
|
||||
NODE_ENV=production yarn run electron:build
|
||||
NODE_ENV=production yarn run build
|
||||
NODE_ENV=production npm exec -c "electron-builder --linux dir -c.electronDist=${electronDist}"
|
||||
}
|
||||
package() {
|
||||
install -Dm755 "${srcdir}/${pkgname%-git}.sh" "${pkgdir}/usr/bin/${pkgname%-git}"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue