summaryrefslogtreecommitdiff
path: root/packages/net-fs/samba/samba.exlib
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss@sss.chaoslab.ru>2018-07-08 01:44:28 +0300
committerGluzskiy Alexandr <sss@sss.chaoslab.ru>2018-07-08 01:44:28 +0300
commite28f580b39cf7927ef548ae265206b45ae8332eb (patch)
tree094865a5cf04769fd85e5fcd6775d534f74d5d9e /packages/net-fs/samba/samba.exlib
parente05a3ee8e7ae16c803e01bd02314cce66f05f37f (diff)
samba-scm build fix, lmdb version bump (packages from net)
wafsamba.exlib fix
Diffstat (limited to 'packages/net-fs/samba/samba.exlib')
-rw-r--r--packages/net-fs/samba/samba.exlib252
1 files changed, 252 insertions, 0 deletions
diff --git a/packages/net-fs/samba/samba.exlib b/packages/net-fs/samba/samba.exlib
new file mode 100644
index 0000000..f441150
--- /dev/null
+++ b/packages/net-fs/samba/samba.exlib
@@ -0,0 +1,252 @@
+# Copyright 2011-2012 Pierre Lejeune <superheron@gmail.com>
+# Copyright 2013-2017 Wulf C. Krueger <philantrop@exherbo.org>
+# Distributed under the terms of the GNU General Public License v2
+
+require pam wafsamba systemd-service
+
+export_exlib_phases src_prepare src_configure src_install
+
+SUMMARY="Samba provides seamless file and print services to SMB/CIFS clients, e. g. Windows"
+DESCRIPTION="
+Samba is a free software implementation of the SMB/CIFS networking protocol that
+can be run on many platforms other than Microsoft Windows. Samba uses the TCP/IP
+protocol that is installed on the host. When correctly configured, it allows
+that host to interact with a Microsoft Windows client or server as if it is a Windows
+file and print server. Additionally, it can act as a PDC, a domain member server
+or as a part of an Active Directory.
+"
+HOMEPAGE="https://www.${PN}.org"
+DOWNLOADS="mirror://samba/stable/${PNV}.tar.gz"
+
+BUGS_TO="tgurr@exherbo.org"
+
+LICENCES="GPL-3"
+SLOT="0"
+MYOPTIONS="
+ acl
+ addc [[
+ description = [ Allow Samba to act as an Active Directory Domain Controller ]
+ requires = [ gnutls ]
+ ]]
+ ads [[
+ description = [ Enable Active Directory support ]
+ requires = [ acl gnutls ldap winbind ]
+ ]]
+ avahi [[ description = [ Enable Avahi support ] ]]
+ cluster [[ description = [ Enable the Samba cluster extensions ] ]]
+ cups
+ gnutls
+ gpg [[
+ description = [ Store cleartext passwords in a PGP/OpenGPG encrypted form ]
+ requires = [ addc ]
+ ]]
+ ldap
+ quotas [[ description = [ Enables support for user quotas ] ]]
+ syslog [[ description = [ Enables support for syslog ] ]]
+ system-krb5 [[ description = [ Use krb5 instead of the bundled heimdal ] ]]
+ systemd
+ winbind [[ description = [ Enables support for the winbind auth daemon ] ]]
+"
+
+# The test are simply broken.
+RESTRICT="test"
+
+# !system-krb5? ( app-crypt/heimdal[>=1.5] )
+DEPENDENCIES="
+ build+run:
+ app-arch/libarchive[>=3.1.2]
+ dev-db/ldb[>=1.3.3][python_abis:*(-)?]
+ dev-db/tdb[>=1.3.15][python_abis:*(-)?]
+ dev-lang/perl:=
+ dev-libs/iniparser
+ dev-libs/libbsd [[ note = [ automagic ] ]]
+ dev-libs/libgcrypt
+ dev-libs/libgpg-error
+ dev-libs/popt
+ dev-libs/talloc[>=2.1.11][python_abis:*(-)?]
+ dev-libs/tevent[>=0.9.36][python_abis:*(-)?]
+ dev-perl/Parse-Yapp
+ dev-python/iso8601[python_abis:*(-)?]
+ dev-util/subunit[python_abis:*(-)?]
+ net-libs/cyrus-sasl
+ sys-apps/attr
+ sys-apps/dbus
+ sys-libs/libcap
+ sys-libs/pam
+ sys-libs/readline:=
+ acl? ( sys-apps/acl )
+ addc? ( dev-python/pycrypto[python_abis:*(-)?] )
+ ads? ( dev-python/dnspython[python_abis:*(-)?] )
+ avahi? ( net-dns/avahi )
+ cluster? ( dev-libs/ctdb )
+ cups? ( net-print/cups )
+ gnutls? ( dev-libs/gnutls )
+ gpg? (
+ app-crypt/gpgme
+ dev-python/pygpgme[python_abis:*(-)?]
+ )
+ ldap? ( net-directory/openldap )
+ syslog? ( virtual/syslog )
+ system-krb5? ( app-crypt/krb5[>=1.15.1] )
+ systemd? ( sys-apps/systemd )
+ test:
+ dev-util/cmocka[>=1.1.1]
+ sys-libs/nss_wrapper[>=1.1.3]
+ sys-libs/pam_wrapper[>=1.0.4]
+ sys-libs/resolv_wrapper[>=1.1.4]
+ sys-libs/socket_wrapper[>=1.1.9]
+ sys-libs/uid_wrapper[>=1.2.4]
+ suggestion:
+ app-antivirus/clamav [[
+ description = [ vfs_virusfilter can use ClamAV to scan for viruses ]
+ ]]
+ media-gfx/graphviz [[
+ description = [ samba-tool utilizes Graphviz for dot output and text-based heatmaps ]
+ ]]
+"
+
+WAF_SRC_CONFIGURE_PARAMS+=(
+ --builtin-libraries=NONE
+ --nopyc
+ --nopyo
+ --sbindir=/usr/x86_64-pc-linux-gnu/bin
+ --systemd-install-services
+ --enable-fhs
+ --enable-pthreadpool
+ --disable-cephfs
+ --disable-glusterfs
+ --with-iconv
+ --with-libarchive
+ --with-lockdir=/run/lock/samba
+ --with-modulesdir=/usr/$(exhost --target)/lib/samba
+ --with-pam
+ --with-pammodulesdir=$(getpam_mod_dir)
+ --with-piddir=/run
+ --with-privatedir=/var/lib/${PN}/private
+ --with-sendfile-support
+ --with-sockets-dir=/run/samba
+ --with-systemddir=${SYSTEMDSYSTEMUNITDIR}
+ --with-utmp
+ --without-automount
+ --without-dmapi
+ --without-fam
+ --without-lttng
+ --without-ntvfs-fileserver
+)
+
+if ever is_scm; then
+ DEPENDENCIES+="
+ build+run:
+ dev-db/ldb[>=1.4.0]
+ "
+ WAF_SRC_CONFIGURE_PARAMS+=(
+ --without-json-audit
+ )
+fi
+
+WAF_SRC_CONFIGURE_OPTION_ENABLES=(
+ avahi
+ cups
+ gnutls
+)
+
+WAF_SRC_CONFIGURE_OPTION_WITHS=(
+ "acl acl-support"
+ ads
+ "ads dnsupdate"
+ "cluster cluster-support"
+ "gpg gpgme"
+ ldap
+ quotas
+ syslog
+ systemd
+ winbind
+)
+
+WAF_SRC_CONFIGURE_TESTS=(
+ --enable-selftest
+)
+
+# Build failed: -> missing file: '[...]/bin/default/docs-xml/smbdotconf/parameters.all.xml'
+WAF_SRC_COMPILE_PARAMS+=( -j1 )
+
+samba_src_prepare() {
+ default
+
+ # adjust to /run
+ edo sed \
+ -e "s:/var/run:/run:g" \
+ -i packaging/systemd/samba.conf.tmp
+
+ # rpcgen hardcodes the cpp command
+ local dir=${WORKBASE}/symlinked-build-tools
+ edo mkdir -p ${dir}
+ edo ln -s /usr/host/bin/$(exhost --target)-cpp ${dir}/cpp
+ edo sed \
+ -e "s:rpcgen:rpcgen -Y ${WORKBASE}/symlinked-build-tools:g" \
+ -i source3/modules/wscript_build \
+ -i ctdb/wscript
+
+# # ensure system heimdal is used
+# if ever at_least 4.3.0; then
+# edo rm source4/heimdal_build/krb5-types.h
+# edo rm source4/heimdal/kdc/kdc.h
+# fi
+}
+
+samba_src_configure() {
+ WAF_SRC_CONFIGURE_PARAMS+=(
+ $(option system-krb5 && echo --with-system-mitkrb5)
+ $(option !addc && echo --without-ad-dc)
+ )
+
+ # Samba doesn't build with heimdal 1.5.3, 1.6_rc2 or git master
+ if ! option system-krb5; then
+ WAF_SRC_CONFIGURE_PARAMS+=(
+ --bundled-libraries=NONE,roken,wind,hx509,asn1,heimbase,hcrypto,krb5,gssapi,heimntlm,hdb,kdc,com_err,compile_et,asn1_compile
+ )
+ else
+ WAF_SRC_CONFIGURE_PARAMS+=(
+ --bundled-libraries=NONE
+ )
+ fi
+
+ waf_src_configure
+}
+
+samba_src_install() {
+ waf_src_install
+
+ python_bytecompile
+
+ option addc || edo rm "${IMAGE}"/${SYSTEMDSYSTEMUNITDIR}/samba.service
+ option winbind || edo rm "${IMAGE}"/${SYSTEMDSYSTEMUNITDIR}/winbind.service
+
+ # tmpfile is included but doesn't get installed, last checked: 4.8.0
+ insinto /usr/$(exhost --target)/lib/tmpfiles.d
+ hereins ${PN}.conf <<EOF
+d /run/samba 0755 root root -
+EOF
+
+ if option cluster; then
+ insinto /usr/$(exhost --target)/lib/tmpfiles.d
+ hereins ctdb.conf <<EOF
+d /run/ctdb 0755 root root -
+EOF
+ fi
+
+ if option cups; then
+ dodir $(cups-config --serverbin)/backend
+ dosym /usr/$(exhost --target)/bin/smbspool $(cups-config --serverbin)/backend/smb
+ fi
+
+ keepdir /var/{cache,lib,log}/samba
+ edo rmdir "${IMAGE}"/run/{lock/{samba,},{samba,}}
+
+ keepdir /var/lib/samba/bind-dns
+ keepdir /var/lib/samba/private/smbd.tmp/messaging
+
+ insinto /etc/${PN}
+ doins "${WORK}"/examples/smb.conf.default
+}
+