3 # Important modifications (introduction of a saved config.cache to
4 # solve build problems) introduced in Samba 2.2.1a-5. These
5 # modification were made by Steve Langasek <vorlon@netexpress.net>.
7 # config.cache *DISABLED* to solve problems caused incorrect settings
12 # Uncomment this to turn on verbose mode.
15 # This is the debhelper compatability version to use.
18 # This has to be exported to make some magic below work.
21 # Set the host and build architectures for use with config.cache loading,
22 # cross-building, etc.
23 DEB_HOST_GNU_TYPE
:= $(shell dpkg-architecture
-qDEB_HOST_GNU_TYPE
)
24 DEB_BUILD_GNU_TYPE
:= $(shell dpkg-architecture
-qDEB_BUILD_GNU_TYPE
)
26 export DEB_HOST_GNU_TYPE
27 export DEB_BUILD_GNU_TYPE
30 # Support the DEB_BUILD_OPTIONS variable
31 CFLAGS
= -gstabs
-Wall
34 ifneq (,$(findstring noopt
,$(DEB_BUILD_OPTIONS
)))
40 ifeq (,$(findstring nostrip
,$(DEB_BUILD_OPTIONS
)))
45 DESTDIR
=`pwd`/debian
/tmp
50 if
[ ! -f patch-stamp
]; then
/bin
/sh debian
/scripts
/patch-source
; fi
55 if
[ -f patch-stamp
]; then
/bin
/sh debian
/scripts
/unpatch-source
; fi
58 configure
: patch-stamp configure-stamp
62 # if [ -f debian/config.cache ]; then \
63 # cp -f debian/config.cache source/config.cache; \
66 [ -f source
/Makefile
] ||
(cd source
&& CFLAGS
="$(CFLAGS)" .
/configure \
67 --host
=$(DEB_HOST_GNU_TYPE
) \
68 --build
=$(DEB_BUILD_GNU_TYPE
) \
75 --with-privatedir
=/etc
/samba \
76 --localstatedir
=/var \
90 --with-python
=python2.2
)
94 build
: patch-stamp configure-stamp build-stamp
98 $(MAKE
) -C source headers
99 $(MAKE
) -C source
all nsswitch
/libnss_wins.so python_ext
100 $(MAKE
) -C source client
/mount.cifs
107 rm -f build-stamp configure-stamp
109 # Clean first the Samba package
110 # -$(MAKE) -C source realclean
111 # -$(MAKE) -C source clean
112 -$(MAKE
) -C source python_clean
distclean
114 # Delete stuff left after a build that is not deleted by 'make clean'
115 rm -f source
/bin
/wbinfo source
/bin
/winbindd source
/bin
/debug2html \
116 source
/bin
/libsmbclient.a source
/include/stamp-h
127 mkdir
-p
$(DESTDIR
)/usr
/share
/man
$(DESTDIR
)/usr
/lib \
128 $(DESTDIR
)/lib
/security
$(DESTDIR
)/sbin
$(DESTDIR
)/etc
/samba \
129 $(DESTDIR
)/usr
/lib
/cups
/backend
$(DESTDIR
)/usr
/share
/samba \
130 $(DESTDIR
)/etc
/pam.d
$(DESTDIR
)/etc
/dhcp3
/dhclient-enter-hooks.d \
131 $(DESTDIR
)/usr
/lib
/python2.2
/site-packages
133 # Add here commands to install the package into debian/tmp.
134 $(MAKE
) -C source
install DESTDIR
=$(DESTDIR
)
136 # libsmbclient files are not installed by the standard
137 # 'make install' - do it manually.
138 $(MAKE
) -C source installclientlib DESTDIR
=$(DESTDIR
)
139 mv
$(DESTDIR
)/usr
/lib
/samba
/libsmbclient.so
$(DESTDIR
)/usr
/lib
/libsmbclient.so
.0.1
140 ln
-s libsmbclient.so
.0.1 $(DESTDIR
)/usr
/lib
/libsmbclient.so
.0
141 ln
-s libsmbclient.so
.0.1 $(DESTDIR
)/usr
/lib
/libsmbclient.so
142 mv
$(DESTDIR
)/usr
/lib
/samba
/libsmbclient.a
$(DESTDIR
)/usr
/lib
/libsmbclient.a
144 # Install other stuff not installed by "make install"
145 install -m
0755 debian
/mksmbpasswd.awk
$(DESTDIR
)/usr
/sbin
/mksmbpasswd
147 # Install winbind stuff not installed by 'make install'
148 install -m
0644 source
/nsswitch
/libnss_winbind.so \
149 $(DESTDIR
)/lib
/libnss_winbind.so
.2
150 install -m
0644 source
/nsswitch
/pam_winbind.so \
151 $(DESTDIR
)/lib
/security
/
153 # Install libnss_wins.so, which is not installed by 'make install' either.
154 install -m
0644 source
/nsswitch
/libnss_wins.so \
155 $(DESTDIR
)/lib
/libnss_wins.so
.2
157 # pam_smbpass.so isn't being installed by 'make install'.
158 # We'll move it here to $(DESTDIR)/lib/security/ and then
159 # libpam-smbpass.files will make dh_movefiles move it to the
160 # right location in the libpam-smbpass package.
161 install -m
0644 source
/bin
/pam_smbpass.so
$(DESTDIR
)/lib
/security
/
163 # Create the symlink that will allow us to do "mount -t smbfs ...".
164 # Create also a symlink that will allow "mount -t smb ..." to
165 # work too. The symlink is created in $(DESTDIR)/sbin/ but
166 # will be moved by dh_movefiles to the smbfs package later on.
167 ln
-s
/usr
/bin
/smbmount
$(DESTDIR
)/sbin
/mount.smbfs
168 ln
-s
/usr
/bin
/smbmount
$(DESTDIR
)/sbin
/mount.smb
169 ln
-s smbmount
.8 $(DESTDIR
)/usr
/share
/man
/man8
/mount.smb
.8
170 ln
-s smbmount
.8 $(DESTDIR
)/usr
/share
/man
/man8
/mount.smbfs
.8
172 # Install mount.cifs and its man page
173 install -m
0755 source
/client
/mount.cifs
$(DESTDIR
)/sbin
/
174 install -m
0644 docs
/manpages
/mount.cifs
.8 $(DESTDIR
)/usr
/share
/man
/man8
/
176 # For CUPS to support printing to samba printers, it's necessary
177 # to make the following symlink (according to
178 # Erich Schubert <debian@vitavonni.de> in #109509):
179 ln
-s ..
/..
/..
/bin
/smbspool
$(DESTDIR
)/usr
/lib
/cups
/backend
/smb
181 # Install man pages for files without man pages in the upstream sources
182 install -m
0644 debian
/mksmbpasswd
.8 $(DESTDIR
)/usr
/share
/man
/man8
/mksmbpasswd
.8
184 # Delete unwanted stuff leftover from "make install"
186 # The smbwrapper package is not being generated anymore, so we must
187 # delete the related man pages.
188 rm $(DESTDIR
)/usr
/share
/man
/man1
/smbsh
.1
190 # We're not providing findsmb (should we?) so let's remove the man
192 find debian
/ -name
'findsmb*' -exec
rm -f
{} \
;
194 # Install samba-common's conffiles - they'll get moved later to their
195 # correct place by dh_movefiles.
196 cp debian
/smb.conf
$(DESTDIR
)/etc
/samba
/
197 install -m755 debian
/panic-action
$(DESTDIR
)/etc
/samba
/
198 cp debian
/gdbcommands
$(DESTDIR
)/etc
/samba
/
199 cp debian
/samba.pamd
$(DESTDIR
)/etc
/pam.d
/samba
200 install -m755 debian
/samba-common.dhcp
$(DESTDIR
)/etc
/dhcp3
/dhclient-enter-hooks.d
/samba
202 # Install the Python modules
204 #cp source/build/lib.*/samba/*.so $(DESTDIR)/usr/lib/python2.2/site-packages/
205 cp source
/build
/lib.linux-
*-2.2/samba
/*.so
$(DESTDIR
)/usr
/lib
/python2.2
/site-packages
/
209 # Build architecture-independent files here.
210 # Pass -i to all debhelper commands in this target to reduce clutter.
211 binary-indep
: DH_OPTIONS
=-i
212 binary-indep
: build
install
216 dh_installdocs
-A debian
/README.build
217 # dh_installexamples is not available in Debian Potato...
218 [ -x
/usr
/bin
/dh_installexamples
] && DH_OPTIONS
= dh_installexamples
-v
-psamba-doc examples
/*
232 # Get rid of those pesky .cvsignore files to make lintian happy
233 find debian
/ -name .cvsignore
-exec
rm -f
{} \
;
241 # Build architecture-dependent files here.
242 # Pass -a to all debhelper commands in this target to reduce clutter.
243 binary-arch
: DH_OPTIONS
=-a
244 binary-arch
: build
install
248 dh_installdocs
-A debian
/README.build
249 # dh_installexamples is not available in Debian Potato...
250 [ -x
/usr
/bin
/dh_installexamples
] && DH_OPTIONS
= dh_installexamples
-v
-ppython2.2
-samba source
/python
/examples
/*
252 # dh_installlogrotate is not available in Debian Potato...
253 if
[ -x
/usr
/bin
/dh_installlogrotate
]; then \
254 dh_installlogrotate
; \
256 mkdir
-p debian
/samba
/etc
/logrotate.d
; \
257 cp debian
/samba.logrotate debian
/samba
/etc
/logrotate.d
/samba
; \
258 mkdir
-p debian
/winbind
/etc
/logrotate.d
; \
259 cp debian
/winbind.logrotate debian
/winbind
/etc
/logrotate.d
/winbind
; \
263 DH_OPTIONS
= dh_installinit
-psamba
-- "defaults 20 19"
264 DH_OPTIONS
= dh_installinit
-pwinbind
268 cp debian
/winbind.lintian debian
/winbind
/usr
/share
/lintian
/overrides
/winbind
270 dh_installchangelogs
-Nlibpam-smbpass
271 DH_OPTIONS
= dh_installchangelogs
-plibpam-smbpass source
/pam_smbpass
/CHANGELOG
277 # Why this is executable, I have NO idea...
278 chmod a-x debian
/libsmbclient-dev
/usr
/include/libsmbclient.h
280 # You may want to make some executables suid here.
281 # The smbmnt and smbumount binaries should be setuid-root. This
282 # has security implications because these programs haven't had
283 # a thorough security audit. smbmount _does not_ have to have
284 # the setuid bit set. In fact, it is a security hole.
285 chmod u
+s debian
/smbfs
/usr
/bin
/smbmnt
286 chmod u
+s debian
/smbfs
/usr
/bin
/smbumount
288 # Set some reasonable default perms for the samba logdir.
289 chmod
0750 debian
/samba
/var
/log
/samba
/
290 chown root.adm debian
/samba
/var
/log
/samba
/
292 # Get rid of those pesky .cvsignore files to make lintian happy
293 # (maybe we only need the "find ... -exec rm -f {} ;" we have
294 # in the binary-indep target?) peloy.-
295 find debian
/ -name .cvsignore
-exec
rm -f
{} \
;
305 binary
: binary-indep binary-arch
306 .PHONY
: build
clean binary-indep binary-arch binary
install configure