You are not logged in.

#1 2012-03-27 13:14:40

felihommen
Member
From: Roquetas de Mar, Spain
Registered: 2012-03-04
Posts: 6

kiwix-bin PKGBUILD

I made a PKGBUILD and I would like your opinions / suggestions. This is my first PKGBUILD.

The pakage "kiwix" exists in AUR, but it tries to compile and fails, at least for me. I made a PKGBUILD that downloads binary files and it works fine. I named it kiwix-bin.
¿Is this Ok? Can I submit it, or should I do something else?

This is PKGBUILD:

# Maintainer: Felipe Hommen <felibank at gmail dot com>
pkgname=kiwix-bin
pkgver=0.9_beta5
pkgrel=1
pkgdesc="Offline reader for Web content. It's especially intended to make Wikipedia available offline."
arch=('i686' 'x86_64')
url="http://www.kiwix.org"
license=('GPL3')
[[ "$CARCH" == 'x86_64' ]] && depends=('lib32-glibc' 'lib32-gtk2' 'lib32-alsa-lib' 'lib32-libxt' 'lib32-libcanberra') && _usrlib='lib32'
[[ "$CARCH" == 'i686' ]] && depends=('gtk2' 'alsa-lib' 'libxt' 'libcanberra') && _usrlib='lib'
provides=('kiwix')
conflicts=('kiwix')

source=("http://downloads.sourceforge.net/project/kiwix/0.9_beta5/kiwix-0.9-beta5-linux.tar.bz2?r=&ts=1332764310&use_mirror=ignum" "kiwix.desktop")
md5sums=('de1428e9de90554b292cf54e7c2dc99d' 'db677c88fc260854d397ba707bab3a55')

#build() {
#}

package() {
	mkdir -p ${pkgdir}/usr/${_usrlib}
	mkdir -p ${pkgdir}/usr/bin
	cp -R -d ${srcdir}/kiwix ${pkgdir}/usr/${_usrlib}/
	find ${pkgdir}/usr/${_usrlib}/kiwix -type d -exec chmod a+rx {} \;
	ln -f -s /usr/${_usrlib}/kiwix/kiwix ${pkgdir}/usr/bin/kiwix
	install -D -m644 ${srcdir}/kiwix/chrome/icons/default/main.png ${pkgdir}/usr/share/pixmaps/kiwix.png
	install -D -m644 ${srcdir}/kiwix.desktop ${pkgdir}/usr/share/applications/kiwix.desktop
}

and kiwix.desktop:

#!/usr/bin/env xdg-open
[Desktop Entry]
Name=Kiwix
GenericName= Offline reader for Web content
GenericName[es]=Lector de contenido web sin conexión
Comment=It's especially intended to make Wikipedia available offline.
Comment[es]=Está especialmente concebido para acceder a la Wikipedia sin conexión.
Exec=kiwix
Icon=kiwix
Terminal=false
Type=Application
StartupNotify=true
StartupWMClass=
Categories=Education
MimeType=

What do you think about provides=('kiwix') and conflicts=('kiwix') together?
Kiwix creates a hidden directory at home folder, where it downloads stuff as the wikipedia itself. Should I remove that directory when the package is removed?
I tested this in virtualbox with base + KDE installation and it works fine, as far as I can see.

Thank you for yor comments.

Offline

#2 2012-03-28 10:25:02

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 4,424

Re: kiwix-bin PKGBUILD

- the source url you give points to a specific sourceforge mirror, this may pose problems.
better use http://downloads.sourceforge.net/projec … ux.tar.bz2 and let sourceforge select the appropriate mirror.

- using both provides and conflicts is often a good idea, although if kiwix is not a dependency for other packages the provides= could be omitted.

- folders in home directories created by packages are normally left alone.


Booting with apg Openrc, NOT systemd.
Automounting : not needed, i prefer pmount
Aur helpers : makepkg + my own local repo === rarely need them

Offline

#3 2012-03-28 11:00:53

felihommen
Member
From: Roquetas de Mar, Spain
Registered: 2012-03-04
Posts: 6

Re: kiwix-bin PKGBUILD

the source url you give points to a specific sourceforge mirror, this may pose problems.
better use http://downloads.sourceforge.net/projec … ux.tar.bz2 and let sourceforge select the appropriate mirror.

I agree. I will change it.

using both provides and conflicts is often a good idea, although if kiwix is not a dependency for other packages the provides= could be omitted.

Thanks a lot for that information. It makes sense and makes no sense depending on how I think it. Kiwix is obviously not a dependency for any other packages, but I think provides= doesn't bother and I like it smile, so I'll leave it there.

folders in home directories created by packages are normally left alone.

Then, I will do so. The point is that there could be huge hidden files. May be I write a warning about that.

Thanks a lot.

Offline

Board footer

Powered by FluxBB