[aur-general] My first PKGBUILD, need some guidance
Hi! I'm creating my first PKGBUILD for Zeya, a nice app that lets you play your local music from any browser without any extra plugin(s) and I'm a bit disoriented about how to handle its installation. Unlike most application Zeya does not need to be compiled to run, just run it's main Python file and that's all, so, how should I proceed? I think about copying the whole directory structure after cloning it to /usr/bin/zeya-git and then create a symlink to the executable to /usr/bin/zeya but I'm not sure if this is the right procedure. So far this is how the PKGBUILD is being shaped: # Submitter: Martin C. msx@archlinux.us pkgname=zeya-git pkgver=0.6 pkgrel=1 pkgdesc="Bring your music anywhere" arch=('i686' 'x86_64') url="http://web.psung.name/zeya/" license=('GPL3') depends=('python2' 'fastoggenc') makedepends=('git' 'python2') optdepends=('mpg123: for decoding MP3 files' 'flac: for decoding FLAC files') conflicts=('zeya') _gitroot="http://web.psung.name/git/zeya.git" _gitname="zeya" build() { cd "$srcdir" msg "Connecting to GIT server...." if [[ -d "$_gitname" ]]; then cd "$_gitname" && git pull origin msg "The local files are updated." else git clone "$_gitroot" "$_gitname" fi msg "GIT checkout done or server timeout" msg "Starting build..." rm -rf "$srcdir/$_gitname-build" git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build" cd "$srcdir/$_gitname-build" } package() { } I think I can put all the instructions to create the directory under /usr/bin and to copy all the needed files in the package() section butI'm unsure about it. As you see this is a very basic question - for a very basic package. Thanks in advance, Martin -- -msx
Am 2012-08-14 04:03:28 -0300, Martin Cigorraga schrieb:
Unlike most application Zeya does not need to be compiled to run, just run it's main Python file and that's all, so, how should I proceed?
/usr/bin is only for executables, scripts... not for any Data files. Most Python applications provide a setup.py for installation, zeya doesn't. :-/ A possible way: Move required files (not the wohl git clone) to /usr/share/zeya and symlink from /usr/bin/zeya to /usr/share/zeya/zeya.py. Keep in mind that zeya.py must use the right python Version (python2 or python3). Greetings Stefan Betz -- URL : http://blog.stefan-betz.net | http://www.stefan-betz.net GPG : E188 933B BC00 723A 9DB0 0CD3 1398 E68B 6F33 567E XMPP: stefan@jabber.stefan-betz.net
On 14 August 2012 04:13, Stefan J. Betz <info@stefan-betz.net> wrote:
Am 2012-08-14 04:03:28 -0300, Martin Cigorraga schrieb:
Unlike most application Zeya does not need to be compiled to run, just run it's main Python file and that's all, so, how should I proceed?
/usr/bin is only for executables, scripts... not for any Data files.
Understood.
A possible way: Move required files (not the wohl git clone) to /usr/share/zeya and symlink from /usr/bin/zeya to /usr/share/zeya/zeya.py. Keep in mind that zeya.py must
Excelent, I had this in mind but I were not sure where to put the data files - not the full git clone, of course.
use the right python Version (python2 or python3).
I already have the needed sed to change every #!/usr/bin/python for our #!/usr/bin/python2
Greetings Stefan Betz
Thank you very much! -- -msx
On Tue, Aug 14, 2012 at 10:17 AM, Martin Cigorraga <msx@archlinux.us> wrote:
On 14 August 2012 04:13, Stefan J. Betz <info@stefan-betz.net> wrote:
Am 2012-08-14 04:03:28 -0300, Martin Cigorraga schrieb:
Unlike most application Zeya does not need to be compiled to run, just run it's main Python file and that's all, so, how should I proceed?
/usr/bin is only for executables, scripts... not for any Data files.
Understood.
A possible way: Move required files (not the wohl git clone) to /usr/share/zeya and symlink from /usr/bin/zeya to /usr/share/zeya/zeya.py. Keep in mind that zeya.py must
Excelent, I had this in mind but I were not sure where to put the data files - not the full git clone, of course.
use the right python Version (python2 or python3).
I already have the needed sed to change every #!/usr/bin/python for our #!/usr/bin/python2
Greetings Stefan Betz
Thank you very much!
-- -msx
I suggest taking a look at the [Ubuntu package][0], or, if you can read the messy Debian package creation stuff, [the messy Debian package creation stuff][1]. In a nutshell: /usr/bin/zeya = zeya.py file, everything else in /usr/share/zeya. Mind you, this is NOT the Pythonic way of doing that, and the maintainer is an idiot. A regular python package would use /usr/lib/pythonX.Y/site-packages/zeya/, containing all the .py files, and /usr/bin/zeya, which just imports the python module and runs it. I suggest telling the maintainer to do it right, including a setup.py file. This idiot uses Launchpad and self-hosted stuff, so it’s nothing weird that it sucks so bad. [0]: http://packages.ubuntu.com/precise/zeya [1]: https://launchpad.net/ubuntu/quantal/+source/zeya/0.6-1/+files/zeya_0.6-1.de... -- Kwpolska <http://kwpolska.tk> stop html mail | always bottom-post www.asciiribbon.org | www.netmeister.org/news/learn2quote.html GPG KEY: 5EAAEA16
Hi! On 14 August 2012 07:48, Kwpolska <kwpolska@gmail.com> wrote:
I suggest taking a look at the [Ubuntu package][0], or, if you can read the messy Debian package creation stuff,
Yeah, I agree it sucks.
[the messy Debian package creation stuff][1]. In a nutshell: /usr/bin/zeya = zeya.py file, everything else in /usr/share/zeya. Mind you, this is NOT the Pythonic way of doing that, and the maintainer is an idiot. A regular python package would use /usr/lib/pythonX.Y/site-packages/zeya/, containing all the .py files, and /usr/bin/zeya, which just imports the python module and runs it.
I'm not a Python coder so this is good to know, thanks.
I suggest telling the maintainer to do it right, including a setup.py file. This idiot uses Launchpad and self-hosted stuff, so it’s nothing weird that it sucks so bad.
Well, once I have a quality PKGBUILD I will try to contact him and tell him about his packaging errors. If you don't mind, I'll try a nicer approach, lol ;)
[0]: http://packages.ubuntu.com/precise/zeya [1]: https://launchpad.net/ubuntu/quantal/+source/zeya/0.6-1/+files/zeya_0.6-1.de... -- Kwpolska <http://kwpolska.tk> stop html mail | always bottom-post www.asciiribbon.org | www.netmeister.org/news/learn2quote.html GPG KEY: 5EAAEA16
Thanks for the links and everything else! Martin -- -msx
participants (3)
-
Kwpolska
-
Martin Cigorraga
-
Stefan J. Betz