3 2

[alpine-devel] Initial Commit of Netatalk 3.0.1 package

Oliver Loch
Details
Message ID
<1351455714-26496-1-git-send-email-grimeton@gmx.net>
Sender timestamp
1351455712
DKIM signature
missing
Download raw message
attached the patches for the aports tree.

Thanks!

KR,

Oliver



---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---

[alpine-devel] [PATCH 1/2] Initial commit of Netatalk Version 3.0.1

Oliver Loch
Details
Message ID
<1351455714-26496-2-git-send-email-grimeton@gmx.net>
In-Reply-To
<1351455714-26496-1-git-send-email-grimeton@gmx.net> (view parent)
Sender timestamp
1351455713
DKIM signature
missing
Download raw message
Patch: +161 -0
---
 main/netatalk/APKBUILD              | 80 +++++++++++++++++++++++++++++++++++++
 main/netatalk/netatalk.confd        |  7 ++++
 main/netatalk/netatalk.initd        | 28 +++++++++++++
 main/netatalk/netatalk.post-install | 42 +++++++++++++++++++
 main/netatalk/netatalk.pre-install  |  4 ++
 5 files changed, 161 insertions(+)
 create mode 100644 main/netatalk/APKBUILD
 create mode 100644 main/netatalk/netatalk.confd
 create mode 100644 main/netatalk/netatalk.initd
 create mode 100644 main/netatalk/netatalk.post-install
 create mode 100644 main/netatalk/netatalk.pre-install

