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