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