diff --git a/main/netatalk/APKBUILD b/main/netatalk/APKBUILD
new file mode 100644
index 0000000..241d6f0
--- /dev/null
+++ b/main/netatalk/APKBUILD
@@ -0,0 +1,80 @@
+# Contributor: Oliver Loch <grimeton@gmx.net>
+# Maintainer:
+pkgname=netatalk
+pkgver=3.0.1
+pkgrel=1
+pkgdesc="High performance, super stable AFP Fileserver for Macintosh Computers"
+url="http://netatalk.sourceforge.net"
+arch="all"
+license="GPL2"
+depends="dbus libintl libattr readline sqlite-libs dbus-libs avahi-libs avahi libsasl libevent libgssglue heimdal"
+depends_dev="libiconv-dev db-dev dbus-dev readline-dev avahi-dev libdaemon-dev libevent-dev libgssglue-dev heimdal-dev $depends"
+# depends_dev="libiconv-dev libintl-dev db-dev dbus-dev py-dbus-dev libcddb-dev gdbm-dev unixodbc-dev eggdbus-dev dbus-glib-dev readline-dev avahi-dev libgpg-error-dev libsasl-dev 
+# depends_dev=""
+makedepends="$depends_dev"
+install="$pkgname.pre-install $pkgname.post-install"
+subpackages="$pkgname-dev $pkgname-doc"
+source="http://downloads.sourceforge.net/project/netatalk/netatalk/3.0.1/netatalk-3.0.1.tar.bz2
+	http://sourceforge.net/p/netatalk/bugs/459/attachment/bundled-libevent.patch
+	netatalk.initd
+	netatalk.confd
+	"
+options="libtool"
+
+_builddir="$srcdir"/"$pkgname"-"$pkgver"
+prepare() {
+	local i
+	cd "$_builddir"
+	for i in $source; do
+		case $i in
+			*.patch) _filename="$(basename "${i}")"; msg $_filename; patch -p1 -i "$srcdir"/$_filename || return 1;;
+		esac
+	done
+}
+
+build() {
+	export CPPFLAGS="-I /usr/include/"
+	export LDFLAGS="-levent"
+	cd "$_builddir"
+	./configure \
+	--prefix=/usr \
+	--bindir=/usr/bin \
+	--sbindir=/usr/sbin \
+	--sysconfdir=/etc \
+	--localstatedir=/var \
+	--mandir=/usr/share/man \
+	--infodir=/usr/share/info \
+	--enable-quota \
+	--enable-zeroconf \
+	--enable-krbV-uam \
+	--enable-overwrite \
+	--disable-bundled-libevent \
+	--enable-fhs \
+	--with-pam=no \
+	--with-kerberos \
+	--with-libevent-header=/usr/include/ \
+	--with-libevent-lib=/usr/lib/ \
+		|| return 1
+	make || return 1
+}
+
+package() {
+	cd "$_builddir"
+	make DESTDIR="$pkgdir" install || return 1
+	[ ! -d "$pkgdir/usr/" ] && mkdir "$pkgdir/usr/"
+	[ ! -d "$pkgdir/etc/netatalk/" ] && mkdir "$pkgdir/etc/netatalk/"
+	[ -d "$pkgdir/sbin/" ] && mv "$pkgdir/sbin/" "$pkgdir/usr/sbin/"
+	[ -d "$pkgdir/bin/" ] && mv "$pkgdir/bin/" "$pkgdir/usr/bin/"
+	[ -d "$pkgdir/lib/" ] && mv "$pkgdir/lib/" "$pkgdir/usr/lib/"
+	[ -f "$pkgdir/etc/afp.conf" ] && mv "$pkgdir/etc/afp.conf" "$pkgdir/etc/netatalk/afp.conf"	
+
+	install -m755 -D "$srcdir"/$pkgname.initd \
+		"$pkgdir"/etc/init.d/$pkgname || return 1
+	install -m644 -D "$srcdir"/$pkgname.confd \
+		"$pkgdir"/etc/conf.d/$pkgname || return 1
+}
+
+md5sums="b4f5c932b2ca99f5292bd6b6d69b3ebc  netatalk-3.0.1.tar.bz2
+862c94ef061911f5ace94665a070a939  bundled-libevent.patch
+c71bb49dda54fbc15fe9551f9052b3f9  netatalk.initd
+d4dd129f376ac2e75329f9faeaa11a59  netatalk.confd"
diff --git a/main/netatalk/netatalk.confd b/main/netatalk/netatalk.confd
new file mode 100644
index 0000000..e701df8
--- /dev/null
+++ b/main/netatalk/netatalk.confd
@@ -0,0 +1,7 @@
+# Sample conf.d file for alpine linux
+
+#
+# Specify daemon options here.
+#
+ADDITIONAL_OPTIONS="-F /etc/netatalk/afpd.conf"
+
diff --git a/main/netatalk/netatalk.initd b/main/netatalk/netatalk.initd
new file mode 100644
index 0000000..bf3019f
--- /dev/null
+++ b/main/netatalk/netatalk.initd
@@ -0,0 +1,28 @@
+#!/sbin/runscript
+
+# Sample init.d file for alpine linux.
+
+name=netatalk
+daemon=/usr/sbin/netatalk
+
+depend() {
+	need net dbus avahi-daemon
+	after firewall
+}
+
+start() {
+	ebegin "Starting ${name}"
+		start-stop-daemon --start --quiet \
+			--pidfile /var/run/${name}.pid \
+			--exec ${daemon} -- ${ADDITIONAL_OPTIONS}
+	eend $?
+}
+
+stop() {
+	ebegin "Stopping ${name}"
+		start-stop-daemon --stop --quiet \
+			--pidfile /var/run/$name.pid \
+			--exec ${daemon}
+	eend $?
+}
+
diff --git a/main/netatalk/netatalk.post-install b/main/netatalk/netatalk.post-install
new file mode 100644
index 0000000..3438aca
--- /dev/null
+++ b/main/netatalk/netatalk.post-install
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+# get some environment settings - helpers
+
+_HOSTNAME=$(uname -n)
+
+generate_example_config() {
+
+	echo "; Netatalk 3.x configuration file."
+	echo "; Syntax now follows the Samba syntax."
+	echo "; This is an example, to help you set netatalk up."
+	echo ""
+	echo "[Global]"
+	[ "${_HOSTNAME}x" != "x" ] && echo "hostname = ${_HOSTNAME}"
+	echo "advertise ssh = no"
+	echo "; afp listen = 127.0.0.1, ::1"
+	echo "uam path = /usr/lib/netatalk/"
+	echo "uam list = uams_dhx.so, uams_dhx2.so"
+	echo "log file = /var/log/netatalk.log"
+	echo "; log level = default:maxdebug, afpdaemon:maxdebug, logger:maxdebug, uamsdaemon:maxdebug"
+	echo "zeroconf = yes"
+	echo "admin group = root"
+	echo "unix charset = iso-8859-15"
+	echo ""
+	echo "; Example share for a folder."
+	echo "[srv]"
+	echo "path = /srv"
+	echo "valid users = root"
+	echo ""
+	echo "; Example share to use with Apple's TimeMachine"
+	echo ";[TimeMachine]"
+	echo ";path = /srv/timemachine"
+	echo ";valid users = root"
+	echo ";time machine = yes"
+	echo ";vol size limit = 409600"
+	echo ""
+
+	return 0;
+}
+
+generate_example_config > /etc/netatalk/afp.conf
+
diff --git a/main/netatalk/netatalk.pre-install b/main/netatalk/netatalk.pre-install
new file mode 100644
index 0000000..46079e0
--- /dev/null
+++ b/main/netatalk/netatalk.pre-install
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+# add something which happends before install
+
-- 
1.8.0



---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---

[alpine-devel] [PATCH 2/2] Changes in APKBUILD - Removed comments.

