Annotation of /branches/magellan-next/core/samba/samba-3.5.8-r1.smage2
Parent Directory | Revision Log
Revision 7884 -
(hide annotations)
(download)
Fri Jun 3 12:15:35 2011 UTC (12 years, 11 months ago) by niro
File size: 7038 byte(s)
Fri Jun 3 12:15:35 2011 UTC (12 years, 11 months ago) by niro
File size: 7038 byte(s)
auto added: ver bump to 3.5.8-r1
1 | niro | 7884 | # $Id$ |
2 | |||
3 | PNAME="samba" | ||
4 | PVER="3.5.8" | ||
5 | PBUILD="r1" | ||
6 | |||
7 | PCATEGORIE="net-fs" | ||
8 | STATE="unstable" | ||
9 | |||
10 | DESCRIPTION="Samba provides seamless file and print services to SMB/CIFS clients." | ||
11 | HOMEPAGE="http://www.samba.org" | ||
12 | |||
13 | DEPEND=">= virtual/glibc | ||
14 | >= net-print/cups-1.4 | ||
15 | >= dev-libs/popt-1.16 | ||
16 | >= sys-libs/ncurses-5.9 | ||
17 | >= sys-libs/readline-6.2 | ||
18 | >= app-admin/gamin-0.1.10 | ||
19 | >= dev-libs/openssl-1.0.0 | ||
20 | >= net-dns/avahi-0.6.30" | ||
21 | |||
22 | SDEPEND=">= sys-dev/automake-4 | ||
23 | >= sys-dev/autoconf-5 | ||
24 | >= sys-apps/sed-4" | ||
25 | |||
26 | SRCFILE="${PNAME}-${PVER}.tar.gz" | ||
27 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" | ||
28 | |||
29 | FILESDIR="${SOURCEDIR}/samba" | ||
30 | |||
31 | sminclude mtools | ||
32 | |||
33 | SRC_URI=( | ||
34 | http://us1.samba.org/samba/ftp/stable/${SRCFILE} | ||
35 | mirror://${PNAME}/${SRCFILE} | ||
36 | mirror://${PNAME}/smb.conf-3.0.14a | ||
37 | mirror://${PNAME}/lmhosts | ||
38 | mirror://${PNAME}/smbusers | ||
39 | mirror://${PNAME}/samba.rc | ||
40 | mirror://${PNAME}/nmbd.service | ||
41 | mirror://${PNAME}/smbd.service | ||
42 | ) | ||
43 | |||
44 | UP2DATE="updatecmd http://ftp.samba.org/pub/samba | grep ${PNAME}-[0-9].* | lasttarball gz" | ||
45 | |||
46 | src_prepare() | ||
47 | { | ||
48 | munpack ${SRCFILE} || die | ||
49 | cd ${SRCDIR} | ||
50 | |||
51 | # examples: to be copied as docs | ||
52 | rm -rf ${SRCDIR}/examples.ORIG || die | ||
53 | |||
54 | # add our vendor suffix | ||
55 | sed -i "s:^\(SAMBA_VERSION_VENDOR_SUFFIX=\).*:\1\"magellan\":" ${SRCDIR}/source3/VERSION || die | ||
56 | cd ${SRCDIR}/source3 | ||
57 | sh script/mkversion.sh || die | ||
58 | |||
59 | # compilation fix | ||
60 | # (u)mount.cifs is broken; missing include/version.h header | ||
61 | ln -snf ../include ${SRCDIR}/source3/client || die | ||
62 | } | ||
63 | |||
64 | src_compile() | ||
65 | { | ||
66 | cd ${SRCDIR}/source3 | ||
67 | |||
68 | # remove swat completely now; since we have no httpd server yet | ||
69 | # if really needed we make an extra package to save diskspace | ||
70 | # --disable-swat option is there, no patches needed anymore ;) | ||
71 | mconfigure \ | ||
72 | --with-fhs \ | ||
73 | --sysconfdir=/etc/samba \ | ||
74 | --localstatedir=/var \ | ||
75 | --with-configdir=/etc/samba \ | ||
76 | --libdir=/usr/$(mlibdir)/samba \ | ||
77 | --with-swatdir=/usr/share/doc/${PNAME}-${PVER}/swat \ | ||
78 | --with-piddir=/var/run/samba \ | ||
79 | --with-lockdir=/var/cache/samba \ | ||
80 | --with-logfilebase=/var/log/samba \ | ||
81 | --with-privatedir=/var/lib/samba/private \ | ||
82 | --enable-shared-libs \ | ||
83 | --with-cifsmount \ | ||
84 | --with-automount \ | ||
85 | --with-libsmbclient \ | ||
86 | --with-syslog \ | ||
87 | --without-acl-support \ | ||
88 | --enable-cups \ | ||
89 | --without-krb5 \ | ||
90 | --without-ldap \ | ||
91 | --with-readline \ | ||
92 | --with-winbind \ | ||
93 | --without-pam \ | ||
94 | --without-pam_smbpass \ | ||
95 | --with-quotas \ | ||
96 | --with-sys-quotas \ | ||
97 | --with-cifsmount=no \ | ||
98 | --disable-swat \ | ||
99 | --enable-avahi \ | ||
100 | --disable-developer \ | ||
101 | --disable-dmalloc \ | ||
102 | || die | ||
103 | |||
104 | mmake proto || die | ||
105 | mmake everything || die | ||
106 | |||
107 | # build mount.cifs separatly to fix pic issues | ||
108 | mmake bin/mount.cifs || die | ||
109 | mmake bin/umount.cifs || die | ||
110 | } | ||
111 | |||
112 | src_install() | ||
113 | { | ||
114 | cd ${SRCDIR}/source3 | ||
115 | |||
116 | # needed directories | ||
117 | minstalldir /etc/samba || die | ||
118 | minstalldir /sbin || die | ||
119 | minstalldir /usr/$(mlibdir)/cups/backend || die | ||
120 | minstalldir /usr/share/doc/${PNAME}-${PVER}/examples || die | ||
121 | |||
122 | # needed directories by samba at runtime | ||
123 | mkeepdir /var/log/samba || die | ||
124 | mkeepdir /var/run/samba || die | ||
125 | mkeepdir /var/cache/samba || die | ||
126 | mkeepdir /var/lib/samba/netlogon || die | ||
127 | mkeepdir /var/lib/samba/profiles || die | ||
128 | mkeepdir /var/lib/samba/printers/W32X86 || die | ||
129 | mkeepdir /var/lib/samba/printers/WIN40 || die | ||
130 | mkeepdir /var/lib/samba/printers/W32ALPHA || die | ||
131 | mkeepdir /var/lib/samba/printers/W32MIPS || die | ||
132 | mkeepdir /var/lib/samba/printers/W32PPC || die | ||
133 | mkeepdir /var/lib/samba/private || die | ||
134 | mkeepdir /var/spool/samba || die | ||
135 | |||
136 | # fix permissions | ||
137 | mchmod 0700 /var/lib/samba/private || die | ||
138 | mchmod 1777 /var/spool/samba || die | ||
139 | |||
140 | make DESTDIR=${BINDIR} install-everything || die | ||
141 | |||
142 | # if exist remove *.old binaries | ||
143 | if [[ -n $(find ${BINDIR}/usr/bin -type f -name '*.old') ]] | ||
144 | then | ||
145 | for i in ${BINDIR}/usr/bin/*.old | ||
146 | do | ||
147 | [[ -e ${i} ]] && rm -f ${i} || die | ||
148 | done | ||
149 | fi | ||
150 | |||
151 | # install wins nsswitch extensions | ||
152 | minstalldir /usr/$(mlibdir) || die | ||
153 | minstallfile ${SRCDIR}/nsswitch/libnss_wins.so /usr/$(mlibdir) || die | ||
154 | mlink libnss_wins.so /usr/$(mlibdir)/libnss_wins.so.2 || die | ||
155 | minstallfile ${SRCDIR}/nsswitch/libnss_winbind.so /usr/$(mlibdir) || die | ||
156 | mlink libnss_winbind.so /usr/$(mlibdir)/libnss_winbind.so.2 || die | ||
157 | |||
158 | # install cifs tools | ||
159 | minstallexec bin/mount.cifs || die | ||
160 | minstallexec bin/umount.cifs || die | ||
161 | mchmod 4755 /usr/bin/mount.cifs || die | ||
162 | mchmod 4755 /usr/bin/umount.cifs || die | ||
163 | |||
164 | # add support for mount | ||
165 | mlink ../usr/bin/mount.cifs /sbin/mount.cifs || die | ||
166 | |||
167 | # samba doesn't create these symlinks anymore | ||
168 | mlink samba/libsmbclient.so /usr/$(mlibdir)/libsmbclient.so.0 || die | ||
169 | mlink samba/libsmbclient.so /usr/$(mlibdir)/libsmbclient.so || die | ||
170 | mlink samba/libtalloc.so /usr/$(mlibdir)/libtalloc.so.1 || die | ||
171 | mlink samba/libtalloc.so /usr/$(mlibdir)/libtalloc.so || die | ||
172 | mlink samba/libtdb.so /usr/$(mlibdir)/libtdb.so.1 || die | ||
173 | mlink samba/libtdb.so /usr/$(mlibdir)/libtdb.so || die | ||
174 | mlink samba/libwbclient.so /usr/$(mlibdir)/libwbclient.so.0 || die | ||
175 | mlink samba/libwbclient.so /usr/$(mlibdir)/libwbclient.so || die | ||
176 | |||
177 | # add cups printing support | ||
178 | mlink ../../../bin/smbspool /usr/$(mlibdir)/cups/backend/smb || die | ||
179 | |||
180 | # install our config files | ||
181 | # fake smb.conf to get smbmount work | ||
182 | memptyfile /etc/samba/smb.conf || die | ||
183 | |||
184 | # our smb example config | ||
185 | minstalletc smb.conf-3.0.14a smb.conf.example /etc/samba || die | ||
186 | |||
187 | # our lmhosts and smbusers config | ||
188 | minstalletc lmhosts lmhosts /etc/samba || die | ||
189 | minstalletc smbusers smbusers /etc/samba || die | ||
190 | |||
191 | # our initscript | ||
192 | minstallrc samba.rc samba || die | ||
193 | |||
194 | # install systemd units | ||
195 | minstallunit nmbd.service || die | ||
196 | minstallunit smbd.service || die | ||
197 | |||
198 | # # install example docs - not wanted anymore to save some space | ||
199 | # cp -a ${SRCDIR}/examples/* ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/examples || die | ||
200 | # | ||
201 | # # fix all permissions | ||
202 | # chmod -R 755 $(find ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/examples -type d) || die | ||
203 | # chmod -R 644 $(find ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/examples ! -type d) || die | ||
204 | |||
205 | # # remove unneeded docs, this saves some space ;) | ||
206 | # rm -rf ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/swat/help/{guide,howto,devel} || die | ||
207 | # rm -rf ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/swat/using_samba || die | ||
208 | |||
209 | # using a patch now | ||
210 | # # remove swat completely now; since we have no httpd server yet | ||
211 | # # if really needed we make an extra package to save diskspace | ||
212 | # rm -f ${BINDIR}/usr/sbin/swat || die | ||
213 | # rm -f ${BINDIR}/usr/share/man/man8/swat.8 || die | ||
214 | # rm -rf ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/swat || die | ||
215 | |||
216 | # other docs | ||
217 | cd ${SRCDIR} | ||
218 | minstalldocs COPYING Manifest README REVISION Read-Manifest-Now Roadmap WHATSNEW.txt || die | ||
219 | } | ||
220 | |||
221 | postinstall() | ||
222 | { | ||
223 | mstartunit nmbd.service | ||
224 | mstartunit smbd.service | ||
225 | |||
226 | echo | ||
227 | echo "To initialize samba's password database, please run:" | ||
228 | echo " pdbedit --force-initialized-passwords" | ||
229 | echo | ||
230 | echo "If you experience client locks in file transfers _only_, try the parameter" | ||
231 | echo " use sendfile = no (man smb.conf(5), man sendfile(2))" | ||
232 | echo | ||
233 | echo "There also seem some problems with the smbfs implementation of the recent 2.6 kernels." | ||
234 | echo "If you experience problems (lockups) with smbfs, try cifs as an alternative." | ||
235 | echo | ||
236 | } | ||
237 | |||
238 | postremove() | ||
239 | { | ||
240 | mstopunit nmbd.service | ||
241 | mstopunit smbd.service | ||
242 | } |