From patchwork Thu Apr 26 07:41:47 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Hadjinlian X-Patchwork-Id: 155178 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 3F320B6F13 for ; Thu, 26 Apr 2012 17:42:46 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 742798FECD; Thu, 26 Apr 2012 07:42:43 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 084JxlxZJCjZ; Thu, 26 Apr 2012 07:42:41 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 569898FEC4; Thu, 26 Apr 2012 07:42:40 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 34D9C8F753 for ; Thu, 26 Apr 2012 07:42:39 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 28C8A8FEC4 for ; Thu, 26 Apr 2012 07:42:39 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NYjnEkO3C6gj for ; Thu, 26 Apr 2012 07:42:37 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wi0-f175.google.com (mail-wi0-f175.google.com [209.85.212.175]) by whitealder.osuosl.org (Postfix) with ESMTPS id 63A5E8FEC3 for ; Thu, 26 Apr 2012 07:42:37 +0000 (UTC) Received: by wibhn6 with SMTP id hn6so5394220wib.10 for ; Thu, 26 Apr 2012 00:42:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=qc/t0NBB04zpti3+0dxGoYGScVlSIxPu7MoVGfTwLBc=; b=vyy1RH+E0Qy2/xC+Rt+y6GlLaodQ1H7K4rQqD26lKngOM7BY3dn6zjSf2/7YXP75gx OM5k7rM5s3Sw5AZNCbmvLod7a63BqL+os45GK9yJuIDnaWvgfTyca/k4epztzbsOlA06 05EdR8BfjWnSwMpPOT4gsRh5QDOduTAoweRF/w4mmgJutL5fn3WZUidQ/PFAoj5AkyDH c9Cj8G1ZWL4aAMcw22FDtH2J+nK0/0Zfelz0rtGM/uzZRHZ1cnpOCtUfhnBBa0VU77N6 5pxwPAfOuQ1FjjQHtMQGE1Y4BBGU4wjuCmk+Jzxl3VjyFrgyVYwrpAyUrDbUcRyAgQT3 27tA== Received: by 10.180.91.10 with SMTP id ca10mr48365910wib.17.1335426155553; Thu, 26 Apr 2012 00:42:35 -0700 (PDT) Received: from localhost (193.5-14-84.ripe.coltfrance.com. [84.14.5.193]) by mx.google.com with ESMTPS id ff9sm43094016wib.2.2012.04.26.00.42.34 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 26 Apr 2012 00:42:34 -0700 (PDT) From: Maxime Hadjinlian To: buildroot@busybox.net Date: Thu, 26 Apr 2012 09:41:47 +0200 Message-Id: <1335426107-4727-1-git-send-email-maxime.hadjinlian@gmail.com> X-Mailer: git-send-email 1.7.10 Subject: [Buildroot] [PATCH] Add Netatalk X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net This patch add the Netatalk package to Buildroot. Signed-off-by: Maxime Hadjinlian --- package/Config.in | 1 + package/netatalk/Config.in | 10 ++++++++++ package/netatalk/S50netatalk | 43 ++++++++++++++++++++++++++++++++++++++++++ package/netatalk/netatalk.mk | 35 ++++++++++++++++++++++++++++++++++ 4 files changed, 89 insertions(+) create mode 100644 package/netatalk/Config.in create mode 100755 package/netatalk/S50netatalk create mode 100644 package/netatalk/netatalk.mk diff --git a/package/Config.in b/package/Config.in index 5ae1c81..7c19ed9 100644 --- a/package/Config.in +++ b/package/Config.in @@ -487,6 +487,7 @@ source "package/netcat/Config.in" source "package/netkitbase/Config.in" source "package/netkittelnet/Config.in" endif +source "package/netatalk/Config.in" source "package/netplug/Config.in" source "package/netsnmp/Config.in" source "package/netstat-nat/Config.in" diff --git a/package/netatalk/Config.in b/package/netatalk/Config.in new file mode 100644 index 0000000..1459246 --- /dev/null +++ b/package/netatalk/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_NETATALK + bool "netatalk" + select BR2_PACKAGE_BERKELEYDB + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_LIBGCRYPT + select BR2_PACKAGE_LIBGPG_ERROR + help + Netatalk can be used to turn a *NIX machine into an extremely + high-performance and reliable file server for Macintosh computers. + http://netatalk.sourceforge.net/ diff --git a/package/netatalk/S50netatalk b/package/netatalk/S50netatalk new file mode 100755 index 0000000..94bb161 --- /dev/null +++ b/package/netatalk/S50netatalk @@ -0,0 +1,43 @@ +#!/bin/sh +# +# Start netatalk daemon (aftpd && cnid_metad) +# + +AFPD_UAMLIST="-U uams_dhx2.so,uams_clrtxt.so" + +start() { + echo -n "Starting Netatalk services (this will take a while): " + echo "Starting afpd" + echo -n " afpd" + start-stop-daemon -S -q -p /var/run/afpd.pid --exec /usr/sbin/afpd -- $AFPD_UAMLIST -g nobody -c 50 + echo -n " cnid_metad" + start-stop-daemon -S -q -p /var/run/cnid_metad.pid --exec /usr/sbin/cnid_metad -- -l log_note + echo "." +} + +stop(){ + echo -n "Stopping Netatalk Daemons:" + echo -n " afpd" + start-stop-daemon -K -q -p /var/run/afpd.pid + echo -n " cnid_metad" + start-stop-daemon -K -q -p /var/run/cnid_metad.pid +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + start + stop + ;; + *) + echo $"Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? + diff --git a/package/netatalk/netatalk.mk b/package/netatalk/netatalk.mk new file mode 100644 index 0000000..534265d --- /dev/null +++ b/package/netatalk/netatalk.mk @@ -0,0 +1,35 @@ +############################################################# +# +# netatalk +# +############################################################# +NETATALK_VERSION = 2.2.2 +NETATALK_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/netatalk/netatalk/$(NETATALK_VERSION)/ +NETATALK_SOURCE = netatalk-$(NETATALK_VERSION).tar.bz2 + +NETATALK_DEPENDENCIES = openssl berkeleydb libgcrypt libgpg-error +NETATALK_CONF_OPT += --with-cnid-cdb-backend \ + --with-bdb=$(STAGING_DIR)/usr \ + --disable-zeroconf \ + --with-ssl-dir=$(STAGING_DIR)/usr \ + --with-libgcrypt-dir=$(STAGING_DIR)/usr \ + --with-shadow \ + --disable-shell-check \ + --without-pam + +ifeq ($(BR2_PACKAGE_CUPS),y) + NETATALK_DEPENDENCIES += cups + NETATALK_CONF_OPT += --enable-cups +else + NETATALK_CONF_OPT += --disable-cups +endif + +define NETATALK_INSTALL_EXTRA_FILES + [ -f $(TARGET_DIR)/etc/init.d/S50netatalk ] || \ + $(INSTALL) -m 0755 -D package/netatalk/S50netatalk \ + $(TARGET_DIR)/etc/init.d/S50netatalk +endef + +NETATALK_POST_INSTALL_TARGET_HOOKS += NETATALK_INSTALL_EXTRA_FILES + +$(eval $(call AUTOTARGETS))