Oliver Loch
Details
Message ID
<1351455714-26496-3-git-send-email-grimeton@gmx.net>
In-Reply-To
<1351455714-26496-1-git-send-email-grimeton@gmx.net> (view parent)
Sender timestamp
1351455714
DKIM signature
missing
Download raw message
Patch: +0 -2
---
 main/netatalk/APKBUILD | 2 --
 1 file changed, 2 deletions(-)

diff --git a/main/netatalk/APKBUILD b/main/netatalk/APKBUILD
index 241d6f0..6c160a9 100644
--- a/main/netatalk/APKBUILD
+++ b/main/netatalk/APKBUILD
@@ -9,8 +9,6 @@ arch="all"
 license="GPL2"
 depends="dbus libintl libattr readline sqlite-libs dbus-libs avahi-libs avahi libsasl libevent libgssglue heimdal"
 depends_dev="libiconv-dev db-dev dbus-dev readline-dev avahi-dev libdaemon-dev libevent-dev libgssglue-dev heimdal-dev $depends"
-# depends_dev="libiconv-dev libintl-dev db-dev dbus-dev py-dbus-dev libcddb-dev gdbm-dev unixodbc-dev eggdbus-dev dbus-glib-dev readline-dev avahi-dev libgpg-error-dev libsasl-dev 
-# depends_dev=""
 makedepends="$depends_dev"
 install="$pkgname.pre-install $pkgname.post-install"
 subpackages="$pkgname-dev $pkgname-doc"
-- 
1.8.0



---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---

Re: [alpine-devel] [PATCH 1/2] Initial commit of Netatalk Version 3.0.1

Natanael Copa
Details
Message ID
<20121031113937.6b3b9262@ncopa-desktop.nor.wtbts.net>
In-Reply-To
<1351455714-26496-2-git-send-email-grimeton@gmx.net> (view parent)
Sender timestamp
1351679977
DKIM signature
missing
Download raw message
Thank you very much!

Some comments.

On Sun, 28 Oct 2012 21:21:53 +0100
Oliver Loch <grimeton@gmx.net> wrote:

> ---
>  main/netatalk/APKBUILD              | 80

We normally add new stuff to testing first, so we can let the build
servers build package and test that it is not completely broken before
we move it to main.

...
> +++ b/main/netatalk/APKBUILD
> @@ -0,0 +1,80 @@
> +# Contributor: Oliver Loch <grimeton@gmx.net>
> +# Maintainer:

And we would really only want maintained stuff in main.

...

> +package() {
> +	cd "$_builddir"
> +	make DESTDIR="$pkgdir" install || return 1
> +	[ ! -d "$pkgdir/usr/" ] && mkdir "$pkgdir/usr/"
> +	[ ! -d "$pkgdir/etc/netatalk/" ] && mkdir
> "$pkgdir/etc/netatalk/"

you can do mkdir -p "$pkgdir"/usr "$pkgdir"/etc/netatalk

but the make install should have done it really.

> +	[ -d "$pkgdir/sbin/" ] && mv "$pkgdir/sbin/"
> "$pkgdir/usr/sbin/"
> +	[ -d "$pkgdir/bin/" ] && mv "$pkgdir/bin/" "$pkgdir/usr/bin/"
> +	[ -d "$pkgdir/lib/" ] && mv "$pkgdir/lib/" "$pkgdir/usr/lib/"
> +	[ -f "$pkgdir/etc/afp.conf" ] && mv "$pkgdir/etc/afp.conf"
> "$pkgdir/etc/netatalk/afp.conf" +

Those should not be needed. If they are, the makefiles are broke and
should be patched. (and submitted upstream)

...

> diff --git a/main/netatalk/netatalk.pre-install
> b/main/netatalk/netatalk.pre-install new file mode 100644
> index 0000000..46079e0
> --- /dev/null
> +++ b/main/netatalk/netatalk.pre-install
> @@ -0,0 +1,4 @@
> +#!/bin/sh
> +
> +# add something which happends before install
> +

This file could be removed. It would generate an extra fork (=slow
down) during install for no reason.

Do you think you could fix up the mentioned issues and resend a single
new patch with the things fixed?

do something like:

# fix things and test that it builds
cp -r main/netatalk testing/netatalk
git add testing/netatalk
git commit -v

# as commit message you have something like:
testing/netatalk: new aport

<short descroption what it is>
<url>
# git send-email --to alpine-devel@lists.alpinelinux.org HEAD^


If you are familiar with git can ofcourse also do:
 git pull --rebase
 git mv main/netatalk testing/
 git commit --amend
 git rebase -i
# merge the commits into one and fix the commit message

and then resend it.

Thanks!


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---