# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 # $Id: Portfile 152905 2016-09-20 12:12:50Z ryandesign@macports.org $ PortSystem 1.0 PortGroup conflicts_build 1.0 name samba3 conflicts talloc version 3.6.25 categories net platforms darwin maintainers nomaintainer license GPL-3 description SMB/CIFS implementation long_description Samba is an software suite that provides seamless file and \ print services to SMB/CIFS clients. \ OpenSSL based options are disabled by default \ due to licensing issues. homepage http://www.samba.org/ master_sites http://mirror.kent.ac.uk/sites/ftp.samba.org/ \ http://us1.samba.org/samba/ftp/stable/ \ ftp://ftp.bit.nl/mirror/samba/stable/ \ ftp://de.samba.org/samba.org/stable/ \ ftp://us4.samba.org/pub/samba/stable/ \ ftp://ru.samba.org/pub/samba/stable/ distname samba-${version} worksrcdir ${worksrcdir}/source3 checksums rmd160 4df673ddac2a3fc8590820c8651e10f0dac90281 \ sha256 8f2c8a7f2bd89b0dfd228ed917815852f7c625b2bc0936304ac3ed63aaf83751 depends_lib port:popt port:zlib port:readline port:ncurses conflicts_build samba4 configure.ldflags-append -lintl configure.args --libdir=${prefix}/lib/${name} \ --with-privatedir=${prefix}/var/db/smb \ --with-configdir=${prefix}/etc/${name} \ --with-swatdir=${prefix}/share/${name}/swat \ --with-readline=${prefix} \ --without-included-popt \ --disable-avahi \ --enable-cups \ --without-ldap \ --without-krb5 patchfiles patch-Makefile.in.diff \ patch-configure.diff \ patch-source_pkgconfig_all_pc_in.diff variant kerberos description "Enable Kerberos support" { configure.args-delete --without-krb5 depends_lib-append port:kerberos5 } variant openldap description "Enable OpenLDAP support" { configure.args-delete --without-ldap depends_lib-append port:openldap } platform darwin 9 { patchfiles-append patch-source_smbd_utmp_c.diff } post-destroot { xinstall -m 755 -d ${destroot}${prefix}/etc/${name}/ \ ${destroot}${prefix}/var/db/smb/ xinstall -m 644 ${worksrcpath}/../examples/smb.conf.default \ ${destroot}${prefix}/etc/${name}/smb.conf.sample xinstall -d -m 755 ${destroot}${prefix}/lib/pkgconfig copy {*}[glob ${worksrcpath}/pkgconfig/*.pc] ${destroot}${prefix}/lib/pkgconfig system "touch ${destroot}${prefix}/etc/${name}/lmhosts.sample" system "touch ${destroot}${prefix}/var/db/smb/secrets.tdb.sample" set changeline "\ -change bin/libnetapi.dylib.0 ${prefix}/lib/samba3/libnetapi.dylib \ -change bin/libsmbclient.dylib.0 ${prefix}/lib/samba3/libsmbclient.dylib \ -change bin/libsmbsharemodes.dylib.0 ${prefix}/lib/samba3/libsmbsharemodes.dylib \ -change bin/libtalloc.dylib.2 ${prefix}/lib/samba3/libtalloc.dylib \ -change bin/libtevent.dylib.0 ${prefix}/lib/samba3/libtevent.dylib \ -change bin/libtdb.dylib.1 ${prefix}/lib/samba3/libtdb.dylib \ -change bin/script.dylib ${prefix}/lib/samba3/auth/script.dylib \ -change bin/CP437.dylib ${prefix}/lib/samba3/charset/CP437.dylib \ -change bin/CP850.dylib ${prefix}/lib/samba3/charset/CP850.dylib \ -change bin/macosxfs.dylib ${prefix}/lib/samba3/charset/macosxfs.dylib \ -change bin/autorid.dylib ${prefix}/lib/samba3/idmap/autorid.dylib \ -change bin/pam_smbpass.dylib ${prefix}/lib/samba3/security/pam_smbpass.dylib \ -change bin/acl_tdb.dylib ${prefix}/lib/samba3/vfs/acl_tdb.dylib \ -change bin/acl_xattr.dylib ${prefix}/lib/samba3/vfs/acl_xattr.dylib \ -change bin/audit.dylib ${prefix}/lib/samba3/vfs/audit.dylib \ -change bin/cap.dylib ${prefix}/lib/samba3/vfs/cap.dylib \ -change bin/catia.dylib ${prefix}/lib/samba3/vfs/catia.dylib \ -change bin/crossrename.dylib ${prefix}/lib/samba3/vfs/crossrename.dylib \ -change bin/default_quota.dylib ${prefix}/lib/samba3/vfs/default_quota.dylib \ -change bin/expand_msdfs.dylib ${prefix}/lib/samba3/vfs/expand_msdfs.dylib \ -change bin/extd_audit.dylib ${prefix}/lib/samba3/vfs/extd_audit.dylib \ -change bin/fake_perms.dylib ${prefix}/lib/samba3/vfs/fake_perms.dylib \ -change bin/full_audit.dylib ${prefix}/lib/samba3/vfs/full_audit.dylib \ -change bin/linux_xfs_sgid.dylib ${prefix}/lib/samba3/vfs/linux_xfs_sgid.dylib \ -change bin/netatalk.dylib ${prefix}/lib/samba3/vfs/netatalk.dylib \ -change bin/preopen.dylib ${prefix}/lib/samba3/vfs/preopen.dylib \ -change bin/readahead.dylib ${prefix}/lib/samba3/vfs/readahead.dylib \ -change bin/readonly.dylib ${prefix}/lib/samba3/vfs/readonly.dylib \ -change bin/recycle.dylib ${prefix}/lib/samba3/vfs/recycle.dylib \ -change bin/scannedonly.dylib ${prefix}/lib/samba3/vfs/scannedonly.dylib \ -change bin/shadow_copy.dylib ${prefix}/lib/samba3/vfs/shadow_copy.dylib \ -change bin/shadow_copy2.dylib ${prefix}/lib/samba3/vfs/shadow_copy2.dylib \ -change bin/smb_traffic_analyzer.dylib ${prefix}/lib/samba3/vfs/smb_traffic_analyzer.dylib \ -change bin/streams_depot.dylib ${prefix}/lib/samba3/vfs/streams_depot.dylib \ -change bin/streams_xattr.dylib ${prefix}/lib/samba3/vfs/streams_xattr.dylib \ -change bin/time_audit.dylib ${prefix}/lib/samba3/vfs/time_audit.dylib \ -change bin/xattr_tdb.dylib ${prefix}/lib/samba3/vfs/xattr_tdb.dylib" system "install_name_tool ${changeline} -id ${prefix}/lib/samba3/libnetapi.dylib ${destroot}${prefix}/lib/samba3/libnetapi.dylib" system "install_name_tool ${changeline} -id ${prefix}/lib/samba3/libsmbclient.dylib ${destroot}${prefix}/lib/samba3/libsmbclient.dylib" system "install_name_tool ${changeline} -id ${prefix}/lib/samba3/libsmbsharemodes.dylib ${destroot}${prefix}/lib/samba3/libsmbsharemodes.dylib" system "install_name_tool ${changeline} -id ${prefix}/lib/samba3/libtalloc.dylib ${destroot}${prefix}/lib/samba3/libtalloc.dylib" system "install_name_tool ${changeline} -id ${prefix}/lib/samba3/libtevent.dylib ${destroot}${prefix}/lib/samba3/libtevent.dylib" system "install_name_tool ${changeline} -id ${prefix}/lib/samba3/libtdb.dylib ${destroot}${prefix}/lib/samba3/libtdb.dylib" system "install_name_tool ${changeline} -id ${prefix}/lib/samba3/auth/script.dylib ${destroot}${prefix}/lib/samba3/auth/script.dylib" system "install_name_tool ${changeline} -id ${prefix}/lib/samba3/charset/CP437.dylib ${destroot}${prefix}/lib/samba3/charset/CP437.dylib" system "install_name_tool ${changeline} -id ${prefix}/lib/samba3/charset/CP850.dylib ${destroot}${prefix}/lib/samba3/charset/CP850.dylib" system "install_name_tool ${changeline} -id ${prefix}/lib/samba3/charset/macosxfs.dylib ${destroot}${prefix}/lib/samba3/charset/macosxfs.dylib" system "install_name_tool ${changeline} -id ${prefix}/lib/samba3/idmap/autorid.dylib ${destroot}${prefix}/lib/samba3/idmap/autorid.dylib" system "install_name_tool ${changeline} -id ${prefix}/lib/samba3/security/pam_smbpass.dylib ${destroot}${prefix}/lib/samba3/security/pam_smbpass.dylib" system "install_name_tool ${changeline} -id ${prefix}/lib/samba3/vfs/acl_tdb.dylib ${destroot}${prefix}/lib/samba3/vfs/acl_tdb.dylib" system "install_name_tool ${changeline} -id ${prefix}/lib/samba3/vfs/acl_xattr.dylib ${destroot}${prefix}/lib/samba3/vfs/acl_xattr.dylib" system "install_name_tool ${changeline} -id ${prefix}/lib/samba3/vfs/audit.dylib ${destroot}${prefix}/lib/samba3/vfs/audit.dylib" system "install_name_tool ${changeline} -id ${prefix}/lib/samba3/vfs/cap.dylib ${destroot}${prefix}/lib/samba3/vfs/cap.dylib" system "install_name_tool ${changeline} -id ${prefix}/lib/samba3/vfs/catia.dylib ${destroot}${prefix}/lib/samba3/vfs/catia.dylib" system "install_name_tool ${changeline} -id ${prefix}/lib/samba3/vfs/crossrename.dylib ${destroot}${prefix}/lib/samba3/vfs/crossrename.dylib" system "install_name_tool ${changeline} -id ${prefix}/lib/samba3/vfs/default_quota.dylib ${destroot}${prefix}/lib/samba3/vfs/default_quota.dylib" if {[file exists ${destroot}${prefix}/lib/samba3/vfs/dirsort.dylib]} { system "install_name_tool ${changeline} -id ${prefix}/lib/samba3/vfs/dirsort.dylib ${destroot}${prefix}/lib/samba3/vfs/dirsort.dylib" } system "install_name_tool ${changeline} -id ${prefix}/lib/samba3/vfs/expand_msdfs.dylib ${destroot}${prefix}/lib/samba3/vfs/expand_msdfs.dylib" system "install_name_tool ${changeline} -id ${prefix}/lib/samba3/vfs/extd_audit.dylib ${destroot}${prefix}/lib/samba3/vfs/extd_audit.dylib" system "install_name_tool ${changeline} -id ${prefix}/lib/samba3/vfs/fake_perms.dylib ${destroot}${prefix}/lib/samba3/vfs/fake_perms.dylib" system "install_name_tool ${changeline} -id ${prefix}/lib/samba3/vfs/full_audit.dylib ${destroot}${prefix}/lib/samba3/vfs/full_audit.dylib" system "install_name_tool ${changeline} -id ${prefix}/lib/samba3/vfs/linux_xfs_sgid.dylib ${destroot}${prefix}/lib/samba3/vfs/linux_xfs_sgid.dylib" system "install_name_tool ${changeline} -id ${prefix}/lib/samba3/vfs/netatalk.dylib ${destroot}${prefix}/lib/samba3/vfs/netatalk.dylib" system "install_name_tool ${changeline} -id ${prefix}/lib/samba3/vfs/preopen.dylib ${destroot}${prefix}/lib/samba3/vfs/preopen.dylib" system "install_name_tool ${changeline} -id ${prefix}/lib/samba3/vfs/readahead.dylib ${destroot}${prefix}/lib/samba3/vfs/readahead.dylib" system "install_name_tool ${changeline} -id ${prefix}/lib/samba3/vfs/readonly.dylib ${destroot}${prefix}/lib/samba3/vfs/readonly.dylib" system "install_name_tool ${changeline} -id ${prefix}/lib/samba3/vfs/recycle.dylib ${destroot}${prefix}/lib/samba3/vfs/recycle.dylib" system "install_name_tool ${changeline} -id ${prefix}/lib/samba3/vfs/scannedonly.dylib ${destroot}${prefix}/lib/samba3/vfs/scannedonly.dylib" system "install_name_tool ${changeline} -id ${prefix}/lib/samba3/vfs/shadow_copy.dylib ${destroot}${prefix}/lib/samba3/vfs/shadow_copy.dylib" system "install_name_tool ${changeline} -id ${prefix}/lib/samba3/vfs/shadow_copy2.dylib ${destroot}${prefix}/lib/samba3/vfs/shadow_copy2.dylib" system "install_name_tool ${changeline} -id ${prefix}/lib/samba3/vfs/smb_traffic_analyzer.dylib ${destroot}${prefix}/lib/samba3/vfs/smb_traffic_analyzer.dylib" system "install_name_tool ${changeline} -id ${prefix}/lib/samba3/vfs/streams_depot.dylib ${destroot}${prefix}/lib/samba3/vfs/streams_depot.dylib" system "install_name_tool ${changeline} -id ${prefix}/lib/samba3/vfs/streams_xattr.dylib ${destroot}${prefix}/lib/samba3/vfs/streams_xattr.dylib" if {[file exists ${destroot}${prefix}/lib/samba3/vfs/syncops.dylib]} { system "install_name_tool ${changeline} -id ${prefix}/lib/samba3/vfs/syncops.dylib ${destroot}${prefix}/lib/samba3/vfs/syncops.dylib" } system "install_name_tool ${changeline} -id ${prefix}/lib/samba3/vfs/time_audit.dylib ${destroot}${prefix}/lib/samba3/vfs/time_audit.dylib" system "install_name_tool ${changeline} -id ${prefix}/lib/samba3/vfs/xattr_tdb.dylib ${destroot}${prefix}/lib/samba3/vfs/xattr_tdb.dylib" system "install_name_tool ${changeline} ${destroot}${prefix}/bin/eventlogadm" system "install_name_tool ${changeline} ${destroot}${prefix}/bin/net" system "install_name_tool ${changeline} ${destroot}${prefix}/bin/nmblookup" system "install_name_tool ${changeline} ${destroot}${prefix}/bin/ntlm_auth" system "install_name_tool ${changeline} ${destroot}${prefix}/bin/pdbedit" system "install_name_tool ${changeline} ${destroot}${prefix}/bin/profiles" system "install_name_tool ${changeline} ${destroot}${prefix}/bin/rpcclient" system "install_name_tool ${changeline} ${destroot}${prefix}/bin/sharesec" system "install_name_tool ${changeline} ${destroot}${prefix}/bin/smbcacls" system "install_name_tool ${changeline} ${destroot}${prefix}/bin/smbclient" system "install_name_tool ${changeline} ${destroot}${prefix}/bin/smbcontrol" system "install_name_tool ${changeline} ${destroot}${prefix}/bin/smbcquotas" system "install_name_tool ${changeline} ${destroot}${prefix}/bin/smbget" system "install_name_tool ${changeline} ${destroot}${prefix}/bin/smbpasswd" system "install_name_tool ${changeline} ${destroot}${prefix}/bin/smbspool" system "install_name_tool ${changeline} ${destroot}${prefix}/bin/smbstatus" system "install_name_tool ${changeline} ${destroot}${prefix}/bin/smbta-util" system "install_name_tool ${changeline} ${destroot}${prefix}/bin/smbtree" system "install_name_tool ${changeline} ${destroot}${prefix}/bin/tdbbackup" system "install_name_tool ${changeline} ${destroot}${prefix}/bin/tdbdump" system "install_name_tool ${changeline} ${destroot}${prefix}/bin/tdbrestore" system "install_name_tool ${changeline} ${destroot}${prefix}/bin/tdbtool" system "install_name_tool ${changeline} ${destroot}${prefix}/bin/testparm" system "install_name_tool ${changeline} ${destroot}${prefix}/sbin/nmbd" system "install_name_tool ${changeline} ${destroot}${prefix}/sbin/smbd" system "install_name_tool ${changeline} ${destroot}${prefix}/sbin/swat" } livecheck.type regex livecheck.url http://us5.samba.org/samba/ftp/?M=D livecheck.regex samba-(3\\.6\[0-9a-z.\]+)\\.tar\\.gz