summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: fb52679cdcba255bd27e9c60ea0e97fe7d9034c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# Maintainer: Fabian Maurer <dark.shadow4@web.de>
# Contributor: Rafael Fontenelle <rafaelff@gnome.org>
# Contributor: Maxime Gauduin <alucryd@archlinux.org>

pkgname=('lib32-smbclient')
pkgver=4.18.3
pkgrel=1
pkgdesc="Tools to access a server's filespace and printers via SMB"
arch=('x86_64')
url='http://www.samba.org'
license=('GPL3')
makedepends=('lib32-avahi' 'lib32-gnutls' 'lib32-libbsd' 'lib32-libcap'
             'lib32-libcups' 'lib32-libgcrypt' 'lib32-pam'
             'lib32-systemd' 'lib32-talloc' 'lib32-tdb' 'lib32-popt'
             'lib32-tevent' 'lib32-ldb' 'lib32-libarchive' 'lib32-libaio'
             'lib32-libnsl' 'lib32-libtirpc' 'perl-parse-yapp'
             'lib32-jansson' 'rpcsvc-proto' 'smbclient' 'libwbclient' 'lib32-ncurses' 'perl-json')
depends=('lib32-avahi' 'lib32-gnutls' 'lib32-libcap' 'lib32-libcups'
	   'lib32-libgcrypt' 'lib32-pam' 'lib32-systemd'
	   'lib32-talloc' 'lib32-tdb' 'lib32-ldb'
	   'lib32-libaio' 'perl-parse-yapp' 'lib32-jansson' 'smbclient' 'lib32-ncurses' 'lib32-libunwind' 'lib32-icu')
replaces=('lib32-libwbclient')
provides=('lib32-libwbclient')
source=("https://www.samba.org/samba/samba/ftp/stable/samba-${pkgver}.tar.gz")
sha256sums=('c67e1453165a3918ffffad600236ca3966b47bde4798e89ae600ae3903ccc32c')

prepare() {
  cd samba-${pkgver}
  
  SAVEIFS=${IFS}
  IFS=$(echo -en "\n\b")
  PYTHON_CALLERS="$(find ${srcdir}/samba-${pkgver} -name '*.py')
$(find ${srcdir}/samba-${pkgver} -name 'wscript*')
$(find ${srcdir}/samba-${pkgver} -name 'configure.ac')
$(find ${srcdir}/samba-${pkgver} -name 'upgrade_from_s3')
$(find ${srcdir}/samba-${pkgver}/buildtools -type f)
$(find ${srcdir}/samba-${pkgver}/source4/scripting -type f)"
  sed -i -e 's|/usr/bin/env python$|/usr/bin/env python3-32|' \
         -e 's|python-config|python3-32-config|' \
         -e 's|bin/python|bin/python3-32|' \
      ${PYTHON_CALLERS}
  IFS=${SAVEIFS}
}

build() {
  cd samba-${pkgver}

  export CC='gcc -m32'
  export CXX='g++ -m32'
  export PKG_CONFIG_PATH='/usr/lib32/pkgconfig'
  _samba4_idmap_modules='idmap_ad,idmap_rid,idmap_adex,idmap_hash,idmap_tdb2'
  _samba4_pdb_modules='pdb_tdbsam,pdb_ldap,pdb_ads,pdb_smbpasswd,pdb_wbc_sam,pdb_samba4'
  _samba4_auth_modules='auth_unix,auth_wbc,auth_server,auth_netlogond,auth_script,auth_samba4'

  ./configure --enable-fhs \
              --prefix=/usr \
              --sysconfdir=/etc \
              --sbindir=/usr/bin \
              --libdir=/usr/lib32 \
              --libexecdir=/usr/lib32/samba \
              --localstatedir=/var \
              --with-configdir=/etc/samba \
              --with-lockdir=/var/cache/samba \
              --with-sockets-dir=/var/run/samba \
              --with-piddir=/var/run \
              --with-ads \
              --with-ldap \
              --with-winbind \
              --with-acl-support \
              --with-systemd \
              --systemd-install-services \
              --with-pam \
              --with-pammodulesdir=/usr/lib32/security \
              --bundled-libraries=!tdb,!talloc,!pytalloc-util,!tevent,!popt,!ldb,!pyldb-util \
              --with-shared-modules=${_samba4_idmap_modules},${_samba4_pdb_modules},${_samba4_auth_modules} \
              --disable-rpath-install \
              --disable-glusterfs \
              --without-lttng \
              --without-gpgme \
              --disable-python \
              --without-ad-dc

  make
  make DESTDIR="${srcdir}/staging" install
}

package() {
  cd staging

  install -dm 755 "${pkgdir}"/usr/lib32/{pkgconfig,samba}
  for lib in usr/lib32/lib*.so*; do
    mv ${lib} "${pkgdir}"/usr/lib32/
  done
  for lib in usr/lib32/samba/lib*.so*; do
    mv ${lib} "${pkgdir}"/usr/lib32/samba/
  done
  mv usr/lib32/pkgconfig/wbclient.pc "${pkgdir}"/usr/lib32/pkgconfig/
}

# vim: ts=2 sw=2 et: