Package Details: zettlr-bin 1.8.7-1

Git Clone URL: https://aur.archlinux.org/zettlr-bin.git (read-only, click to copy)
Package Base: zettlr-bin
Description: A markdown editor for writing academic texts and taking notes
Upstream URL: https://www.zettlr.com
Licenses: GPL
Provides: zettlr
Submitter: itsagoodbrain
Maintainer: itsagoodbrain
Last Packager: itsagoodbrain
Votes: 18
Popularity: 0.98
First Submitted: 2019-01-18 14:30
Last Updated: 2021-01-25 18:01

Dependencies (2)

Required by (0)

Sources (1)

Pinned Comments

itsagoodbrain commented on 2020-11-30 19:40

Given the update frequency has picked up and this packages popularity, I wanted to post the update script I've been using. That way, if a new version drops and I fall behind, you can still update your own.

#!/bin/zsh
read -d "\n" SHALINK LINK <<< $(curl -s https://api.github.com/repos/zettlr/zettlr/releases/latest | jq -r '.assets[].browser_download_url' | grep 'rpm\|SHA256') ;
rm SHA256*.txt ;
wget -nc ${LINK} ;
echo $SHALINK | xargs -I _ wget -nc '_' ;
VERSION=$(echo $LINK | awk -F '/' '{print $8};' | tr -d 'v') ;
CHECKSUM=$(awk '/.rpm/ {print $1}' SHA256SUMS.txt) ;
sed -i "s/^pkgver=.*$/pkgver=$VERSION/; s/^sha256sums=.*$/sha256sums=($CHECKSUM)/" PKGBUILD ;
echo $CHECKSUM
if [ $(cmp <(echo $LINK) <(echo "https://github.com/Zettlr/Zettlr/releases/download/v${VERSION}/Zettlr-${VERSION}-x86_64.rpm")) ]
then
    echo 'The download links differ, check manually'
    echo $LINK
    echo $VERSION
    exit 1
else
    makepkg --printsrcinfo >| .SRCINFO ;
    makepkg ./ ;
    #Open to make sure it's working
    pkg/zettlr/opt/Zettlr/Zettlr ;
    #git add .SRCINFO PKGBUILD ;
    #git commit -m "update to $VERSION" ;
fi

Latest Comments

hadar commented on 2020-12-11 16:54

I just installed this package for the first time today. The file in /usr/bin/zettlr was linked to /opt/Zettlr/zettlr, but the actual binary is /opt/Zettlr/Zettlr.

It was an easy fix, but perhaps the last line in PKGBUILD should be updated.

itsagoodbrain commented on 2020-11-30 19:40

Given the update frequency has picked up and this packages popularity, I wanted to post the update script I've been using. That way, if a new version drops and I fall behind, you can still update your own.

#!/bin/zsh
read -d "\n" SHALINK LINK <<< $(curl -s https://api.github.com/repos/zettlr/zettlr/releases/latest | jq -r '.assets[].browser_download_url' | grep 'rpm\|SHA256') ;
rm SHA256*.txt ;
wget -nc ${LINK} ;
echo $SHALINK | xargs -I _ wget -nc '_' ;
VERSION=$(echo $LINK | awk -F '/' '{print $8};' | tr -d 'v') ;
CHECKSUM=$(awk '/.rpm/ {print $1}' SHA256SUMS.txt) ;
sed -i "s/^pkgver=.*$/pkgver=$VERSION/; s/^sha256sums=.*$/sha256sums=($CHECKSUM)/" PKGBUILD ;
echo $CHECKSUM
if [ $(cmp <(echo $LINK) <(echo "https://github.com/Zettlr/Zettlr/releases/download/v${VERSION}/Zettlr-${VERSION}-x86_64.rpm")) ]
then
    echo 'The download links differ, check manually'
    echo $LINK
    echo $VERSION
    exit 1
else
    makepkg --printsrcinfo >| .SRCINFO ;
    makepkg ./ ;
    #Open to make sure it's working
    pkg/zettlr/opt/Zettlr/Zettlr ;
    #git add .SRCINFO PKGBUILD ;
    #git commit -m "update to $VERSION" ;
fi

languitar commented on 2020-11-30 15:04

Here is an updated PKGBUILD for the new version:

# Maintainer: itsagoodbrain <itsrottenisay@gmail.com>

pkgname=zettlr-bin
pkgver=1.8.0
pkgrel=1
pkgdesc="A markdown editor for writing academic texts and taking notes"
arch=('x86_64')
url="https://www.zettlr.com"
license=('GPL')
depends=()
optdepends=('pandoc: export support'
        'texlive-bin: pdf etc support')
provides=(zettlr)
source=("https://github.com/Zettlr/Zettlr/releases/download/v${pkgver}/Zettlr-${pkgver}-x86_64.rpm")
sha256sums=('1c88a6688e8bd95b88a48ac5bca235961433188911f9987a0467bada5a12f50d')
package() {
    mv $srcdir/opt $pkgdir/opt
    mv $srcdir/usr $pkgdir/usr
    mkdir -p $pkgdir/usr/bin
    ln -s /opt/Zettlr/zettlr $pkgdir/usr/bin/zettlr
}

rEnr3n commented on 2020-06-03 05:54

This line will link to the binary inside the build directory. ln -s $pkgdir/opt/Zettlr/zettlr $pkgdir/usr/bin/zettlr

$ ls -al /usr/bin/zettlr
lrwxrwxrwx 1 root root 53 Jun  3 05:32 /usr/bin/zettlr -> /home/ren/zettlr-bin/pkg/zettlr-bin/opt/Zettlr/zettlr

Change it to something like this: ln -s /opt/Zettlr/zettlr $pkgdir/usr/bin/zettlr

itsagoodbrain commented on 2020-06-02 18:29

I was requested to add a file to bin to make it callable and discoverable without adding it explicitly to PATH. I am making the minor change to add this, however note that the cli for zettlr is not a focus of the developers. https://github.com/Zettlr/Zettlr/issues/297

In my tests, I need to have a running session of Zettlr for the zettlr command in terminal to work as expected in opening files.

I have implemented this trivial change but will not be implementing a more fancy script to do checking. If you experiment and find a solution that will work for arbitrary window managers as well as X11 and wayland, please contact me and I'll happily add you as a co-maintainer to manage this functionality.

itsagoodbrain commented on 2019-05-21 04:48

@yochananmarqos I have not found that they are required for arch installs or running. Libnotify is the only I think might be needed, unclear at the moment. I am not going to require many gnome libraries for this package.

@mr.benedikt I'll think about adding that when I update for the next release. I think however that the export system is being changed such that it has more general calls. But these may be pandoc regardless.

yochananmarqos commented on 2019-05-20 15:19

The dependencies should be: gconf libnotify libappindicator-gtk2 libxtst nss libxss. See the Debian control file.

mr.benedikt commented on 2019-05-15 22:44

pandoc should be an optional depenency, since it used to share (export) files.

polyzen commented on 2019-02-09 23:19

passar, https://wiki.archlinux.org/index.php/Arch_User_Repository#Foo_in_the_AUR_is_outdated;_what_should_I_do?

passar commented on 2019-02-09 21:34

There is a new update available v1.1.0.