summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorweearc2021-03-03 21:20:57 +0800
committerweearc2021-03-03 21:20:57 +0800
commit75d9868bb881c2749125dd9a6ceb68726ba4d51f (patch)
tree8bbc9346619409bbf4be7dbcd6f4e92513cac6ac
parent3f1ff4ee8921dd48fa9b5e847ca53ff88ed03aac (diff)
downloadaur-75d9868bb881c2749125dd9a6ceb68726ba4d51f.tar.gz
change package structure
-rw-r--r--PKGBUILD16
1 files changed, 5 insertions, 11 deletions
diff --git a/PKGBUILD b/PKGBUILD
index ccbda9477a6..3a0cb161fe2 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,7 +8,7 @@ arch=('any')
url="https://github.com/amitmerchant1990/electron-markdownify"
license=('MIT')
depends=(
- 'electron4'
+ 'electron8'
)
makedepends=(
'git'
@@ -22,25 +22,24 @@ prepare() {
cd ${srcdir}/
cd ${pkgname}/
yarn
- yarn add electron-builder -D
mkdir build && cp app/img/markdownify.icns build/icon.icns
cp app/img/markdownify.ico build/$pkgname.png
}
build(){
cd ${srcdir}/${pkgname}
- ./node_modules/.bin/electron-builder --dir
}
package() {
install -d ${pkgdir}/opt
install -d ${pkgdir}/usr/bin
+ install -d ${pkgdir}/usr/lib
install -d ${pkgdir}/usr/share/icons
install -d ${pkgdir}/usr/share/applications
echo "#!/bin/bash
-electron4 /opt/$pkgname/app.asar \$@" > ${pkgdir}/usr/bin/$pkgname && chmod a+x ${pkgdir}/usr/bin/$pkgname
+electron8 /usr/lib/electron-markdownify/main.js \$@" > ${pkgdir}/usr/bin/$pkgname && chmod a+x ${pkgdir}/usr/bin/$pkgname
echo "[Desktop Entry]
@@ -52,13 +51,8 @@ Type=Application
StartupNotify=true
Categories=Office;WordProcessor;
MimeType=text/markdown;text/x-markdown;" > ${pkgdir}/usr/share/applications/${pkgname}.desktop
+
+ cp -rf ${srcdir}/$pkgname ${pkgdir}/usr/lib/.
- install -Dm644 ${srcdir}/$pkgname/dist/linux-unpacked/resources/app.asar ${pkgdir}/opt/${pkgname}/app.asar
-
- for i in 16 22 24 32 36 48 64 72 96 128 256
- do
- mkdir -p ${pkgdir}/usr/share/icons/hicolor/${i}x${i}/apps
- install -Dm644 ${srcdir}/$pkgname/build/$pkgname.png ${pkgdir}/usr/share/icons/hicolor/${i}x${i}/apps/$pkgname.png
- done
}