I have created a AUR package to allow easily install this app in Arch linux: https://aur.archlinux.org/packages/buttercup/
Hey @simonbcn, thanks for this. Since I know nothing about Arch Linux or AUR packages, would you mind explaining what would the process be here? If we release new versions of buttercup, will this be updated too?
According to the PKGBUILD, the maintainer (or users) would have to update the PKGBUILD's pkgver variable: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=buttercup to download the latest rpm package. Maybe it's worth to build this package from source. @simonbcn what do you think?
Yes, the maintainer (_in this case I_) must update the version. Users can download the PKGBUILD and modify it.
This PKGBUILD is the released version. Someone can create another PKGBUILD to build and install the git version.
This thread was opened to inform Arch users that they have an easy way to install the version.
@simonbcn
I rewrote your PKGBUILD to build from source, and to follow AUR packaging standards, as it had multiple issues. https://github.com/sum01/aur-packages/tree/master/buttercup
# Maintainer: j1simon
# Contributor: Sum01 https://github.com/sum01
pkgname=buttercup
pkgver=0.17.2
pkgrel=2
pkgdesc='Javascript Password Vault - Multi-Platform Desktop Application'
arch=('i686' 'x86_64')
url="https://buttercup.pw/"
license=('GPL3')
depends=('gtk2' 'gconf' 'libxtst' 'alsa-lib' 'libxss' 'nss')
makedepends=('npm' 'sed')
source=("https://github.com/buttercup/buttercup/archive/v$pkgver.tar.gz"
"buttercup.desktop")
sha256sums=('0a4db0c51a25122a5e786b1f7de2ddd2e5c6aad63149938ecc797386d892c53c'
'1dd4ebbb268442e4c1a27ff720a1227b3aa01a11de939713602fb24c13890178')
prepare(){
sed -i '/"rpm",/d' "$srcdir/$pkgname-$pkgver/package.json"
sed -i '/"AppImage",/d' "$srcdir/$pkgname-$pkgver/package.json"
sed -i 's/"deb"/"zip"/' "$srcdir/$pkgname-$pkgver/package.json"
if [[ $CARCH = "i686" ]]; then
sed -i 's/build --linux --x64/build --linux --ia32/' "$srcdir/$pkgname-$pkgver/package.json"
fi
}
build(){
cd "$srcdir/$pkgname-$pkgver/"
npm install && npm run build && npm run package:linux
}
package() {
mkdir -p "$pkgdir"/usr/{lib,bin,share/{applications,icons/hicolor/scalable/apps}}/
install -m644 "$srcdir/$pkgname-$pkgver/build/badge.svg" "$pkgdir/usr/share/icons/hicolor/scalable/apps/buttercup.svg"
install -m644 "$srcdir/buttercup.desktop" "$pkgdir/usr/share/applications/"
ln -s /usr/lib/$pkgname/$pkgname "$pkgdir/usr/bin/$pkgname"
if [[ $CARCH = "i686" ]]; then
mv "$srcdir/$pkgname-$pkgver/release/linux-ia32-unpacked" "$pkgdir/usr/lib/$pkgname"
else
mv "$srcdir/$pkgname-$pkgver/release/linux-unpacked" "$pkgdir/usr/lib/$pkgname"
fi
}
[Desktop Entry]
Version=1.1
Name=Buttercup
Comment=Javascript Password Vault
Exec=buttercup %f
Icon=buttercup
Terminal=false
Type=Application
Categories=Utility;
For extra usability, I made a desktop file to quickly launch the program. Make sure you add it to the git when pushing to the AUR, as that's where it'll attempt to pull from.
@simonbcn @sum01 Thanks for setting this up. Is there something that needs to be added to this repo to make this process more efficient?
If not I'd recommend renaming this issue to better suite the plan - notifying users in the readme or something like that.
I agree, it's a good idea to inform to users in the readme.
@perry-mitchell Nothing needs to be changed in the repo for it to be better, at least nothing I can think of.
I just changed it from a binary to source as the AUR packaging standards dictate you build from source whenever possible, and if using a binary then you are supposed to add -bin to the name of your pkgbuild. -git is only for when you build from commits or git repos that otherwise don't have tagged releases.
I have abandoned the package. I've decided that _buttercup_ isn't for me.
I've decided that buttercup isn't for me
Sorry to hear that @simonbcn. We'll be continuing to improve it and we hope you'll check it out again in the future..
I've adopted buttercup on the AUR, and will continue maintaining/improving it.
Thanks @sum01 I guess we should add the link to the README
Reopening as it seems that there is indeed work to do here. @sum01 would you be kind enough to suggest some text that could be placed in the readme? We're not so familiar with arch builds..
I guess you can simply make a point that buttercup has an AUR package (and give a link to it).
@perry-mitchell For Arch-Linux, there are two ways to build from the AUR. Either the user directly does something like wget https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=buttercup -O PKGBUILD to pull the raw file, then runs makepkg -si PKGBUILD, or they use an AUR helper (this is the more popular way), which automates the process.
I think @Defman21 is correct in that all you really need to do is link to it. I don't think you'd need to write a step-by-step for people to use it, the Arch wiki already covers that pretty well.
Thanks a lot @sum01. I've made a PR to update the readme: #296.