Contents of /smage/branches/alx-0_6_0/core/samba/samba-3.5.9-r1.smage2
Parent Directory | Revision Log
Revision 2620 -
(show annotations)
(download)
Wed Jul 6 22:59:52 2011 UTC (12 years, 11 months ago) by niro
File size: 3237 byte(s)
Wed Jul 6 22:59:52 2011 UTC (12 years, 11 months ago) by niro
File size: 3237 byte(s)
-fixed readability
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 | ALX_ONLY_KEEP="etc/samba/smb.conf |
27 | etc/rc.d/init.d/nmbd |
28 | usr/bin/net |
29 | usr/sbin/nmbd |
30 | var/run/samba |
31 | var/cache/samba |
32 | var/lib/samba" |
33 | REMOVE_DEPRECATED_MAGE_TARGETS=1 |
34 | sminclude mtools alx-split |
35 | |
36 | SRC_URI=( |
37 | http://us1.samba.org/samba/ftp/stable/${SRCFILE} |
38 | mirror://${PNAME}/${SRCFILE} |
39 | ) |
40 | |
41 | UP2DATE="updatecmd http://ftp.samba.org/pub/samba | grep ${PNAME}-[0-9].* | lasttarball gz" |
42 | |
43 | src_prepare() |
44 | { |
45 | munpack ${SRCFILE} || die |
46 | cd ${SRCDIR} |
47 | |
48 | # examples: to be copied as docs |
49 | rm -rf ${SRCDIR}/examples.ORIG || die |
50 | |
51 | # add our vendor suffix |
52 | sed -i "s:^\(SAMBA_VERSION_VENDOR_SUFFIX=\).*:\1\"magellan\":" ${SRCDIR}/source3/VERSION || die |
53 | cd ${SRCDIR}/source3 |
54 | sh script/mkversion.sh || die |
55 | |
56 | # compilation fix |
57 | # (u)mount.cifs is broken; missing include/version.h header |
58 | ln -snf ../include ${SRCDIR}/source3/client || die |
59 | } |
60 | |
61 | src_compile() |
62 | { |
63 | cd ${SRCDIR}/source3 |
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 | # --disable-swat option is there, no patches needed anymore ;) |
68 | mconfigure \ |
69 | --with-fhs \ |
70 | --sysconfdir=/etc/samba \ |
71 | --localstatedir=/var \ |
72 | --with-configdir=/etc/samba \ |
73 | --libdir=/usr/$(mlibdir)/samba \ |
74 | --with-swatdir=/usr/share/doc/${PNAME}-${PVER}/swat \ |
75 | --with-piddir=/var/run/samba \ |
76 | --with-lockdir=/var/cache/samba \ |
77 | --with-logfilebase=/var/log/samba \ |
78 | --with-privatedir=/var/lib/samba/private \ |
79 | --enable-shared-libs \ |
80 | --without-cifsmount \ |
81 | --without-automount \ |
82 | --without-libsmbclient \ |
83 | --without-syslog \ |
84 | --without-acl-support \ |
85 | --disable-cups \ |
86 | --without-krb5 \ |
87 | --without-ldap \ |
88 | --without-readline \ |
89 | --without-winbind \ |
90 | --without-pam \ |
91 | --without-pam_smbpass \ |
92 | --without-quotas \ |
93 | --without-sys-quotas \ |
94 | --disable-swat \ |
95 | --disable-avahi \ |
96 | --disable-developer \ |
97 | --disable-dmalloc \ |
98 | || die |
99 | |
100 | mmake proto || die |
101 | mmake everything || die |
102 | } |
103 | |
104 | src_install() |
105 | { |
106 | cd ${SRCDIR}/source3 |
107 | |
108 | # needed directories by samba at runtime |
109 | mkeepdir /var/run/samba || die |
110 | mkeepdir /var/lib/samba || die |
111 | mkeepdir /var/cache/samba || die |
112 | |
113 | make DESTDIR=${BINDIR} install-everything || die |
114 | |
115 | # if exist remove *.old binaries |
116 | if [[ -n $(find ${BINDIR}/usr/bin -type f -name '*.old') ]] |
117 | then |
118 | for i in ${BINDIR}/usr/bin/*.old |
119 | do |
120 | [[ -e ${i} ]] && rm -f ${i} || die |
121 | done |
122 | fi |
123 | |
124 | # our initscript |
125 | minstalldir /etc/rc.d/init.d/|| die |
126 | mcinjectexec nmbd.rc /etc/rc.d/init.d/nmbd || die |
127 | |
128 | # create a mininmal configuration to get nmbd working |
129 | echo '[global]' > /etc/samba/smb.conf || die |
130 | echo 'workgroup = WORKGROUP' > /etc/samba/smb.conf || die |
131 | |
132 | # other docs |
133 | cd ${SRCDIR} |
134 | minstalldocs COPYING Manifest README REVISION Read-Manifest-Now Roadmap WHATSNEW.txt || die |
135 | } |
136 | |
137 | postinstall() |
138 | { |
139 | mstartservice nmbd |
140 | } |
141 | |
142 | postremove() |
143 | { |
144 | mstopservice nmbd |
145 | } |