netatalk: update to 3.2.0.
authorAntonio Pastor <apccv@outlook.com>
Wed, 29 May 2024 00:24:13 +0000 (20:24 -0400)
committerHannu Nyman <hannu.nyman@iki.fi>
Sun, 15 Dec 2024 09:31:07 +0000 (11:31 +0200)
Commit restores package after it was removed from OpenWrt 21.02.
Signed-off-by: Antonio Pastor <apccv@outlook.com>
net/netatalk/Makefile [new file with mode: 0644]
net/netatalk/files/afpd.init [new file with mode: 0644]

diff --git a/net/netatalk/Makefile b/net/netatalk/Makefile
new file mode 100644 (file)
index 0000000..9b397ac
--- /dev/null
@@ -0,0 +1,99 @@
+#
+# Copyright (C) 2009-2013 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=netatalk
+PKG_VERSION:=3.2.0
+PKG_RELEASE:=1
+
+#PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_URL:=@SF/netatalk
+PKG_HASH:=0c2b4b47450bc7ac95a268d1033471f572a3e06b64131fcef9b66e73663b6d08
+
+PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
+PKG_FIXUP:=autoreconf
+
+PKG_CPE_ID:=cpe:/a:netatalk:netatalk
+
+PKG_BUILD_DEPENDS:=libevent2
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/netatalk
+  SECTION:=net
+  CATEGORY:=Network
+  SUBMENU:=Filesystem
+  DEPENDS:=+libattr +libdb47 +libgcrypt +libopenssl +libevent2
+  TITLE:=netatalk
+  URL:=http://netatalk.sourceforge.net
+  MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
+endef
+
+define Package/netatalk/decription
+  Netatalk is a freely-available Open Source AFP fileserver.
+  It also provides a kernel level implementation of the AppleTalk
+  Protocol Suite.
+endef
+
+TARGET_CFLAGS += -std=gnu99
+
+CONFIGURE_ARGS += \
+       --disable-afs \
+       --disable-hfs \
+       --enable-debugging \
+       --disable-shell-check \
+       --disable-timelord \
+       --disable-a2boot \
+       --disable-cups \
+       --disable-tcp-wrappers \
+       --with-cnid-default-backend=dbd \
+       --with-bdb="$(STAGING_DIR)/usr/" \
+       --with-libevent=no \
+       --with-libgcrypt-dir="$(STAGING_DIR)/usr" \
+       --with-ssl-dir="$(STAGING_DIR)/usr" \
+       --with-uams-path="/usr/lib/uams" \
+       --without-acls \
+       --without-kerberos \
+       --without-mysql \
+       --with-mysql-config=false \
+       --without-pam \
+       --disable-admin-group \
+       --disable-srvloc \
+       --disable-zeroconf \
+       $(if $(CONFIG_SHADOW_PASSWORDS),--with-shadow,--without-shadow) \
+       --without-dtrace \
+       --without-ldap
+
+define Package/netatalk/conffiles
+/etc/afp.conf
+/etc/extmap.conf
+/etc/netatalk/
+endef
+
+define Package/netatalk/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_DIR) $(1)/usr/lib/uams
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libatalk.so* $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/dbd $(1)/usr/bin/
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/ad $(1)/usr/bin/
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/afppasswd $(1)/usr/bin/
+       $(CP) $(PKG_INSTALL_DIR)/usr/sbin/afpd $(1)/usr/sbin/
+       $(CP) $(PKG_INSTALL_DIR)/usr/sbin/cnid_dbd $(1)/usr/sbin/
+       $(CP) $(PKG_INSTALL_DIR)/usr/sbin/cnid_metad $(1)/usr/sbin/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/uams/*.so $(1)/usr/lib/uams/
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/afp.conf $(1)/etc/
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/extmap.conf $(1)/etc/
+       $(INSTALL_BIN) ./files/afpd.init $(1)/etc/init.d/afpd
+endef
+
+$(eval $(call BuildPackage,netatalk))
diff --git a/net/netatalk/files/afpd.init b/net/netatalk/files/afpd.init
new file mode 100644 (file)
index 0000000..8fab349
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2010-2012 OpenWrt.org
+
+START=80
+STOP=10
+
+USE_PROCD=1
+
+start_service() {
+        mkdir -p /var/netatalk/CNID/
+
+       procd_open_instance
+       procd_set_param command /usr/sbin/afpd -d -F /etc/afp.conf
+       procd_set_param file /etc/afp.conf
+       procd_set_param respawn
+       procd_close_instance
+
+       procd_open_instance
+       procd_set_param command /usr/sbin/cnid_metad -d
+       procd_set_param respawn
+       procd_close_instance
+}
+