diff options
author | ivelkov | 2018-04-04 11:15:08 +0300 |
---|---|---|
committer | ivelkov | 2018-04-04 11:15:08 +0300 |
commit | 931f58c2ad9f27b094374263d8b0ba677c1485cb (patch) | |
tree | 11715ad7ac464e6e989e1c37f788d57b3e0c6808 /PKGBUILD | |
parent | 55eb82ed6ed76b05724d477ce0537e0394cb4abd (diff) | |
download | aur-931f58c2ad9f27b094374263d8b0ba677c1485cb.tar.gz |
Refactor PKGBUILD
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 26 |
1 files changed, 12 insertions, 14 deletions
@@ -1,55 +1,53 @@ # Maintainer: Ivelin Velkov <ivelin dot velkov at gmail dot com> pkgname=teams-for-linux -_pkgname=teams-for-linux-0.0.7 pkgver=0.0.7 -pkgrel=1 +pkgrel=2 pkgdesc='Unofficial Microsoft Teams client for Linux using Electron.' arch=('any') url='https://github.com/ivelkov/teams-for-linux' license=('GPLv3') -depends=('electron' 'xdg-utils') +depends=( 'nodejs' 'electron' 'xdg-utils') makedepends=( 'npm' ) -provides=("${_pkgname}") -conflicts=("${_pkgname}") +provides=("${teams-for-linux}-${pkgver}") +conflicts=("${teams-for-linux}-${pkgver}") source=("https://github.com/ivelkov/$pkgname/archive/v$pkgver.tar.gz") sha1sums=('SKIP') -_desktop="${_pkgname}.desktop" prepare() { - cat > ${_desktop} << EOF + cat > "${pkgname}.desktop" << EOF [Desktop Entry] Type=Application Name=Teams Comment=Unofficial Microsoft Teams client for Linux. Exec=/usr/bin/${pkgname} -Icon=$pkgdir/usr/share/icons/hicolor/1024x1024/apps/teams-for-linux.png +Icon=/usr/share/icons/hicolor/1024x1024/apps/teams-for-linux.png Categories=Network;InstantMessaging;Application; Terminal=false StartupNotify=true Version=${pkgver} EOF - cat > "${_pkgname}.sh" << EOF + cat > "${pkgname}" << EOF #!/usr/bin/env sh electron /usr/share/${pkgname}/app \$* EOF } build() { - cd "${_pkgname}" + cd "$pkgname-$pkgver" npm i && (cd app && npm i) } package() { - cd "${_pkgname}" + cd "$pkgname-$pkgver" - install -Dm644 LICENSE.md "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE" + install -Dm644 LICENSE.md "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" cp -r --preserve=mode . "${pkgdir}/usr/share/${pkgname}" install -Dm644 "build/icons/1024x1024.png" "${pkgdir}/usr/share/icons/hicolor/1024x1024/apps/teams-for-linux.png" - install -Dm644 "${srcdir}/${_desktop}" "${pkgdir}/usr/share/applications/${_desktop}" - install -Dm755 "${srcdir}/${_pkgname}.sh" "${pkgdir}/usr/bin/${pkgname}" + install -Dm644 "${srcdir}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop" + install -Dm755 "${srcdir}/${pkgname}" "${pkgdir}/usr/bin/${pkgname}" ln -s "${pkgdir}/usr/bin/${pkgname}" "${pkgdir}/usr/bin/teams" } |