Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide please AUR pkg (archlinux) for easy installation #10

Open
proft opened this issue Oct 4, 2016 · 9 comments
Open

Provide please AUR pkg (archlinux) for easy installation #10

proft opened this issue Oct 4, 2016 · 9 comments
Milestone

Comments

@proft
Copy link

proft commented Oct 4, 2016

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

@joelobrecht
Copy link

joelobrecht commented Oct 4, 2016

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 <firstname.name@gmail.com>
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
}

@michaldaniel
Copy link
Owner

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.

@joelobrecht
Copy link

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 ?

@michaldaniel michaldaniel added this to the 1.0 milestone Oct 12, 2016
@michaldaniel
Copy link
Owner

michaldaniel commented Oct 12, 2016

@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.

@rizaumami
Copy link

Just use AppImage. One file for all distros.

@michaldaniel
Copy link
Owner

michaldaniel commented Oct 12, 2016

@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.

@probonopd
Copy link

Let me know if you need help on the AppImage.

@dunkelstern
Copy link

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.

@proft
Copy link
Author

proft commented Dec 8, 2016

@dunkelstern Good job! approved :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants