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