diff options
author | Aamir Farooq | 2019-08-12 00:22:50 +0500 |
---|---|---|
committer | Aamir Farooq | 2019-08-12 00:40:16 +0500 |
commit | 02e9028603ad549a9543f04487e1fb25cda82769 (patch) | |
tree | 5d847ce43ca1225cc1540a9ca4719397eb185ddd | |
parent | 487b73d48486af5743590be829a16317ae9421ac (diff) | |
download | aur-02e9028603ad549a9543f04487e1fb25cda82769.tar.gz |
Revert "We should be building the Electron app and using that"
This reverts commit 487b73d48486af5743590be829a16317ae9421ac.
-rw-r--r-- | PKGBUILD | 29 |
1 files changed, 12 insertions, 17 deletions
@@ -10,17 +10,19 @@ depends=('nodejs>=10.0.0' 'npm>=6.0.0') makedepens=('git') source=("git+${url}.git") +foldername=PreMiD-git + md5sums=('SKIP') pkgver() { - cd "${pkgname}" + cd "${foldername%-git}" printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } package() { # Set up file structure - mkdir -p "${pkgdir}/usr/lib/${pkgname}/" + mkdir -p "${pkgdir}/usr/lib/${pkgname%-git}/" mkdir -p "${pkgdir}/usr/bin/" mkdir -p "${pkgdir}/usr/share/applications" mkdir -p "${pkgdir}/usr/share/pixmaps" @@ -32,40 +34,33 @@ package() { # Add launcher script to /usr/bin/ echo "#!/bin/bash cd /usr/lib/premid/ - ./PreMiD" > "${pkgdir}/usr/bin/${pkgname}" - chmod +x "${pkgdir}/usr/bin/${pkgname}" + npm start" > "${pkgdir}/usr/bin/premid" + chmod +x "${pkgdir}/usr/bin/premid" # Create application menu shortcut echo "[Desktop Entry] Name=PreMiD GenericName=PreMiD Comment=PreMiD adds Discord Rich Presence support to a lot of services you use and love. - Exec=/usr/bin/PreMiD + Exec=/usr/bin/premid Terminal=false Type=Application Icon=premid.png" > "${pkgdir}/usr/share/applications/premid.desktop" # Install dependency modules - cd "${pkgname}" + cd "${foldername%-git}/src" npm install - cd "${pkgname}"/src - npm install - - cd "${pkgname}" - npm run pkglinux - # Copy the app files & dependency modules to package directory - mkdir -p "${pkgdir}/usr/lib/${pkgname}/" - cd "${pkgname}"/out - cp -r ./* "${pkgdir}/usr/lib/${pkgname}/" + mkdir -p "${pkgdir}/usr/lib/${pkgname%-git}/" + cp -r ./* "${pkgdir}/usr/lib/${pkgname%-git}/" cp assets/images/logo.png "${pkgdir}/usr/share/pixmaps/premid.png" # Copy a license file to package directory - install -Dm644 ../LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + install -Dm644 ../LICENSE "${pkgdir}/usr/share/licenses/${pkgname%-git}/LICENSE" # Remove references to $srcdir of node_modules directory - grep -l "${srcdir}" -r "${pkgdir}" | xargs sed -i "s#${_git_srcdir}#/usr/lib/${pkgname}#g" + grep -l "${srcdir}" -r "${pkgdir}" | xargs sed -i "s#${_git_srcdir}#/usr/lib/${pkgname%-git}#g" } |