Magellan Linux

Contents of /trunk/extras/samba/samba-4.9.3-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 31762 - (show annotations) (download)
Fri Dec 7 08:01:22 2018 UTC (5 years, 4 months ago) by niro
File size: 6164 byte(s)
-added missing python2-gpgme sdep
1 # $Id$
2
3 PNAME="samba"
4 PVER="4.9.3"
5 PBUILD="r1"
6
7 PCAT="net-fs"
8
9 DESCRIPTION="Samba provides seamless file and print services to SMB/CIFS clients."
10 HOMEPAGE="http://www.samba.org"
11
12 # todo: external ldb and tevent!
13 DEPEND=">= virtual/glibc
14 >= net-print/libcups-2.2
15 >= dev-db/tdb-1.3
16 >= dev-libs/popt-1.16
17 >= dev-libs/talloc-2.1
18 >= dev-libs/jansson-2.12
19 >= sys-apps/acl-2.2
20 >= sys-libs/ncurses-6.1
21 >= sys-libs/readline-7.0
22 >= sys-libs/pam-1.1
23 >= sys-libs/libsystemd-238
24 >= app-admin/gamin-0.1.10
25 >= net-dns/avahi-0.7
26 >= app-crypt/gnutls-3.6
27 >= app-crypt/gpgme-1.12
28 >= net-nds/libldap-2.4
29 >= net-fs/cifs-utils-6.8"
30
31 SDEPEND=">= sys-dev/automake-4
32 >= sys-dev/autoconf-5
33 >= virtual/sed
34 >= dev-lang/perl-5.28.1
35 >= dev-lang/python-2.7
36 >= dev-python/python2-gpgme-1.12
37 >= net-nds/openldap-2.4
38 >= app-text/docbook-xsl-stylesheets-1.78"
39
40 SRCFILE="${PNAME}-${PVER}.tar.gz"
41 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
42
43 msetfeature "!check" # no check target in Makefile
44 sminclude mtools multilib systemd
45
46 # imap modules
47 SMB_SHARED_MODULES="idmap_ad,idmap_rid,idmap_adex,idmap_hash,idmap_tdb2"
48 # pdb modules
49 SMB_SHARED_MODULES+=",pdb_tdbsam,pdb_ldap,pdb_ads,pdb_smbpasswd,pdb_wbc_sam,pdb_samba4,auth_unix"
50 # auth modules
51 SMB_SHARED_MODULES+=",auth_wbc,auth_server,auth_netlogond,auth_script,auth_samba4"
52
53 # use external tdb
54 SMB_BUNDLED_LIBRARIES="!tdb"
55 # use external talloc
56 SMB_BUNDLED_LIBRARIES+=",!talloc,!pytalloc-util"
57 # use internal tevent
58 SMB_BUNDLED_LIBRARIES+=",tevent"
59 # use external popt
60 SMB_BUNDLED_LIBRARIES+=",!popt"
61 # use internal ldb
62 SMB_BUNDLED_LIBRARIES+=",ldb,pyldb-util"
63
64 CONFD_VER=1.2
65 SMBD_SVC_VER=1.5
66 NMBD_SVC_VER=1.3
67 WINBINDD_SVC_VER=1.2
68
69 SRC_URI=(
70 http://us1.samba.org/samba/ftp/stable/${SRCFILE}
71 mirror://${PNAME}/${SRCFILE}
72 mirror://${PNAME}/lmhosts
73 mirror://${PNAME}/smbusers
74 mirror://${PNAME}/samba.confd-${CONFD_VER}
75 mirror://${PNAME}/samba.pamd
76 mirror://${PNAME}/samba.logrotate
77 mirror://${PNAME}/samba.service
78 mirror://${PNAME}/nmbd.service-${NMBD_SVC_VER}
79 mirror://${PNAME}/smbd.service-${SMBD_SVC_VER}
80 mirror://${PNAME}/winbindd.service-${WINBINDD_SVC_VER}
81 )
82
83 UP2DATE="updatecmd http://ftp.samba.org/pub/samba | grep '${PNAME}-[0-9].*' | highesttarball gz"
84
85 src_prepare()
86 {
87 munpack ${SRCFILE} || die
88
89 # add our vendor suffix
90 all-abis 'sed -i "s:^\(SAMBA_VERSION_VENDOR_SUFFIX=\).*:\1\"magellan\":" VERSION || die'
91 #all-abis 'sh script/mkversion.sh || die' # new waf build system creates this one automatically
92 }
93
94 src_compile()
95 {
96 mconfigure \
97 --enable-fhs \
98 --libexecdir=/usr/'$(mlibdir)'/samba \
99 --sysconfdir=/etc/samba \
100 --localstatedir=/var \
101 --with-configdir=/etc/samba \
102 --with-modulesdir=/usr/'$(mlibdir)'/samba \
103 --with-piddir=/run/samba \
104 --with-lockdir=/var/cache/samba \
105 --with-logfilebase=/var/log/samba \
106 --with-privatedir=/var/lib/samba/private \
107 --bundled-libraries="${SMB_BUNDLED_LIBRARIES}" \
108 --with-shared-modules="${SMB_SHARED_MODULES}" \
109 --with-syslog \
110 --with-acl-support \
111 --enable-cups \
112 --with-ads \
113 --with-ldap \
114 --with-winbind \
115 --with-pam \
116 --with-quotas \
117 --with-systemd \
118 --enable-gnutls \
119 --enable-avahi \
120 --disable-rpath \
121 --disable-rpath-install \
122 || die
123
124 mmake || die
125 }
126
127 src_install()
128 {
129 # required directories
130 minstalldir /etc/samba || die
131 all-abis 'minstalldir /usr/$(mlibdir)/cups/backend || die'
132 minstalldir /usr/share/doc/${PNAME}-${PVER}/examples || die
133
134 # required directories by samba at runtime
135 mkeepdir /var/log/samba || die
136 mkeepdir /run/samba || die
137 mkeepdir /var/cache/samba || die
138 mkeepdir /var/lib/samba/netlogon || die
139 mkeepdir /var/lib/samba/profiles || die
140 mkeepdir /var/lib/samba/printers/W32X86 || die
141 mkeepdir /var/lib/samba/printers/WIN40 || die
142 mkeepdir /var/lib/samba/printers/W32ALPHA || die
143 mkeepdir /var/lib/samba/printers/W32MIPS || die
144 mkeepdir /var/lib/samba/printers/W32PPC || die
145 mkeepdir /var/lib/samba/private || die
146 mkeepdir /var/spool/samba || die
147
148 # fix permissions
149 mchmod 0700 /var/lib/samba/private || die
150 mchmod 1777 /var/spool/samba || die
151
152 mmake DESTDIR=${BINDIR} install || die
153
154 # if exist remove *.old binaries
155 if [[ -n $(find ${BINDIR}/usr/bin -type f -name '*.old') ]]
156 then
157 for i in ${BINDIR}/usr/bin/*.old
158 do
159 [[ -e ${i} ]] && rm -f ${i} || die
160 done
161 fi
162
163 # add cups printing support
164 all-abis 'mlink ../../../bin/smbspool /usr/$(mlibdir)/cups/backend/smb || die'
165
166 # install our config files
167 # fake smb.conf to get smbmount work
168 memptyfile /etc/samba/smb.conf || die
169
170 # our smb example config
171 minstalletc examples/smb.conf.default smb.conf.example /etc/samba || die
172 # fix logrotate
173 sed -i 's:log.%m:%m.log:g' ${BINDIR}/etc/samba/smb.conf.example || die
174
175 # our lmhosts and smbusers config
176 minstalletc lmhosts lmhosts /etc/samba || die
177 minstalletc smbusers smbusers /etc/samba || die
178
179 # install systemd units
180 minstallconf samba.confd-${CONFD_VER} samba || die
181 minstallunit nmbd.service-${NMBD_SVC_VER} nmbd.service || die
182 minstallunit smbd.service-${SMBD_SVC_VER} smbd.service || die
183 minstallunit winbindd.service-${WINBINDD_SVC_VER} winbindd.service || die
184 minstallunit samba.service || die
185 minstalldir /etc/tmpfiles.d || die
186 MCONFIG=/etc/tmpfiles.d/samba.conf
187 mclearconfig || die
188 maddconfig 'd /run/samba 0755 root root -'
189
190 # install pam configuration
191 minstallpam samba.pamd samba || die
192
193 # install logrotate config
194 minstalllog samba.logrotate samba || die
195
196 # other docs
197 minstalldocs COPYING Manifest README REVISION Read-Manifest-Now Roadmap WHATSNEW.txt || die
198 }
199
200 postinstall()
201 {
202 mstartunit nmbd.service
203 mstartunit winbindd.service
204 mstartunit smbd.service
205
206 echo
207 echo "To initialize samba's password database, please run:"
208 echo " pdbedit --force-initialized-passwords"
209 echo
210 echo "If you experience client locks in file transfers _only_, try the parameter"
211 echo " use sendfile = no (man smb.conf(5), man sendfile(2))"
212 echo
213 echo "There also seem some problems with the smbfs implementation of the recent 2.6 kernels."
214 echo "If you experience problems (lockups) with smbfs, try cifs as an alternative."
215 echo
216 }
217
218 postremove()
219 {
220 mstopunit nmbd.service
221 mstopunit winbindd.service
222 mstopunit smbd.service
223 }