Contents of /trunk/core/samba/samba-3.0.34-r1.smage2
Parent Directory | Revision Log
Revision 1580 -
(show annotations)
(download)
Mon May 11 19:26:11 2009 UTC (15 years ago) by niro
File size: 7492 byte(s)
Mon May 11 19:26:11 2009 UTC (15 years ago) by niro
File size: 7492 byte(s)
-fix compilation with libcaps-2
1 | # $Id$ |
2 | |
3 | PNAME="samba" |
4 | PVER="3.0.34" |
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.3 |
15 | >= dev-libs/popt-1.15 |
16 | >= sys-libs/readline-6 |
17 | >= app-admin/fam-2.7.0 |
18 | >= dev-libs/openssl-0.9.8" |
19 | |
20 | SDEPEND=">= sys-dev/automake-3 |
21 | >= sys-dev/autoconf-4 |
22 | >= sys-apps/sed-4" |
23 | |
24 | SRCFILE="${PNAME}-${PVER}.tar.gz" |
25 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
26 | |
27 | FILESDIR="${SOURCEDIR}/samba" |
28 | |
29 | sminclude mtools |
30 | |
31 | SRC_URI=( |
32 | http://us1.samba.org/samba/ftp/stable/${SRCFILE} |
33 | mirror://${PNAME}/${SRCFILE} |
34 | mirror://${PNAME}/smb.conf-3.0.14a |
35 | mirror://${PNAME}/lmhosts |
36 | mirror://${PNAME}/smbusers |
37 | mirror://${PNAME}/samba.rc |
38 | mirror://${PNAME}/samba-3.0.x-smbumount-uid32.patch |
39 | mirror://${PNAME}/samba-3.0.20-libdirsymlink.patch |
40 | mirror://${PNAME}/samba-3.0.27-extrabins.patch |
41 | mirror://${PNAME}/samba-3.0.28-subins-configure.patch |
42 | mirror://${PNAME}/samba-3.0.34-subins-makefile.patch |
43 | mirror://${PNAME}/samba-3.0.34-magellan-no-swat.patch |
44 | mirror://${PNAME}/samba-3.0.27-invalid-free-fix.patch |
45 | mirror://${PNAME}/samba-3.0.34-fix-broken-readdir-detection.patch |
46 | ) |
47 | |
48 | UP2DATE="updatecmd http://ftp.samba.org/samba/ftp | grep ${PNAME}-[0-9].* | lasttarball gz" |
49 | |
50 | src_prepare() |
51 | { |
52 | munpack ${SRCFILE} || die |
53 | cd ${SRCDIR} |
54 | |
55 | # examples: to be copied as docs |
56 | rm -rf ${SRCDIR}/examples.ORIG || die |
57 | |
58 | # patchwork |
59 | mpatch samba-3.0.x-smbumount-uid32.patch || die |
60 | mpatch samba-3.0.20-libdirsymlink.patch || die |
61 | mpatch samba-3.0.27-extrabins.patch || die |
62 | mpatch samba-3.0.28-subins-configure.patch || die |
63 | mpatch samba-3.0.34-subins-makefile.patch || die |
64 | |
65 | # remove swat completely now; since we have no httpd server yet |
66 | # if really needed we make an extra package to save diskspace |
67 | mpatch samba-3.0.34-magellan-no-swat.patch || die |
68 | |
69 | # official samba fixes |
70 | # fixes an invalid pointer in libsmbclient - see upstream bug #5021 |
71 | mpatch samba-3.0.27-invalid-free-fix.patch || die |
72 | |
73 | # fix compilation with libcaps-2 |
74 | mpatch samba-3.0.34-fix-broken-readdir-detection.patch || die |
75 | |
76 | # add our vendor suffix |
77 | sed -i "s:^\(SAMBA_VERSION_VENDOR_SUFFIX=\).*:\1\"magellan\":" ${SRCDIR}/source/VERSION || die |
78 | cd ${SRCDIR}/source |
79 | sh script/mkversion.sh || die |
80 | |
81 | # compilation fix |
82 | # (u)mount.cifs is broken; missing include/version.h header |
83 | ln -snf ../include ${SRCDIR}/source/client || die |
84 | |
85 | # reconfigure makefiles |
86 | cd ${SRCDIR}/source |
87 | autoreconf -I. -Ilib/replace || die |
88 | } |
89 | |
90 | src_compile() |
91 | { |
92 | cd ${SRCDIR}/source |
93 | |
94 | mconfigure \ |
95 | --with-fhs \ |
96 | --sysconfdir=/etc/samba \ |
97 | --localstatedir=/var \ |
98 | --with-configdir=/etc/samba \ |
99 | --with-libdir=/usr/$(mlibdir)/samba \ |
100 | --with-swatdir=/usr/share/doc/${PNAME}-${PVER}/swat \ |
101 | --with-piddir=/var/run/samba \ |
102 | --with-lockdir=/var/cache/samba \ |
103 | --with-logfilebase=/var/log/samba \ |
104 | --with-privatedir=/var/lib/samba/private \ |
105 | --enable-static \ |
106 | --enable-shared \ |
107 | --with-smbmount \ |
108 | --with-automount \ |
109 | --with-libsmbclient \ |
110 | --without-spinlocks \ |
111 | --with-syslog \ |
112 | --with-idmap \ |
113 | --without-ldapsam \ |
114 | --without-acl-support \ |
115 | --enable-cups \ |
116 | --without-krb5 \ |
117 | --without-ldap \ |
118 | --without-python \ |
119 | --with-readline \ |
120 | --with-winbind \ |
121 | --without-pam \ |
122 | --without-pam_smbpass \ |
123 | --with-quotas \ |
124 | --with-sys-quotas \ |
125 | --with-manpages-langs=en \ |
126 | --with-cifsmount=no \ |
127 | || die |
128 | |
129 | mmake proto || die |
130 | mmake everything || die |
131 | |
132 | # build mount.cifs separatly to fix pic issues |
133 | cd client |
134 | gcc -o mount.cifs ${CFLAGS} -Wall -D_GNU_SOURCE -D_LARGEFILE64_SOURCE mount.cifs.c || die |
135 | gcc -o umount.cifs ${CFLAGS} -Wall -D_GNU_SOURCE -D_LARGEFILE64_SOURCE umount.cifs.c || die |
136 | } |
137 | |
138 | src_install() |
139 | { |
140 | cd ${SRCDIR}/source |
141 | |
142 | # needed directories |
143 | minstalldir /etc/samba || die |
144 | minstalldir /sbin || die |
145 | minstalldir /usr/$(mlibdir)/cups/backend || die |
146 | minstalldir /usr/share/doc/${PNAME}-${PVER}/examples || die |
147 | |
148 | # needed directories by samba at runtime |
149 | mkeepdir /var/log/samba || die |
150 | mkeepdir /var/run/samba || die |
151 | mkeepdir /var/cache/samba || die |
152 | mkeepdir /var/lib/samba/netlogon || die |
153 | mkeepdir /var/lib/samba/profiles || die |
154 | mkeepdir /var/lib/samba/printers/W32X86 || die |
155 | mkeepdir /var/lib/samba/printers/WIN40 || die |
156 | mkeepdir /var/lib/samba/printers/W32ALPHA || die |
157 | mkeepdir /var/lib/samba/printers/W32MIPS || die |
158 | mkeepdir /var/lib/samba/printers/W32PPC || die |
159 | mkeepdir /var/lib/samba/private || die |
160 | mkeepdir /var/spool/samba || die |
161 | |
162 | # fix permissions |
163 | mchmod 0700 /var/lib/samba/private || die |
164 | mchmod 1777 /var/spool/samba || die |
165 | |
166 | make DESTDIR=${BINDIR} install-everything || die |
167 | |
168 | # if exist remove *.old binaries |
169 | if [[ -n $(find ${BINDIR}/usr/bin -type f -name '*.old') ]] |
170 | then |
171 | for i in ${BINDIR}/usr/bin/*.old |
172 | do |
173 | [[ -e ${i} ]] && rm -f ${i} || die |
174 | done |
175 | fi |
176 | |
177 | # install wins nsswitch extensions |
178 | minstalllib nsswitch/libnss_wins.so || die |
179 | mlink libnss_wins.so /usr/$(mlibdir)/libnss_wins.so.2 || die |
180 | minstalllib nsswitch/libnss_winbind.so || die |
181 | mlink libnss_winbind.so /usr/$(mlibdir)/libnss_winbind.so.2 || die |
182 | |
183 | # install cifs tools |
184 | minstallexec client/mount.cifs || die |
185 | minstallexec client/umount.cifs || die |
186 | mchmod 4755 /usr/bin/mount.cifs || die |
187 | mchmod 4755 /usr/bin/umount.cifs || die |
188 | |
189 | # add support for mount |
190 | mlink ../usr/bin/smbmount /sbin/mount.smbfs || die |
191 | mlink ../usr/bin/mount.cifs /sbin/mount.cifs || die |
192 | |
193 | # samba doesn't create these symlinks anymore |
194 | mlink samba/libsmbclient.so /usr/$(mlibdir)/libsmbclient.so.0 || die |
195 | mlink samba/libsmbclient.so /usr/$(mlibdir)/libsmbclient.so || die |
196 | |
197 | # add cups printing support |
198 | mlink ../../../bin/smbspool /usr/$(mlibdir)/cups/backend/smb || die |
199 | |
200 | # install our config files |
201 | # fake smb.conf to get smbmount work |
202 | memptyfile /etc/samba/smb.conf || die |
203 | |
204 | # our smb example config |
205 | minstalletc smb.conf-3.0.14a smb.conf.example /etc/samba || die |
206 | |
207 | # our lmhosts and smbusers config |
208 | minstalletc lmhosts lmhosts /etc/samba || die |
209 | minstalletc smbusers smbusers /etc/samba || die |
210 | |
211 | # our initscript |
212 | minstallrc samba.rc samba || die |
213 | |
214 | # # install example docs - not wanted anymore to save some space |
215 | # cp -a ${SRCDIR}/examples/* ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/examples || die |
216 | # |
217 | # # fix all permissions |
218 | # chmod -R 755 $(find ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/examples -type d) || die |
219 | # chmod -R 644 $(find ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/examples ! -type d) || die |
220 | |
221 | # # remove unneeded docs, this saves some space ;) |
222 | # rm -rf ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/swat/help/{guide,howto,devel} || die |
223 | # rm -rf ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/swat/using_samba || die |
224 | |
225 | # using a patch now |
226 | # # remove swat completely now; since we have no httpd server yet |
227 | # # if really needed we make an extra package to save diskspace |
228 | # rm -f ${BINDIR}/usr/sbin/swat || die |
229 | # rm -f ${BINDIR}/usr/share/man/man8/swat.8 || die |
230 | # rm -rf ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/swat || die |
231 | |
232 | # other docs |
233 | cd ${SRCDIR} |
234 | minstalldocs COPYING Manifest README REVISION Read-Manifest-Now Roadmap WHATSNEW.txt || die |
235 | } |
236 | |
237 | postinstall() |
238 | { |
239 | echo |
240 | echo "To initialize samba's password database, please run:" |
241 | echo " pdbedit --force-initialized-passwords" |
242 | echo |
243 | echo "If you experience client locks in file transfers _only_, try the parameter" |
244 | echo " use sendfile = no (man smb.conf(5), man sendfile(2))" |
245 | echo |
246 | echo "There also seem some problems with the smbfs implementation of the recent 2.6 kernels." |
247 | echo "If you experience problems (lockups) with smbfs, try cifs as an alternative." |
248 | echo |
249 | } |
Properties
Name | Value |
---|---|
svn:keywords | Id |