2024-05-29 08:24:13 +08:00
|
|
|
#
|
|
|
|
# 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
|
2025-01-27 04:40:21 +08:00
|
|
|
PKG_VERSION:=4.1.1
|
2024-05-29 08:24:13 +08:00
|
|
|
PKG_RELEASE:=1
|
|
|
|
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
|
|
|
PKG_SOURCE_URL:=@SF/netatalk
|
2025-01-27 04:40:21 +08:00
|
|
|
PKG_HASH:=2c8d312245b39a8b734ac9a8eb45110bc03de3088928e574310a990d3b800241
|
2024-05-29 08:24:13 +08:00
|
|
|
|
2024-11-04 02:40:02 +08:00
|
|
|
PKG_MAINTAINER:=Antonio Pastor <antonio.pastor@gmail.com>
|
|
|
|
PKG_LICENSE:=GPL-2.0-or-later
|
|
|
|
PKG_LICENSE_FILES:=COPYING
|
2024-05-29 08:24:13 +08:00
|
|
|
PKG_CPE_ID:=cpe:/a:netatalk:netatalk
|
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
2024-10-25 12:03:33 +08:00
|
|
|
include $(INCLUDE_DIR)/nls.mk
|
|
|
|
include $(INCLUDE_DIR)/meson.mk
|
2024-05-29 08:24:13 +08:00
|
|
|
|
2025-01-27 04:45:59 +08:00
|
|
|
define Package/netatalk/Default
|
2024-05-29 08:24:13 +08:00
|
|
|
SECTION:=net
|
|
|
|
CATEGORY:=Network
|
|
|
|
SUBMENU:=Filesystem
|
2025-01-27 04:45:59 +08:00
|
|
|
TITLE:=Apple Filing Protocol
|
|
|
|
PROVIDES:=netatalk
|
2024-05-29 08:24:13 +08:00
|
|
|
URL:=http://netatalk.sourceforge.net
|
2024-11-04 02:40:02 +08:00
|
|
|
DEPENDS:=+libevent2 +libdb47 +libgcrypt
|
2024-05-29 08:24:13 +08:00
|
|
|
endef
|
|
|
|
|
2025-01-27 04:45:59 +08:00
|
|
|
define Package/netatalk-small
|
|
|
|
$(call Package/netatalk/Default)
|
|
|
|
TITLE+= (afpd only)
|
|
|
|
VARIANT:=small
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/netatalk
|
|
|
|
$(call Package/netatalk/Default)
|
|
|
|
TITLE+= with AppleTalk support
|
|
|
|
VARIANT:=appletalk
|
|
|
|
DEPENDS+=+kmod-appletalk
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/netatalk-full
|
|
|
|
$(call Package/netatalk/Default)
|
|
|
|
TITLE+= (configurable)
|
|
|
|
VARIANT:=full
|
|
|
|
DEPENDS+= \
|
|
|
|
+PACKAGE_NETATALK_APPLETALK:kmod-appletalk \
|
|
|
|
+PACKAGE_NETATALK_ZEROCONF:libavahi-client \
|
|
|
|
+PACKAGE_NETATALK_ACLS:libacl \
|
|
|
|
+PACKAGE_NETATALK_PAM:libpam \
|
|
|
|
+PACKAGE_NETATALK_LDAP:libopenldap \
|
|
|
|
+PACKAGE_NETATALK_ICONV:libiconv-full \
|
|
|
|
+PACKAGE_NETATALK_KERBEROS:krb5-libs \
|
|
|
|
+PACKAGE_NETATALK_LIBWRAP:libwrap
|
|
|
|
MENU:=1
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/netatalk/description/default
|
2024-11-04 02:40:02 +08:00
|
|
|
Netatalk is an Open Source Apple Filing Protocol (AFP) fileserver.
|
|
|
|
Implements a service that allows Macintosh file sharing
|
|
|
|
and Time Machine backups. Modern MacOS prefers Samba network shares
|
|
|
|
but AFP has shown superior throughput. High Sierra and older MacOS
|
|
|
|
only support AFP for Time Machine backups.
|
2025-01-27 04:45:59 +08:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/netatalk-small/description
|
|
|
|
$(call Package/netatalk/description/default)
|
|
|
|
This package includes only the AFPD service.
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/netatalk/description
|
|
|
|
$(call Package/netatalk/description/default)
|
|
|
|
This package includes the AFPD service and AppleTalk binaries.
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/netatalk-full/description
|
|
|
|
$(call Package/netatalk/description/default)
|
|
|
|
This package includes all OpenWrt supported features (customizable).
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/netatalk-full/config
|
|
|
|
source "$(SOURCE)/Config.in"
|
2024-05-29 08:24:13 +08:00
|
|
|
endef
|
|
|
|
|
2024-10-25 12:03:33 +08:00
|
|
|
MESON_ARGS += \
|
|
|
|
-Dwith-cnid-default-backend=dbd \
|
|
|
|
-Dwith-cnid-dbd-backend=true \
|
|
|
|
-Dwith-cnid-mysql-backend=false \
|
|
|
|
-Dwith-bdb-path="$(STAGING_DIR)/usr/" \
|
|
|
|
-Dwith-unicode-data-path="$(STAGING_DIR_HOST)/share/gnulib/tests/uniname/" \
|
|
|
|
-Dwith-libgcrypt-path="$(STAGING_DIR)/usr/" \
|
|
|
|
$(if $(CONFIG_SHADOW_PASSWORDS),-Dwith-shadow=true,-Dwith-shadow=false) \
|
2025-01-27 04:45:59 +08:00
|
|
|
-Dwith-afpstats=false \
|
|
|
|
-Dwith-cups=false \
|
|
|
|
-Dwith-quota=false \
|
|
|
|
-Dwith-spotlight=false \
|
|
|
|
-Dwith-cracklib=false \
|
|
|
|
-Dwith-tests=false \
|
|
|
|
-Dwith-testsuite=false \
|
2024-10-25 12:03:33 +08:00
|
|
|
-Dwith-dtrace=false \
|
|
|
|
-Dwith-debug=false \
|
|
|
|
-Dwith-shell-check=false \
|
|
|
|
-Dwith-readmes=false \
|
|
|
|
-Dwith-manual=none \
|
|
|
|
-Dwith-init-style=none \
|
2024-05-29 08:24:13 +08:00
|
|
|
|
2025-01-27 04:45:59 +08:00
|
|
|
ifeq ($(BUILD_VARIANT),small)
|
|
|
|
MESON_ARGS += \
|
|
|
|
-Dwith-appletalk=false \
|
|
|
|
-Dwith-zeroconf=false \
|
|
|
|
-Dwith-acls=false \
|
|
|
|
-Dwith-ldap=false \
|
|
|
|
-Dwith-pam=false \
|
|
|
|
-Dwith-libiconv=false \
|
|
|
|
-Dwith-kerberos=false \
|
|
|
|
-Dwith-krbV-uam=false \
|
|
|
|
-Dwith-tcp-wrappers=false \
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BUILD_VARIANT),appletalk)
|
|
|
|
MESON_ARGS += \
|
|
|
|
-Dwith-appletalk=true \
|
|
|
|
-Dwith-zeroconf=false \
|
|
|
|
-Dwith-acls=false \
|
|
|
|
-Dwith-ldap=false \
|
|
|
|
-Dwith-pam=false \
|
|
|
|
-Dwith-libiconv=false \
|
|
|
|
-Dwith-kerberos=false \
|
|
|
|
-Dwith-krbV-uam=false \
|
|
|
|
-Dwith-tcp-wrappers=false \
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BUILD_VARIANT),full)
|
|
|
|
MESON_ARGS += \
|
|
|
|
-Dwith-appletalk=$(if $(CONFIG_PACKAGE_NETATALK_APPLETALK),true,false) \
|
|
|
|
-Dwith-zeroconf=$(if $(CONFIG_PACKAGE_NETATALK_ZEROCONF),true,false) \
|
|
|
|
-Dwith-acls=$(if $(CONFIG_PACKAGE_NETATALK_ACLS),true,false) \
|
|
|
|
-Dwith-ldap=$(if $(CONFIG_PACKAGE_NETATALK_LDAP),true,false) \
|
|
|
|
-Dwith-pam=$(if $(CONFIG_PACKAGE_NETATALK_PAM),true,false) \
|
|
|
|
-Dwith-libiconv=$(if $(CONFIG_PACKAGE_NETATALK_ICONV),true,false) \
|
|
|
|
$(if $(CONFIG_PACKAGE_NETATALK_ICONV),-Dwith-libiconv-path=$(STAGING_DIR)/usr/lib/libiconv-full,) \
|
|
|
|
-Dwith-kerberos=$(if $(CONFIG_PACKAGE_NETATALK_KERBEROS),true,false) \
|
|
|
|
-Dwith-krbV-uam=$(if $(CONFIG_PACKAGE_NETATALK_KERBEROS),true,false) \
|
|
|
|
-Dwith-tcp-wrappers=$(if $(CONFIG_PACKAGE_NETATALK_LIBWRAP),true,false) \
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
2024-05-29 08:24:13 +08:00
|
|
|
define Package/netatalk/conffiles
|
|
|
|
/etc/afp.conf
|
|
|
|
/etc/extmap.conf
|
|
|
|
/etc/netatalk/
|
2024-11-04 02:41:21 +08:00
|
|
|
/etc/atalkd.conf
|
2025-01-27 04:45:59 +08:00
|
|
|
/etc/macipgw.conf
|
2024-05-29 08:24:13 +08:00
|
|
|
endef
|
|
|
|
|
2025-01-27 04:45:59 +08:00
|
|
|
define Package/netatalk-small/install
|
2024-05-29 08:24:13 +08:00
|
|
|
$(INSTALL_DIR) $(1)/usr/bin
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
2024-10-25 12:03:33 +08:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/netatalk
|
2024-05-29 08:24:13 +08:00
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
|
|
|
$(INSTALL_DIR) $(1)/etc/init.d
|
2024-10-25 12:03:33 +08:00
|
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libatalk.so* $(1)/usr/lib/
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/netatalk/*.so $(1)/usr/lib/netatalk/
|
|
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
|
2024-05-29 08:24:13 +08:00
|
|
|
$(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
|
|
|
|
|
2025-01-27 04:45:59 +08:00
|
|
|
define Package/netatalk/install
|
|
|
|
$(call Package/netatalk-small/install,$(1))
|
|
|
|
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/atalkd.conf $(1)/etc/
|
|
|
|
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/macipgw.conf $(1)/etc/
|
|
|
|
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/papd.conf $(1)/etc/
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/netatalk-full/install
|
|
|
|
$(call Package/netatalk-small/install,$(1))
|
|
|
|
$(if $(PACKAGE_NETATALK_APPLETALK),$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/atalkd.conf $(1)/etc/,)
|
|
|
|
$(if $(PACKAGE_NETATALK_APPLETALK),$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/macipgw.conf $(1)/etc/,)
|
|
|
|
$(if $(PACKAGE_NETATALK_APPLETALK),$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/papd.conf $(1)/etc/,)
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,netatalk-small))
|
2024-05-29 08:24:13 +08:00
|
|
|
$(eval $(call BuildPackage,netatalk))
|
2025-01-27 04:45:59 +08:00
|
|
|
$(eval $(call BuildPackage,netatalk-full))
|