Magellan Linux

Contents of /smage/branches/alx-0_6_0/core/samba/samba-3.5.9-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2618 - (show annotations) (download)
Wed Jul 6 22:36:48 2011 UTC (13 years, 2 months ago) by niro
File size: 2984 byte(s)
auto added: ver bump to 3.5.9-r1
1 # $Id$
2
3 PNAME="samba"
4 PVER="3.5.9"
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 >= dev-libs/popt-1.16
15 >= sys-libs/ncurses-5.9"
16
17 SDEPEND=">= sys-dev/automake-4
18 >= sys-dev/autoconf-5
19 >= sys-apps/sed-4"
20
21 SRCFILE="${PNAME}-${PVER}.tar.gz"
22 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
23
24 FILESDIR="${SOURCEDIR}/samba"
25
26 REMOVE_DEPRECATED_MAGE_TARGETS=1
27 sminclude mtools alx
28
29 SRC_URI=(
30 http://us1.samba.org/samba/ftp/stable/${SRCFILE}
31 mirror://${PNAME}/${SRCFILE}
32 mirror://${PNAME}/samba.rc
33 )
34
35 UP2DATE="updatecmd http://ftp.samba.org/pub/samba | grep ${PNAME}-[0-9].* | lasttarball gz"
36
37 src_prepare()
38 {
39 munpack ${SRCFILE} || die
40 cd ${SRCDIR}
41
42 # examples: to be copied as docs
43 rm -rf ${SRCDIR}/examples.ORIG || die
44
45 # add our vendor suffix
46 sed -i "s:^\(SAMBA_VERSION_VENDOR_SUFFIX=\).*:\1\"magellan\":" ${SRCDIR}/source3/VERSION || die
47 cd ${SRCDIR}/source3
48 sh script/mkversion.sh || die
49
50 # compilation fix
51 # (u)mount.cifs is broken; missing include/version.h header
52 ln -snf ../include ${SRCDIR}/source3/client || die
53 }
54
55 src_compile()
56 {
57 cd ${SRCDIR}/source3
58
59 # remove swat completely now; since we have no httpd server yet
60 # if really needed we make an extra package to save diskspace
61 # --disable-swat option is there, no patches needed anymore ;)
62 mconfigure \
63 --with-fhs \
64 --sysconfdir=/etc/samba \
65 --localstatedir=/var \
66 --with-configdir=/etc/samba \
67 --libdir=/usr/$(mlibdir)/samba \
68 --with-swatdir=/usr/share/doc/${PNAME}-${PVER}/swat \
69 --with-piddir=/var/run/samba \
70 --with-lockdir=/var/cache/samba \
71 --with-logfilebase=/var/log/samba \
72 --with-privatedir=/var/lib/samba/private \
73 --enable-shared-libs \
74 --without-cifsmount \
75 --without-automount \
76 --without-libsmbclient \
77 --without-syslog \
78 --without-acl-support \
79 --disable-cups \
80 --without-krb5 \
81 --without-ldap \
82 --without-readline \
83 --without-winbind \
84 --without-pam \
85 --without-pam_smbpass \
86 --without-quotas \
87 --without-sys-quotas \
88 --disable-swat \
89 --disable-avahi \
90 --disable-developer \
91 --disable-dmalloc \
92 || die
93
94 mmake proto || die
95 mmake everything || die
96 }
97
98 src_install()
99 {
100 cd ${SRCDIR}/source3
101
102 # needed directories
103 minstalldir /sbin || die
104
105 # needed directories by samba at runtime
106 mkeepdir /var/run/samba || die
107 mkeepdir /var/cache/samba || die
108
109 make DESTDIR=${BINDIR} install-everything || die
110
111 # if exist remove *.old binaries
112 if [[ -n $(find ${BINDIR}/usr/bin -type f -name '*.old') ]]
113 then
114 for i in ${BINDIR}/usr/bin/*.old
115 do
116 [[ -e ${i} ]] && rm -f ${i} || die
117 done
118 fi
119
120 # our initscript
121 minstalldir /etc/rc.d/init.d/|| die
122 mcinstallexec nmbd.rc /etc/rc.d/init.d/nmbd || die
123
124 # other docs
125 cd ${SRCDIR}
126 minstalldocs COPYING Manifest README REVISION Read-Manifest-Now Roadmap WHATSNEW.txt || die
127 }
128
129 postinstall()
130 {
131 mstartservice nmbd
132 }
133
134 postremove()
135 {
136 mstopservice nmbd
137 }