diff options
author | Jose Valecillos | 2020-05-11 14:51:42 +0200 |
---|---|---|
committer | Jose Valecillos | 2020-05-11 14:51:42 +0200 |
commit | 0fb3e4b2fa492cd3a680a57b93c992f4db47354d (patch) | |
tree | 5561dc2b76d3f120eb36c3b6d8370eee1e9e317d | |
parent | f7132f686b9b2cac20ece8e421fdaef93b2603f3 (diff) | |
download | aur-0fb3e4b2fa492cd3a680a57b93c992f4db47354d.tar.gz |
Fixed build
-rw-r--r-- | .SRCINFO | 28 | ||||
-rw-r--r-- | .gitignore | 5 | ||||
-rw-r--r-- | PKGBUILD | 110 | ||||
-rw-r--r-- | superproductivity.desktop | 9 | ||||
-rwxr-xr-x | superproductivity.sh | 3 |
5 files changed, 111 insertions, 44 deletions
@@ -1,28 +1,34 @@ pkgbase = superproductivity-git pkgdesc = To Do List / Time Tracker with Jira Integration. - pkgver = 1.999.1000.r15.g08bd5c5e + pkgver = 5.1.2.r1.g70cd2a8e pkgrel = 1 url = http://super-productivity.com/ arch = x86_64 license = MIT + makedepends = git makedepends = npm - makedepends = gulp - makedepends = libicns - makedepends = python3 - depends = gtk2 - depends = libxss + makedepends = yarn + makedepends = python + depends = alsa-lib + depends = gtk3 depends = gconf + depends = libxss + depends = libxtst depends = nss depends = nspr - depends = libnotify - depends = libappindicator - depends = libxtst - depends = alsa-lib + depends = xdg-utils depends = xprintidle + depends = libnotify + depends = libappindicator-gtk3 + depends = electron provides = superproductivity conflicts = superproductivity - source = git+https://github.com/johannesjo/super-productivity + source = super-productivity::git+https://github.com/johannesjo/super-productivity + source = superproductivity.desktop + source = superproductivity.sh md5sums = SKIP + md5sums = 2497ef16691da7fe4dc3c9d6ce6a8bcf + md5sums = 6532676c1c13ae77f24205b3e3e97db9 pkgname = superproductivity-git diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..3e50ad06683d --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +*.tar.gz +*.pkg.tar.* +src/ +pkg/ +super-productivity/
\ No newline at end of file @@ -1,55 +1,99 @@ # Maintainer: Anna <morganamilo@gmail.com> pkgname=superproductivity-git -_pkgname=superProductivity +_pkgname=superproductivity _reponame=super-productivity -_binname=superproductivity -pkgver=1.999.1000.r15.g08bd5c5e +pkgver=5.1.2.r1.g70cd2a8e pkgrel=1 pkgdesc='To Do List / Time Tracker with Jira Integration.' arch=('x86_64') url="http://super-productivity.com/" license=('MIT') -depends=('gtk2' 'libxss' 'gconf' 'nss' 'nspr' 'libnotify' 'libappindicator' -'libxtst' 'alsa-lib' 'xprintidle') -makedepends=('npm' 'gulp' 'libicns' 'python3') -provides=('superproductivity') -conflicts=('superproductivity') -source=("git+https://github.com/johannesjo/${_reponame}") -md5sums=('SKIP') +depends=('alsa-lib' 'gtk3' 'gconf' 'libxss' 'libxtst' 'nss' 'nspr' +'xdg-utils' 'xprintidle' 'libnotify' 'libappindicator-gtk3' 'electron') +makedepends=('git' 'npm' 'yarn' 'python') +provides=("${_pkgname}") +conflicts=("${_pkgname}") +source=("${_reponame}::git+https://github.com/johannesjo/${_reponame}" + "${_pkgname}.desktop" + "${_pkgname}.sh") +md5sums=('SKIP' + '2497ef16691da7fe4dc3c9d6ce6a8bcf' + '6532676c1c13ae77f24205b3e3e97db9') -build() { +pkgver() { cd ${srcdir}/${_reponame} - npm install - npm run dist -- -l deb + git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' } -package() { - cd "${srcdir}/${_reponame}/app-builds" - #use the deb because it contains icon files and a .desktop file - local _pkgver=`git describe --abbrev=0 --tags | sed 's/^.//'` - ar -x superProductivity_${_pkgver}_amd64.deb - tar -xf "data.tar.xz" +prepare() { + cd "${srcdir}/${_reponame}" - install -d "${pkgdir}/opt/${_pkgname}" - cp -a "opt/${_pkgname}/." "${pkgdir}/opt/${_pkgname}" + electronVer=$(electron --version | tail -c +2) - chmod 755 "${pkgdir}/opt/${_pkgname}/${_binname}" + # Nodejs script for package version replacement + replacement=$(cat <<-END + d = JSON.parse(fs.readFileSync('package.json')); + d.devDependencies.electron = "$electronVer"; + fs.writeFileSync('package.json', JSON.stringify(d, null, 2)); + END + ) + # Change electron version to the one in the system + node -e "${replacement}" - install -d "${pkgdir}/usr/share/applications" - install -Dm644 "/usr/share/applications/${_binname}.desktop" "${pkgdir}/usr/share/applications" + # Edit electron builder config so only the linux-unpacked package is built + sed -i '/- AppImage/d' electron-builder.yaml + # Replacing deb with dir + sed -i 's/- deb/dir/' electron-builder.yaml + sed -i '/- snap/d' electron-builder.yaml + # No snap + sed -i '/snap/d' electron-builder.yaml + sed -i '/grade: stable/d' electron-builder.yaml +} + +build() { + cd "${srcdir}/${_reponame}" - install -d "${pkgdir}/usr/bin" - ln -s "/opt/${_pkgname}/${_binname}" "${pkgdir}/usr/bin/${_binname}" + yarn --cache-folder "${srcdir}/yarn-cache" - for size in `ls "usr/share/icons/hicolor/"`; do - install -Dm644 "usr/share/icons/hicolor/${size}/apps/${_binname}.png" "${pkgdir}/usr/share/icons/hicolor/${size}/apps/${_binname}.png" - done + # Better configuration for npm cache and calling installed binaries + export npm_config_cache="${srcdir}/npm_cache" + + # use system electron version + # see: https://wiki.archlinux.org/index.php/Electron_package_guidelines + electronDist=$(dirname $(realpath $(which electron))) + electronVer=$(electron --version | tail -c +2) - install -Dm644 "${srcdir}/${_reponame}/LICENSE" "${pkgdir}/usr/share/licenses/${_binname}/LICENSE" + # Building angular + # node --max_old_space_size=4096 ./node_modules/@angular/cli/bin/ng build --aot --prod --base-href='' + # Building electron-builder + # yarn electron:build && yarn electron-builder + # Building the app + # npx electron-builder --linux dir --x64 --dir dist \ + # -c.electronDist="${electronDist}" -c.electronVersion="${electronVer}" } -pkgver() { - cd ${srcdir}/${_reponame} - git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' +package() { + cd "${srcdir}" + + # Install asar file + install -Dm644 "${_reponame}/app-builds/linux-unpacked/resources/app.asar" \ + "${pkgdir}/usr/lib/${_pkgname}/resources/app.asar" + + # Install start script + install -Dm755 "${_pkgname}.sh" "${pkgdir}/usr/bin/${_pkgname}" + + # Install shortcut + install -Dm644 "${_pkgname}.desktop" "${pkgdir}/usr/share/applications/${_pkgname}.desktop" + + # Installing icons + for size in 16 32 48 128 256 512; do + icon_file="${_reponame}/build/icons/${size}x${size}.png" + if [ -n "$icon_file" ]; then + install -Dm644 "${icon_file}" "${pkgdir}/usr/share/icons/hicolor/${size}x${size}/apps/${_pkgname}.png" + fi + done + + # Copying Licence + install -Dm644 "${_reponame}/LICENSE" "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE" } diff --git a/superproductivity.desktop b/superproductivity.desktop new file mode 100644 index 000000000000..d41cec12f610 --- /dev/null +++ b/superproductivity.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Name=Super Productivity +Exec=superproductivity %U +Terminal=false +Type=Application +Icon=superproductivity +StartupWMClass=superProductivity +Comment=Personal Task Management App to help you with your daily struggle with JIRA etc. +Categories=Productivity;Office;Development diff --git a/superproductivity.sh b/superproductivity.sh new file mode 100755 index 000000000000..696a42a4c651 --- /dev/null +++ b/superproductivity.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +electron /usr/lib/superproductivity/resources/app.asar "$@" |