ebook-viewer icon indicating copy to clipboard operation
ebook-viewer copied to clipboard

Provide please AUR pkg (archlinux) for easy installation

Open proft opened this issue 7 years ago • 9 comments

It would be nice if we have a AUR pkg, so that we don't have to go through the trouble of compiling :).

proft avatar Oct 04 '16 11:10 proft

I've done one, see below. This project could be a very nice one to be helped to by the Arch community, because it respects entirely Arch philosophy : light, simple, smart, does only one thing.

It's my first one, so please be kind, and check it first :). Also, although it worked, I wasn't able to open books, I guess because of dependencies problems ? But then the forked reader (pPub) had the same errors so... It would have been php or jquery I would have tried to debug...

As it wasn't working, I didn't submit it to the AUR. Spent 5 hours working on it though, so if it can be of use to peers who can pick up from there and make it work :). To make it work just create ~/abs/ebook-viewer, cd to it, and with your favorite editor create a file named PKGBUILD and another named Ebook-Viewer.install and put the corresponding code within. Save, and in a terminal run makepkg -s. It should compile nicely. Then sudo pacman -U yourpackage.tar.xz.

PKGBUILD I added a sed script to remove the gtk-update-cache command to a post-install operation that is in the Ebook-Viewer.install file.

# Maintainer: myself <[email protected]>
pkgname=Ebook-Viewer
pkgver=0.1
pkgrel=1
epoch=
pkgdesc="Modern GTK Python app to easily read ePub files"
arch=('i686' 'x86_64')
url="https://github.com/michaldaniel/Ebook-Viewer"
license=('GPL-3.0')
groups=()
depends=('webkitgtk' 'gobject-introspection' 'python-gobject' 'python3' 'gtk3')
makedepends=('git' 'make')
checkdepends=()
optdepends=()
provides=('Ebook-Viewer')
conflicts=('Ebook-Viewer')
replaces=()
backup=()
options=()
install=$pkgname.install
changelog=
source=("$pkgname::git+https://github.com/michaldaniel/Ebook-Viewer")
noextract=()
md5sums=('SKIP')
validpgpkeys=()

prepare() {
     cd $pkgname
   sed -i '/gtk-update-icon-cache/d' Makefile
    }

build() {
    cd "$pkgname"
    make 
}

package() {
    cd "$pkgname"
    make PREFIX="$pkgdir/usr" install 
}

Ebook-Viewer.install Contains a post-install script to update the icon cache.

post_install() {
  gtk-update-icon-cache -q -t -f usr/share/icons/gnome
}

post_upgrade() {
  post_install
}

post_remove() {
  post_install
}

joelobrecht avatar Oct 04 '16 13:10 joelobrecht

This script has some errors regarding app naming, I fixed python2 to python3 dependency. For now please guys, hold your horses. When the app is closer to release I'll look into possible distribution channels. Thanks for the PKGBUILD script, after some fixing it can be handy later.

michaldaniel avatar Oct 09 '16 15:10 michaldaniel

Thanks for the corrections added to the pkgbuild, Now it works perfectly well !!! Nice :) I still think it is worth to contribute it to the AUR as development version (with a "-git" suffix) so arch users can find it with AUR helpers like 'packer'. But perhaps you would like to do this yourself so you can maintain it ?

joelobrecht avatar Oct 12 '16 00:10 joelobrecht

@quatrecouleurs I'm putting some work into project website right now. I also found great open source user style for epub books, I'm working to make it compatible with light and dark theme, font picking and font size control. The app currently has empty window for settings. Distributing product that is half done to people isn't going to do much good. I feel really flattered so many people star it and install, that you even made a build script for it but putting "maintainer" packages out feels a lot like saying it's ready to adopt. It's not. It will be soon, but not yet.

Then again, it's free software if you want to put in in places who am I to stop you. ¯_(ツ)_/¯ It feels really good that people are already interested in it tho.

michaldaniel avatar Oct 12 '16 01:10 michaldaniel

Just use AppImage. One file for all distros.

rizaumami avatar Oct 12 '16 03:10 rizaumami

@rizaumami I think of doing .deb + ubuntu PPA, appimage or flatpack and aur. If it gets more popular it might be nice to also include rpm package and whatever those guys use for repositories. This might change when it's time to build and maintain them tho.

michaldaniel avatar Oct 12 '16 04:10 michaldaniel

Let me know if you need help on the AppImage.

probonopd avatar Oct 23 '16 23:10 probonopd

Hi, i didn't see that someone already made a PKGBUILD. I've created one too and already pushed to the AUR. If you want in as a co-maintainer just tell me and i'll invite you.

dunkelstern avatar Dec 08 '16 01:12 dunkelstern

@dunkelstern Good job! approved :)

proft avatar Dec 08 '16 07:12 proft