Name: samba Version: 4.23.3 Release: 1%{?dist} Summary: Server and client for SMB/CIFS and Active Directory License: GPL-3.0-or-later AND LGPL-3.0-or-later URL: https://www.samba.org Source0: %{name}-%{version}.tar.gz # Build deps essenciais (sua lista deduplicada – pode reduzir depois) BuildRequires: gcc gcc-c++ make python3 python3-devel pkgconf pkgconf-m4 pkgconf-pkg-config redhat-rpm-config BuildRequires: zlib-devel gnutls-devel libtasn1-devel popt-devel readline-devel jansson-devel libarchive-devel BuildRequires: cups-devel avahi-devel gpgme-devel dbus-devel ncurses-devel pam-devel openldap-devel BuildRequires: talloc-devel tdb-devel tevent-devel ldb-devel python3-talloc python3-tdb python3-tevent python3-ldb BuildRequires: cmocka-devel flex bison perl-Parse-Yapp intltool # docbook-xsl muda de nome entre EL9/EL10 %if 0%{?rhel} >= 10 BuildRequires: docbook-style-xsl %else BuildRequires: docbook-xsl %endif # Recommends/Requires em runtime podem ser refinados depois Requires: gnutls, popt, readline, libarchive, cups, avahi-libs, dbus-libs, jansson, zlib, pam, openldap, libbsd %description Samba provides SMB/CIFS file and print services and can act as an Active Directory domain controller. %prep %autosetup -n %{name}-%{version} %build # Use waf (não make direto) python3 ./waf configure \ --prefix=/usr \ --sbindir=/usr/sbin \ --sysconfdir=/etc \ --localstatedir=/var \ --mandir=/usr/share/man \ --libdir=%{_libdir} \ --enable-fhs \ --with-system-mitkrb5 \ --bundled-libraries=NONE python3 ./waf build -j%{?_smp_mflags} %install rm -rf %{buildroot} python3 ./waf install --destdir=%{buildroot} # Diretório de config e smb.conf como ghost (criado no %post) install -d %{buildroot}%{_sysconfdir}/samba %post # cria /etc/samba/smb.conf se não existir if [ ! -f %{_sysconfdir}/samba/smb.conf ]; then cat > %{_sysconfdir}/samba/smb.conf <<'EOF' [global] workgroup = WORKGROUP server role = standalone server disable netbios = yes smb ports = 445 EOF fi %files %license COPYING %doc README* # Config %dir %{_sysconfdir}/samba %config(noreplace) %ghost %{_sysconfdir}/samba/smb.conf # Binaries usuais (cliente/servidor) %{_bindir}/* %{_sbindir}/samba %{_sbindir}/smbd %{_sbindir}/nmbd %{_sbindir}/samba-* # Bibliotecas privadas do Samba e módulos %{_libdir}/samba/** %{_libdir}/libsamba*.so* %{_libdir}/libndr*.so* %{_libdir}/libtevent*.so* %{_libdir}/libtdb*.so* %{_libdir}/libtalloc*.so* %{_libdir}/libpopt*.so* %{_libdir}/python*/site-packages/samba/* # Manpages e dados %{_datadir}/samba/** %{_mandir}/man1/* %{_mandir}/man5/* %{_mandir}/man7/* %{_mandir}/man8/* %changelog * Sat Nov 15 2025 Guilherme Suzin - 4.23.3-1 - Initial packaging (waf build, ghost smb.conf, broad file list for monolithic package)