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
106 rm -f build-stamp configure-stamp
108 # Clean first the Samba package
109 # -$(MAKE) -C source realclean
110 # -$(MAKE) -C source clean
111 -$(MAKE
) -C source python_clean
distclean
113 # Delete stuff left after a build that is not deleted by 'make clean'
114 rm -f source
/bin
/wbinfo source
/bin
/winbindd source
/bin
/debug2html \
115 source
/bin
/libsmbclient.a source
/include/stamp-h
126 mkdir
-p
$(DESTDIR
)/usr
/share
/man
$(DESTDIR
)/usr
/lib \
127 $(DESTDIR
)/lib
/security
$(DESTDIR
)/sbin
$(DESTDIR
)/etc
/samba \
128 $(DESTDIR
)/usr
/lib
/cups
/backend
$(DESTDIR
)/usr
/share
/samba \
129 $(DESTDIR
)/etc
/pam.d
$(DESTDIR
)/etc
/dhcp3
/dhclient-enter-hooks.d \
130 $(DESTDIR
)/usr
/lib
/python2.2
/site-packages
132 # Add here commands to install the package into debian/tmp.
133 $(MAKE
) -C source
install DESTDIR
=$(DESTDIR
)
135 # libsmbclient files are not installed by the standard
136 # 'make install' - do it manually.
137 $(MAKE
) -C source installclientlib DESTDIR
=$(DESTDIR
)
138 mv
$(DESTDIR
)/usr
/lib
/samba
/libsmbclient.so
$(DESTDIR
)/usr
/lib
/libsmbclient.so
.0.1
139 ln
-s libsmbclient.so
.0.1 $(DESTDIR
)/usr
/lib
/libsmbclient.so
.0
140 ln
-s libsmbclient.so
.0.1 $(DESTDIR
)/usr
/lib
/libsmbclient.so
141 mv
$(DESTDIR
)/usr
/lib
/samba
/libsmbclient.a
$(DESTDIR
)/usr
/lib
/libsmbclient.a
143 # Install other stuff not installed by "make install"
144 install -m
0755 debian
/mksmbpasswd.awk
$(DESTDIR
)/usr
/sbin
/mksmbpasswd
146 # Install winbind stuff not installed by 'make install'
147 install -m
0644 source
/nsswitch
/libnss_winbind.so \
148 $(DESTDIR
)/lib
/libnss_winbind.so
.2
149 install -m
0644 source
/nsswitch
/pam_winbind.so \
150 $(DESTDIR
)/lib
/security
/
152 # Install libnss_wins.so, which is not installed by 'make install' either.
153 install -m
0644 source
/nsswitch
/libnss_wins.so \
154 $(DESTDIR
)/lib
/libnss_wins.so
.2
156 # pam_smbpass.so isn't being installed by 'make install'.
157 # We'll move it here to $(DESTDIR)/lib/security/ and then
158 # libpam-smbpass.files will make dh_movefiles move it to the
159 # right location in the libpam-smbpass package.
160 install -m
0644 source
/bin
/pam_smbpass.so
$(DESTDIR
)/lib
/security
/
162 # Create the symlink that will allow us to do "mount -t smbfs ...".
163 # Create also a symlink that will allow "mount -t smb ..." to
164 # work too. The symlink is created in $(DESTDIR)/sbin/ but
165 # will be moved by dh_movefiles to the smbfs package later on.
166 ln
-s
/usr
/bin
/smbmount
$(DESTDIR
)/sbin
/mount.smbfs
167 ln
-s
/usr
/bin
/smbmount
$(DESTDIR
)/sbin
/mount.smb
168 ln
-s smbmount
.8 $(DESTDIR
)/usr
/share
/man
/man8
/mount.smb
.8
169 ln
-s smbmount
.8 $(DESTDIR
)/usr
/share
/man
/man8
/mount.smbfs
.8
171 # For CUPS to support printing to samba printers, it's necessary
172 # to make the following symlink (according to
173 # Erich Schubert <debian@vitavonni.de> in #109509):
174 ln
-s ..
/..
/..
/bin
/smbspool
$(DESTDIR
)/usr
/lib
/cups
/backend
/smb
176 # Install man pages for files without man pages in the upstream sources
177 install -m
0644 debian
/mksmbpasswd
.8 $(DESTDIR
)/usr
/share
/man
/man8
/mksmbpasswd
.8
179 # Delete unwanted stuff leftover from "make install"
181 # The smbwrapper package is not being generated anymore, so we must
182 # delete the related man pages.
183 rm $(DESTDIR
)/usr
/share
/man
/man1
/smbsh
.1
185 # We're not providing findsmb (should we?) so let's remove the man
187 find debian
/ -name
'findsmb*' -exec
rm -f
{} \
;
189 # Install samba-common's conffiles - they'll get moved later to their
190 # correct place by dh_movefiles.
191 cp debian
/smb.conf
$(DESTDIR
)/etc
/samba
/
192 install -m755 debian
/panic-action
$(DESTDIR
)/etc
/samba
/
193 cp debian
/gdbcommands
$(DESTDIR
)/etc
/samba
/
194 cp debian
/samba.pamd
$(DESTDIR
)/etc
/pam.d
/samba
195 install -m755 debian
/samba-common.dhcp
$(DESTDIR
)/etc
/dhcp3
/dhclient-enter-hooks.d
/samba
197 # Install the Python modules
199 #cp source/build/lib.*/samba/*.so $(DESTDIR)/usr/lib/python2.2/site-packages/
200 cp source
/build
/lib.linux-
*-2.2/samba
/*.so
$(DESTDIR
)/usr
/lib
/python2.2
/site-packages
/
204 # Build architecture-independent files here.
205 # Pass -i to all debhelper commands in this target to reduce clutter.
206 binary-indep
: DH_OPTIONS
=-i
207 binary-indep
: build
install
211 dh_installdocs
-A debian
/README.build
212 # dh_installexamples is not available in Debian Potato...
213 [ -x
/usr
/bin
/dh_installexamples
] && DH_OPTIONS
= dh_installexamples
-v
-psamba-doc examples
/*
227 # Get rid of those pesky .cvsignore files to make lintian happy
228 find debian
/ -name .cvsignore
-exec
rm -f
{} \
;
236 # Build architecture-dependent files here.
237 # Pass -a to all debhelper commands in this target to reduce clutter.
238 binary-arch
: DH_OPTIONS
=-a
239 binary-arch
: build
install
243 dh_installdocs
-A debian
/README.build
244 # dh_installexamples is not available in Debian Potato...
245 [ -x
/usr
/bin
/dh_installexamples
] && DH_OPTIONS
= dh_installexamples
-v
-ppython2.2
-samba source
/python
/examples
/*
247 # dh_installlogrotate is not available in Debian Potato...
248 if
[ -x
/usr
/bin
/dh_installlogrotate
]; then \
249 dh_installlogrotate
; \
251 mkdir
-p debian
/samba
/etc
/logrotate.d
; \
252 cp debian
/samba.logrotate debian
/samba
/etc
/logrotate.d
/samba
; \
253 mkdir
-p debian
/winbind
/etc
/logrotate.d
; \
254 cp debian
/winbind.logrotate debian
/winbind
/etc
/logrotate.d
/winbind
; \
258 DH_OPTIONS
= dh_installinit
-psamba
-- "defaults 20 19"
259 DH_OPTIONS
= dh_installinit
-pwinbind
263 cp debian
/winbind.lintian debian
/winbind
/usr
/share
/lintian
/overrides
/winbind
265 dh_installchangelogs
-Nlibpam-smbpass
266 DH_OPTIONS
= dh_installchangelogs
-plibpam-smbpass source
/pam_smbpass
/CHANGELOG
272 # Why this is executable, I have NO idea...
273 chmod a-x debian
/libsmbclient-dev
/usr
/include/libsmbclient.h
275 # You may want to make some executables suid here.
276 # The smbmnt and smbumount binaries should be setuid-root. This
277 # has security implications because these programs haven't had
278 # a thorough security audit. smbmount _does not_ have to have
279 # the setuid bit set. In fact, it is a security hole.
280 chmod u
+s debian
/smbfs
/usr
/bin
/smbmnt
281 chmod u
+s debian
/smbfs
/usr
/bin
/smbumount
283 # Set some reasonable default perms for the samba logdir.
284 chmod
0750 debian
/samba
/var
/log
/samba
/
285 chown root.adm debian
/samba
/var
/log
/samba
/
287 # Get rid of those pesky .cvsignore files to make lintian happy
288 # (maybe we only need the "find ... -exec rm -f {} ;" we have
289 # in the binary-indep target?) peloy.-
290 find debian
/ -name .cvsignore
-exec
rm -f
{} \
;
300 binary
: binary-indep binary-arch
301 .PHONY
: build
clean binary-indep binary-arch binary
install configure