Subject: [alpine-devel] APKBUILDs for mpd & libmad

From: "Sebastian Wicki" <[email-masked]>
Date: Sat, 05 Sep 2009 23:18:30 +0200

Hi everybody,

I discovered Alpine Linux a few days ago and I'm quite happy with it. However, I need mpd [http://www.musicpd.org] for my purposes, so I've written a APKBUILD. 

ncopa suggested me to send it to alpine-devel, so here it is. I've copied the most from Arch Linux, including some patches for libmad. So, please notice, it's my first APKBUILD and therefore you should take a good look at it first. I'm not sure if everything really works as it should, but at least it builds and I was able to play a mp3 file so far.

Greetings

gandro
-- 
Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3 -
sicherer, schneller und einfacher! http://portal.gmx.net/de/go/atbrowser

---

From: Natanael Copa <[email-masked]>
Date: Sun, 6 Sep 2009 18:55:55 +0000

On Sat, 05 Sep 2009 23:18:30 +0200
"Sebastian Wicki" <[email-masked]> wrote:

> ncopa suggested me to send it to alpine-devel, so here it is. I've
> copied the most from Arch Linux, including some patches for libmad.

Thats how I do too. Reuse from Arch Linux and gentoo.

> So, please notice, it's my first APKBUILD and therefore you should
> take a good look at it first. 

I think it was very good to be a first APBUILD. I have some comments
below.

> I'm not sure if everything really works as it should, but at least it
> builds and I was able to play a mp3 file so far.

If it plays and not segfaults, then its normally good enough.

Some comments:
* You don't need specify the depends as abuild will auto add them by
  tracing the .so dependencies. This is a relatively new feature so
  many apkbuilds still have stuff in depends. Normally you only need to
  add the your needed -dev libs to makedepends. Exception is scripting
  languages. If you have perl/python/bash (not /bin/sh) or other
  scripting language you will need to do do the dependency handling
  manually. (normally its a question about adding perl/python/bash to
  depends)

* we start our pkgrel with 0. aruclinux start with 1.

* I prefer to reuse init.d scripts from Gentoo as they also use openrc.
  They are normally well tested.

libmad:
* i think you should run aclocal in order to do properly do the mad.pc
  patch. The patch needs some reworks for that though. They shouldnt
  edit the Makefile.in as its generated by automake.  Normally its best
  to do a "correct" patch that can be included upstream. the arch linux
  patch is not suitable for upstream so for now i think I just do as
  gentoo and just add a mad.pc file.

* I prefer tabs indent everywhere (your had 4 spaces some places).

mpd:
* i wonder if we maybe should create an mpd user and group. I don't
  think we want it to be run as root.

Anyway... this is a very good start.

I have committed libmad. Will try look at mpd tomorrow. It need to
create the mpd user.

Thanks!

 -nc

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---

---

From: "Sebastian Wicki" <[email-masked]>
Date: Sun, 06 Sep 2009 21:52:44 +0200

>   think we want it to be run as root.
I've actually had a two lined pre-install script for this, but it didn't work (don't remember what the issue was), so I postponed it.

> Anyway... this is a very good start.
Good to hear, thanks for your comments.

- gandro
-- 
Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3 -
sicherer, schneller und einfacher! http://portal.gmx.net/de/go/chbrowser

-- 
Linus Torvalds: Software is like sex - it's better when it's free!

---