Skip to content

Instantly share code, notes, and snippets.

@hadi77ir
Last active May 26, 2020 03:18
Show Gist options
  • Save hadi77ir/a3ab4b0cb571cf0c73371e471482fb2d to your computer and use it in GitHub Desktop.
Save hadi77ir/a3ab4b0cb571cf0c73371e471482fb2d to your computer and use it in GitHub Desktop.
PKGBUILD for building Arch Linux EasyEDA package (with Electron 3.1.8)
pkgname=easyeda
pkgver=2.0.0
pkgrel=0
pkgdesc="EasyEDA Desktop Client, A Simple and Powerful Electronic Circuit Design Tool"
arch=('x86_64')
license=(custom)
depends=(gconf)
url="https://easyeda.com/page/download"
options=('!strip')
source=('https://image.easyeda.com/files/easyeda-linux-64bit-latest.zip' 'https://github.com/electron/electron/releases/download/v3.1.8/electron-v3.1.8-linux-x64.zip')
sha256sums=('SKIP' '9adf6cdc3e837ff97aa901a655746fed95c35d4a70524a4809e113fb17d2ed8f')
noextract=('electron-v3.1.8-linux-x64.zip')
package() {
cd "${srcdir}"
install -d -m755 "${pkgdir}/opt/${pkgname}"
unzip -qqd ${pkgdir}/opt/${pkgname}/ electron-v3.1.8-linux-x64.zip
unzip -qqjd ${pkgdir}/opt/${pkgname}/resources/ easyeda-linux-x64.zip "resources/app.asar"
unzip -qqd ${pkgdir}/opt/${pkgname}/ easyeda-linux-x64.zip 'icon/*'
mv ${pkgdir}/opt/${pkgname}/electron ${pkgdir}/opt/${pkgname}/easyeda
install -d -m755 "${pkgdir}/usr/share/applications"
cat <<EOF > "${pkgdir}/usr/share/applications/easyeda.desktop"
[Desktop Entry]
Categories=Development;Electronics;
Comment=A Simple and Powerful Electronic Circuit Design Tool
Exec=/opt/easyeda/easyeda %f
Terminal=false
Keywords=PCB;EasyEDA;
GenericName=EasyEDA
Icon=/opt/easyeda/icon/128x128/easyeda.png
Name=EasyEDA ${pkgver}
Type=Application
Name[en_US]=EasyEDA
EOF
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment