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