commit b32e97dc89bc4691f1ba9bf72667292c44e56096 Author: Sebastian Rust Date: Sun Jul 10 13:33:57 2022 +0200 initial commit diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..993f0ad --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,51 @@ +# Maintainer: Fredy GarcĂ­a + +pkgname=todoist-nativefier +pkgver=1.0 +pkgrel=1 +pkgdesc="Todoist built with nativefier (electron)" +arch=("armv7l" "i686" "x86_64") +url="https://${pkgname%-nativefier}.com" +license=("custom") +depends=("gtk3" "libxss" "nss") +optdepends=("libindicator-gtk3") +makedepends=("imagemagick" "nodejs-nativefier" "unzip") +source=( + "${pkgname}.png" + "${pkgname}.desktop" +) +sha256sums=( + "39aaee2dd47d75a772d78751efaa8c95067a408f4ecdc19e6166399e82275517" + "320f013d01ea1ce1740efe4148ee14295e69e1d69550d16c4b67641296fbba1c" +) + +build() { + cd "${srcdir}" + + nativefier \ + --name "Todoist" \ + --icon "${pkgname}.png" \ + --width "800px" \ + --height "600px" \ + --user-agent "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Chrome/102.0.0.0 Safari/605.1.15" \ + --verbose \ + --single-instance \ + "${url}" +} + +package() { + install -dm755 "${pkgdir}/"{opt,usr/{bin,share/{applications,licenses/${pkgname}}}} + + _folder=$(ls "${srcdir}" | grep "[Tt]odoist-linux-") + _binary=$(ls "${srcdir}/${_folder}" | grep "[Tt]odoist") + + cp -rL "${srcdir}/${_folder}" "${pkgdir}/opt/${pkgname}" + ln -s "/opt/${pkgname}/${_binary}" "${pkgdir}/usr/bin/${pkgname}" + install -Dm644 "${srcdir}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop" + install -Dm644 "${pkgdir}/opt/${pkgname}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + for _size in "192x192" "128x128" "96x96" "64x64" "48x48" "32x32" "24x24" "22x22" "20x20" "16x16" "8x8"; do + install -dm755 "${pkgdir}/usr/share/icons/hicolor/${_size}/apps" + convert "${srcdir}/${pkgname}.png" -strip -resize "${_size}" "${pkgdir}/usr/share/icons/hicolor/${_size}/apps/${pkgname}.png" + done +} + diff --git a/todoist-nativefier.desktop b/todoist-nativefier.desktop new file mode 100644 index 0000000..98c5fe6 --- /dev/null +++ b/todoist-nativefier.desktop @@ -0,0 +1,16 @@ +[Desktop Entry] +Comment= +Exec=todoist-nativefier +Icon=todoist-nativefier +Name=Todoist +Comment=Todoist built with nativefier (electron) +Encoding=UTF-8 +NoDisplay=false +Path[$e]= +StartupNotify=true +Terminal=0 +TerminalOptions= +Type=Application +X-KDE-SubstituteUID=false +X-KDE-Username= +Categories=Network; diff --git a/todoist-nativefier.png b/todoist-nativefier.png new file mode 100644 index 0000000..f7c12de Binary files /dev/null and b/todoist-nativefier.png differ