pcre2: bump to 10.40
[kiss-trunc88.git] / samba / build
blob1b2d4beca069f47ef4d8e092dbcef731515f47f2
1 #!/bin/sh -e
3 _samba4_idmap_modules=idmap_ad,idmap_rid,idmap_adex,idmap_hash,idmap_tdb2
4 _samba4_pdb_modules=pdb_tdbsam,pdb_ldap,pdb_ads,pdb_smbpasswd,pdb_wbc_sam,pdb_samba4
5 _samba4_auth_modules=auth_unix,auth_wbc,auth_server,auth_netlogond,auth_script,auth_samba4
7 ./configure \
8 -cyes \
9 --enable-fhs \
10 --prefix=/usr \
11 --sysconfdir=/etc \
12 --sbindir=/usr/bin \
13 --libdir=/usr/lib \
14 --libexecdir=/usr/lib/samba \
15 --localstatedir=/var \
16 --with-configdir=/etc/samba \
17 --with-lockdir=/var/cache/samba \
18 --with-sockets-dir=/run/samba \
19 --with-piddir=/run \
20 --with-ads \
21 --with-ldap \
22 --with-winbind \
23 --with-acl-support \
24 --without-systemd \
25 --without-pam \
26 --bundled-libraries=!tdb,!talloc,!pytalloc-util,!tevent,!popt,!ldb,!pyldb-util \
27 --with-shared-modules=${_samba4_idmap_modules},${_samba4_pdb_modules},${_samba4_auth_modules} \
28 --disable-rpath-install \
29 --with-cluster-support \
30 --with-profiling-data
32 make
33 make DESTDIR="$1" install
35 if [ ! -e "$1"/usr/bin/smbtar ]; then
36 install -m755 source3/script/smbtar "$1"/usr/bin
39 mkdir -p "$1"/usr/lib/cups/backend
40 ln -sf /usr/bin/smbspool "$1"/usr/lib/cups/backend/smb
42 for script in bin/samba_dnsupdate bin/samba_kcc bin/samba_spnupdate bin/samba_upgradedns bin/samba-tool;
44 sed -i "/^sys\.path\.insert/ a\
45 sys.path.insert(0, '/usr/lib/python3.10/site-packages')" \
46 "${1}"/usr/${script}
47 done
49 sed -i -e '/^EnvironmentFile/ s/sysconfig/conf.d/' "${1}"/usr/lib/systemd/system/*.service
50 install -d -m755 "${1}"/etc/conf.d
51 install -Dm644 packaging/systemd/samba.sysconfig "${1}"/etc/conf.d/samba
53 install -Dm644 samba.conf "$1"/usr/lib/tmpfiles.d/samba.conf
54 install -dm755 "$1"/etc/samba
56 mkdir -p "$1"/etc/samba/private
57 chmod 700 "$1"/etc/samba/private
59 install -Dm644 samba.logrotate "$1"/etc/logrotate.d/samba
61 install -dm1777 "$1"/var/spool/samba
63 chmod 750 "$1"/etc/sudoers.d
64 chmod 600 "$1"/etc/sudoers.d/ctdb