1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-17 12:53:54 +02:00
openwrt-packages/net/netatalk/Makefile
Alexandru Ardelean 2675e6813c netatalk: fix config files permissions
After checking in the ipkg-install dir of netatalk,
it seems that the permissions it sets to the conf-files
are 644.

 # ls -la lede/build_dir/target-mips_24kc_musl/netatalk-3.1.11/ipkg-install/etc
 -rw-r--r-- 1 sandu sandu   226 iun  5 20:53 afp.conf
 -rw-r--r-- 1 sandu sandu  1948 iun  5 20:53 dbus-session.conf
 -rw-r--r-- 1 sandu sandu 25037 iun  5 20:53 extmap.conf

While the Package/netatalk/install build rule overrides
them to 600.

According to
* https://github.com/openwrt/packages/issues/4318
* https://forum.lede-project.org/t/help-with-apple-filesharing-protocol-for-time-machine/3259/5
this is a problem in some setups.

So, this patch changes them to what the netatalk
package creators intended initially (i.e. 644).

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2017-06-05 21:02:09 +03:00

94 lines
2.5 KiB
Makefile

#
# 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.1.11
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@SF/netatalk
PKG_HASH:=3434472ba96d3bbe3b024274438daad83b784ced720f7662a4c1d0a1078799a6
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
PKG_FIXUP:=autoreconf
include $(INCLUDE_DIR)/package.mk
define Package/netatalk
SECTION:=net
CATEGORY:=Network
SUBMENU:=Filesystem
DEPENDS:=+libattr +libdb47 +libgcrypt +libopenssl $(LIBRPC_DEPENDS)
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
TARGET_LDFLAGS += $(LIBRPC)
CONFIGURE_ARGS += \
--disable-afs \
--enable-hfs \
--disable-debugging \
--disable-shell-check \
--disable-timelord \
--disable-a2boot \
--disable-cups \
--disable-tcp-wrappers \
--with-cnid-default-backend=dbd \
--with-bdb="$(STAGING_DIR)/usr/" \
--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-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))