Subject: [alpine-devel] testing/libogg: New APKBUILD

From: "Mika Havela" <[email-masked]>
Date: Tue, 03 Feb 2009 10:13:14 +0000

Please have a extra look at this one.
It's my first /real/ APKBUILD so it might have some errors.

From ee887317def720a68dd49960f23b554236adf9de Mon Sep 17 00:00:00 2001
From: Mika Havela <[email-masked]>
Date: Tue, 3 Feb 2009 10:10:23 +0000
Subject: [PATCH] testing/libogg: New APKBUILD for libogg

I have the feeling that this APKBUILD needs some extra work.
---
 testing/libogg/APKBUILD |   27 +++++++++++++++++++++++++++
 1 files changed, 27 insertions(+), 0 deletions(-)
 create mode 100644 testing/libogg/APKBUILD

diff --git a/testing/libogg/APKBUILD b/testing/libogg/APKBUILD
new file mode 100644
index 0000000..c62705f
--- /dev/null
+++ b/testing/libogg/APKBUILD
@@ -0,0 +1,27 @@
+# Contributor: Mika Havela <[email-masked]>
+pkgname=libogg
+pkgver=1.1.3
+pkgrel=0
+pkgdesc="Ogg bitstream and framing library"
+url="http://xiph.org/ogg/"
+license="unknown"
+depends="uclibc"
+makedepends="uclibc++-dev"
+install=
+subpackages="$pkgname-doc $pkgname-dev"
+source="http://downloads.xiph.org/releases/ogg/$pkgname-$pkgver.tar.gz"
+
+build() {
+	cd "$srcdir/$pkgname-$pkgver"
+
+	./configure --prefix=/usr
+	make -j1 || return 1
+	make -j1 DESTDIR="$pkgdir" install
+
+	install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
+
+	# install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
+	# install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
+}
+
+md5sums="eaf7dc6ebbff30975de7527a80831585  libogg-1.1.3.tar.gz"
-- 
1.6.1

---

From: Natanael Copa <[email-masked]>
Date: Tue, 03 Feb 2009 14:02:32 +0100

> It's my first /real/ APKBUILD so it might have some errors.

Congrats!

Very good to be first real APKBUILD. You do come across some new stuff
here that no other APKBUILD have needed to deal with.

> 
> 
> 
> 
> 
> 
> differences
> between files
> attachment
> (0001-testing-libogg-New-APKBUILD-for-libogg.patch)
> 

is the license really unknown? Later on it looks like the license gets
installed so i dont think its unknown.

Gentoo says license is as-is. I think we can use that too.

> +makedepends="uclibc++-dev"

The only thing that does not make sense is: Why do we need install
uclibc++-dev (or g++ which is the real problem here) if we actually
don't use it?

The problem is that libogg looks for g++ and fails if its not there.
Really stupid as it does not use it at all.

So while your APKBUILD does work around the problem by make sure g++ is
installed, we can do better. :)

Gentoo have a function called epunt_cxx. I checked what it does. i
simply apply a patch for autoconf generated configure scripts and just
ignore the fact that g++ is missing.

I suggest we just copy this patch and just apply it rather than
installing g++.

> +       ./configure --prefix=/usr

Does package fail to build in parallel? As i understand, some packages
cannot handle parallel builds during 'make install' phase. Most packages
handles that just fine. We should not prevent users who have 8 cores to
actually use them unless it is absolutely necessary. (so generally, its
better to find out why the parallel build fails and fix that)

> +       install -Dm644 COPYING
> "$pkgdir"/usr/share/licenses/$pkgname/COPYING
> +

those lines can be removed. dead code.

> +md5sums="eaf7dc6ebbff30975de7527a80831585  libogg-1.1.3.tar.gz"

Otherwise, very well!

I'll commit it and do the above changes.

Thanks!

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