diff options
Diffstat (limited to 'net/netatalk4/files')
-rw-r--r-- | net/netatalk4/files/netatalk.in | 39 | ||||
-rw-r--r-- | net/netatalk4/files/pam.conf | 14 | ||||
-rw-r--r-- | net/netatalk4/files/patch-config_meson.build | 67 | ||||
-rw-r--r-- | net/netatalk4/files/patch-etc_uams_meson.build | 127 | ||||
-rw-r--r-- | net/netatalk4/files/patch-meson.build | 79 |
5 files changed, 326 insertions, 0 deletions
diff --git a/net/netatalk4/files/netatalk.in b/net/netatalk4/files/netatalk.in new file mode 100644 index 000000000000..36a36747f34d --- /dev/null +++ b/net/netatalk4/files/netatalk.in @@ -0,0 +1,39 @@ +#!/bin/sh + +# PROVIDE: netatalk +# REQUIRE: DAEMON %%ZEROCONF%% +# KEYWORD: shutdown +# +# AFP fileserver for Mac clients. Add the following to /etc/rc.conf to +# enable: +# +# netatalk_enable="YES" +# + +netatalk_enable=${netatalk_enable-"NO"} + +. /etc/rc.subr + +name=netatalk +rcvar=netatalk_enable + +load_rc_config ${name} + +command=%%PREFIX%%/sbin/${name} + +extra_commands="reload" +reload_cmd="netatalk_reload" + +netatalk_reload() +{ + local status + + if ! status=`run_rc_command status 2>&1`; then + echo $status + return 1 + fi + echo 'Reloading netatalk.' + kill -HUP $rc_pid +} + +run_rc_command "$1" diff --git a/net/netatalk4/files/pam.conf b/net/netatalk4/files/pam.conf new file mode 100644 index 000000000000..05120315054d --- /dev/null +++ b/net/netatalk4/files/pam.conf @@ -0,0 +1,14 @@ +# PAM configuration for the "netatalk" service +# + +# auth +auth include system + +# account +account include system + +# password +password include system + +# session +session include system diff --git a/net/netatalk4/files/patch-config_meson.build b/net/netatalk4/files/patch-config_meson.build new file mode 100644 index 000000000000..a8dc29c35c28 --- /dev/null +++ b/net/netatalk4/files/patch-config_meson.build @@ -0,0 +1,67 @@ +--- config/meson.build.orig 2025-02-10 20:41:20 UTC ++++ config/meson.build +@@ -4,59 +4,23 @@ afp_conf = configure_file( + configuration: cdata, + ) + +-if ( +- fs.exists(pkgconfdir / 'afp.conf') +- and not get_option('with-overwrite') +-) +- message('will not replace existing', pkgconfdir / 'afp.conf') +-else +- install_data(afp_conf, install_dir: pkgconfdir) +-endif ++install_data(afp_conf, rename: 'afp.conf.sample', install_dir: pkgconfdir) + + if have_spotlight + dbus_session_conf = configure_file( + input: 'dbus-session.conf.in', +- output: 'dbus-session.conf', ++ output: 'dbus-session.conf.netatalk', + configuration: cdata, + ) + +- if ( +- fs.exists(pkgconfdir / 'dbus-session.conf') +- and not get_option('with-overwrite') +- ) +- message('will not replace existing', pkgconfdir / 'dbus-session.conf') +- else +- install_data(dbus_session_conf, install_dir: pkgconfdir) +- endif ++ install_data(dbus_session_conf, install_dir: pkgconfdir) + endif + + if have_afpstats +- if ( +- fs.exists(dbus_sysconfpath / 'netatalk-dbus.conf') +- and not get_option('with-overwrite') +- ) +- message('will not replace existing', dbus_sysconfpath / 'netatalk-dbus.conf') +- else +- install_data('netatalk-dbus.conf', install_dir: dbus_sysconfpath) +- endif ++ install_data('netatalk-dbus.conf', install_dir: dbus_sysconfpath) + endif + +-static_conf_files = ['extmap.conf'] +- +-if have_appletalk +- static_conf_files += ['atalkd.conf', 'macipgw.conf', 'papd.conf'] +-endif +- +-foreach file : static_conf_files +- if ( +- fs.exists(pkgconfdir / file) +- and not get_option('with-overwrite') +- ) +- message('will not replace existing', pkgconfdir / file) +- else +- install_data(file, install_dir: pkgconfdir) +- endif +-endforeach ++install_data('extmap.conf', rename: 'extmap.conf.sample', install_dir: pkgconfdir) + + if ( + fs.exists('/etc/ld.so.conf.d') diff --git a/net/netatalk4/files/patch-etc_uams_meson.build b/net/netatalk4/files/patch-etc_uams_meson.build new file mode 100644 index 000000000000..91ae27204e92 --- /dev/null +++ b/net/netatalk4/files/patch-etc_uams_meson.build @@ -0,0 +1,127 @@ +--- etc/uams/meson.build.orig 2025-02-10 20:41:20 UTC ++++ etc/uams/meson.build +@@ -20,7 +20,7 @@ library( + name_suffix: lib_suffix, + override_options: 'b_lundef=false', + install: true, +- install_dir: libdir / 'netatalk', ++ install_dir: libexecdir / 'netatalk-uams', + ) + + uams_passwd_sources = ['uams_passwd.c'] +@@ -34,7 +34,7 @@ library( + name_suffix: lib_suffix, + override_options: 'b_lundef=false', + install: true, +- install_dir: libdir / 'netatalk', ++ install_dir: libexecdir / 'netatalk-uams', + ) + + if have_libgcrypt +@@ -51,7 +51,7 @@ if have_libgcrypt + name_suffix: lib_suffix, + override_options: 'b_lundef=false', + install: true, +- install_dir: libdir / 'netatalk', ++ install_dir: libexecdir / 'netatalk-uams', + ) + + library( +@@ -63,7 +63,7 @@ if have_libgcrypt + name_suffix: lib_suffix, + override_options: 'b_lundef=false', + install: true, +- install_dir: libdir / 'netatalk', ++ install_dir: libexecdir / 'netatalk-uams', + ) + + library( +@@ -75,7 +75,7 @@ if have_libgcrypt + name_suffix: lib_suffix, + override_options: 'b_lundef=false', + install: true, +- install_dir: libdir / 'netatalk', ++ install_dir: libexecdir / 'netatalk-uams', + ) + if have_pam + uams_dhx2_pam_sources = ['uams_dhx2_pam.c'] +@@ -89,20 +89,20 @@ if have_libgcrypt + name_suffix: lib_suffix, + override_options: 'b_lundef=false', + install: true, +- install_dir: libdir / 'netatalk', ++ install_dir: libexecdir / 'netatalk-uams', + ) + + if build_shared_lib + install_symlink( + 'uams_dhx2.so', +- install_dir: libdir / 'netatalk', ++ install_dir: libexecdir / 'netatalk-uams', + pointing_to: 'uams_dhx2_pam.so', + ) + endif + elif build_shared_lib + install_symlink( + 'uams_dhx2.so', +- install_dir: libdir / 'netatalk', ++ install_dir: libexecdir / 'netatalk-uams', + pointing_to: 'uams_dhx2_passwd.so', + ) + endif +@@ -118,20 +118,20 @@ if have_libgcrypt + name_suffix: lib_suffix, + override_options: 'b_lundef=false', + install: true, +- install_dir: libdir / 'netatalk', ++ install_dir: libexecdir / 'netatalk-uams', + ) + + if build_shared_lib + install_symlink( + 'uams_dhx.so', +- install_dir: libdir / 'netatalk', ++ install_dir: libexecdir / 'netatalk-uams', + pointing_to: 'uams_dhx_pam.so', + ) + endif + elif build_shared_lib + install_symlink( + 'uams_dhx.so', +- install_dir: libdir / 'netatalk', ++ install_dir: libexecdir / 'netatalk-uams', + pointing_to: 'uams_dhx_passwd.so', + ) + endif +@@ -150,20 +150,20 @@ if have_pam + name_suffix: lib_suffix, + override_options: 'b_lundef=false', + install: true, +- install_dir: libdir / 'netatalk', ++ install_dir: libexecdir / 'netatalk-uams', + ) + + if build_shared_lib + install_symlink( + 'uams_clrtxt.so', +- install_dir: libdir / 'netatalk', ++ install_dir: libexecdir / 'netatalk-uams', + pointing_to: 'uams_pam.so', + ) + endif + elif build_shared_lib + install_symlink( + 'uams_clrtxt.so', +- install_dir: libdir / 'netatalk', ++ install_dir: libexecdir / 'netatalk-uams', + pointing_to: 'uams_passwd.so', + ) + endif +@@ -181,6 +181,6 @@ if have_krb5_uam + name_suffix: lib_suffix, + override_options: 'b_lundef=false', + install: true, +- install_dir: libdir / 'netatalk', ++ install_dir: libexecdir / 'netatalk-uams', + ) + endif diff --git a/net/netatalk4/files/patch-meson.build b/net/netatalk4/files/patch-meson.build new file mode 100644 index 000000000000..e37e854f53c3 --- /dev/null +++ b/net/netatalk4/files/patch-meson.build @@ -0,0 +1,79 @@ +--- meson.build.orig 2025-02-10 20:41:20 UTC ++++ meson.build +@@ -66,6 +66,7 @@ libdir = prefix / get_option('libdir') + datadir = prefix / get_option('datadir') + includedir = prefix / get_option('includedir') + libdir = prefix / get_option('libdir') ++libexecdir = prefix / get_option('libexecdir') + mandir = prefix / get_option('mandir') + sbindir = prefix / get_option('sbindir') + sysconfdir = prefix / get_option('sysconfdir') +@@ -138,7 +139,7 @@ statedir = '-D_PATH_STATEDIR="' + localstatedir + '/ne + dversion = '-DVERSION="' + netatalk_version + '"' + messagedir = '-DSERVERTEXT="' + localstatedir + '/netatalk/msg/"' + statedir = '-D_PATH_STATEDIR="' + localstatedir + '/netatalk/"' +-uamdir = '-D_PATH_AFPDUAMPATH="' + libdir + '/netatalk/"' ++uamdir = '-D_PATH_AFPDUAMPATH="' + libexecdir + '/netatalk-uams/"' + + ############ + # Includes # +@@ -464,6 +465,7 @@ bdb_subdirs = [ + endif + + bdb_subdirs = [ ++ '%%DB_NAME%%', + 'db62', + 'db6.2', + 'db61', +@@ -641,6 +643,11 @@ if crypt.found() + if crypt.found() + cdata.set('HAVE_CRYPT_H', 1) + cdata.set('HAVE_LIBCRYPT', 1) ++else ++ crypt = cc.find_library('crypt', has_headers: 'unistd.h', required: false) ++ if crypt.found() ++ cdata.set('HAVE_LIBCRYPT', 1) ++ endif + endif + + # +@@ -819,12 +826,12 @@ dns_sd_libs = [] + + dns_sd_libs = [] + +-dns_sd = cc.find_library('dns_sd', required: false) ++dns_sd = cc.find_library('dns_sd', dirs: libsearch_dirs, required: false) + if dns_sd.found() + dns_sd_libs += dns_sd + endif + +-system = cc.find_library('system', required: false) ++system = cc.find_library('system', dirs: libsearch_dirs, required: false) + if dns_sd.found() + dns_sd_libs += system + endif +@@ -838,6 +845,8 @@ have_dns = ( + ) + ) + ++threads = dependency('threads', required: true) ++ + if enable_zeroconf + if avahi.found() + have_zeroconf = true +@@ -854,6 +863,7 @@ if enable_zeroconf + cdata.set('HAVE_MDNS', 1) + cdata.set('freebsd_zeroconf', 'mdnsd') + zeroconf_provider += 'mDNS' ++ dns_sd_libs += threads + endif + endif + +@@ -1709,6 +1719,7 @@ if not enable_pam + + if not enable_pam + have_pam = false ++ pam = dependency('', required: false) + else + if host_os != 'sunos' + pam_paths = [ |