Magellan Linux

Annotation of /trunk/extras/samba/samba-4.9.4-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


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